everyone help me, I can't read the alpha values
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);
You cant, thats because there is no alpha component in framebuffer.. it blends with existing content, framebuffer is only RGB.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement