koradji
10-20-2005, 05:49 AM
hi,everyone
i have codes like this:
// set back color
glClearColor(0.0,0.0,0.0,0.0);
glColor4f(0.6,0.6,0.6,0.5);
// draw something
....
....
glFinish();
// now we want to get the pixels in frame buffer
glReadPixels(0,0,win_sizex,win_sizey,GL_RGBA,
GL_UNSIGNED_BYTE,pixel_buf);
....
....
code is finished,but whatever we set the params in glColor4f, the alpha value stored in
the pixel_buf is always 1.0, so how can i properly get the alpha value in the frame buffer?
thanks!!!
i have codes like this:
// set back color
glClearColor(0.0,0.0,0.0,0.0);
glColor4f(0.6,0.6,0.6,0.5);
// draw something
....
....
glFinish();
// now we want to get the pixels in frame buffer
glReadPixels(0,0,win_sizex,win_sizey,GL_RGBA,
GL_UNSIGNED_BYTE,pixel_buf);
....
....
code is finished,but whatever we set the params in glColor4f, the alpha value stored in
the pixel_buf is always 1.0, so how can i properly get the alpha value in the frame buffer?
thanks!!!