Jump to content
  • Advertisement
Sign in to follow this  
zhao_haijun

everyone help me, I can't read the alpha values

This topic is 4488 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

When i use two rgba texture to blend,then i want to read the result,but i can't read the alpha value,my code like this: glReadPixels( 0, 0, 720, 576, GL_BGRA_EXT, GL_UNSIGNED_BYTE, buffer);

Share this post


Link to post
Share on other sites
Advertisement
You cant, thats because there is no alpha component in framebuffer.. it blends with existing content, framebuffer is only RGB.

Share this post


Link to post
Share on other sites
If you want to read alpha back, make sure you ask for an alpha channel when creating the pixel format. You usually don't get one if you don't ask for one.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!