Archived

This topic is now archived and is closed to further replies.

TM

glReadPixels & alpha channel problem

Recommended Posts

TM    122
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?

Share this post


Link to post
Share on other sites
zedzeek    528
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?

Share this post


Link to post
Share on other sites
TM    122
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!

Share this post


Link to post
Share on other sites