I want to use the alpha buffer to store some
intermidiate results,with the following code using a RBGA color buffer:
//----------------------------
glActiveTexture(GL_TEXTURE0_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,nmapId);
glTexEnv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_REPLACE);
glActiveTexture(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,lmapid);
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_DOT3_RGB_EXT);
glTexEnvf(GL_TEXTURE_ENV,GL_SOURCE0_RGB_EXT,GL_TEXTUR);
glTexEnvf(GL_TEXTURE_ENV,GL_OPERAND0_RGB_EXT,GL_SRC_COLOR);
glTexEnvf(GL_TEXTURE_ENV,GL_SOURCE1_RGB_EXT,GL_PREVIOUS_EXT);
glTexEnvf(GL_TEXTURE_ENV,GL_OPERAND1_RGB_EXT, GL_SRC_COLOR);
render_poly();
//----------------------------
will the result of the dotproduct be stored
in rgb and the alpha buffer?
If not in alpha, how do I do that? Can I “transfer” the result in the rgb buffer to the alpha buffer somehow(assuming the rgb values are the same of course).
Thanks in advance
/Peter