PDA

View Full Version : glClearColor() question



MickeyMouse
10-10-2002, 12:47 AM
My question is similar to the one asked a while ago here:
Why id[3] (Alpha component) is 255 after that?

unsigned char id[4];
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
glReadPixels (10, 10, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, id);

R, G and B are properly zeroed.

I have voodoo2, could this be the reason?

Thanks for your help.

Bob
10-10-2002, 02:16 AM
Are you sure you have a destination alpha channel?

MickeyMouse
10-11-2002, 12:14 AM
no...
So if i get it right the problem is I don't have 4th component of my color buffer for alpha values...?

Previously I only needed source alpha, I thought it's obvious it's possible to use alpha destination.

My voodoo2 still surprises me http://www.opengl.org/discussion_boards/ubb/smile.gif, some days ago I also discovered it doesn't support glColorMask()....before I thought it's a basic of OpenGL