Skip to main content
GameDev.net gamedev.net
🔒 Locked

glReadPixels & alpha channel problem

Started by TM Sep 5, 2001 at 10:47 AM 3 replies 1.2k views
Original Post
TM
TM
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?
zedzeek
zedzeek
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?
TM
TM
yes
yes
yes
TM
TM
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!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.