texture_env_dot3 result in alpha buffer

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

Dont know about the DOT3_EXT, but the ARB version has a GL_DOT3_RGBA_ARB that puts the result in both RGB (greyscale) and Alpha(single channel)

Thanks I didn’t see that. I tried it but it still didn’t work though.

Many hours of debugging later I found it.
Most people using GLUT probably know this already:

SPECIFYING GLUT_RGBA DOES NOT GIVE YOU AN ALPHA BUFFER!!! USE GLUT_ALPHA!

Stupid rookie mistake.
/Peter