glReadPixels & alpha channel problem

Started by
3 comments, last by TM 22 years, 7 months ago
I''m trying to read RGBA colors from the frame buffer using glReadPixels, but all my alpha''s are 255. Anyone encountered this problem before?
Advertisement
does your card support destination alpha?
is your window created with destination alpha?
are u sure the alpha values of the pixels u read aint 255?
yes
yes
yes
Shit, got it!

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_ALPHA | GLUT_DEPTH | GLUT_STENCIL);

instead of

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_STENCIL);

Damn!
so it was
yes
no
yes
watch out not all cards support destination alpha, though i believe only the very old/bad ones dont

This topic is closed to new replies.

Advertisement