Jump to content
  • Advertisement

Archived

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

TM

glReadPixels & alpha channel problem

This topic is 6252 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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
so it was
yes
no
yes
watch out not all cards support destination alpha, though i believe only the very old/bad ones dont

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!