opengl framebuffer question.
Is there any way to setup OpenGL, that glReadPixels returns 16 bit (5:6:5) bitmap. I really like to read/paint pixels in the framebuffer, after my scene rendered.
Thanks,
bernie
Edited by - bernie on 2/14/00 1:18:30 PM
No, you cannot read back 5:6:5 pixels. Instead, read back 8:8:8 pixels and convert them. But a few warnings:
- glReadPixels is s-l-o-w!
- Drawing pixels manually to the card after rendering kills performance, since you break the rendering pipeline
My suggestion is to render to a 24-bit or 32-bit texture, do a glTexImage2D(), and draw a polygon with it.
DaBit.
- glReadPixels is s-l-o-w!
- Drawing pixels manually to the card after rendering kills performance, since you break the rendering pipeline
My suggestion is to render to a 24-bit or 32-bit texture, do a glTexImage2D(), and draw a polygon with it.
DaBit.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement