Forum > OpenGL
Flipping after glReadPixels
KpjComp:
--- Quote ---GL_BGR
--- End quote ---
I think GL_BGR is an extension, so some video cards might not support it. Maybe most video cards will have this option now, so it might not be an issue. :-\
--- Quote ---i hear it's slow operation
--- End quote ---
I suppose it depends on what your doing, I use it for doing image analysis and for this it seems to work pretty well. Also if you do use it, one idea is to only grab the area of interest.
gilsonalencar:
--- Quote ---When you say inverted, do you mean the R & B are swapped.
I wrote a routine here that might help ->
http://80.123.225.56/index.php/topic,17383.msg95733.html#msg95733
--- End quote ---
A 180 degrees inversion in position, not color.
KpjComp:
--- Quote ---A 180 degrees inversion in position, not color.
--- End quote ---
One idea is maybe try changing the HandleType to bmDIB, as I think there always top to bottom. Not sure if this has an effect on Linux.
Another idea is copy Scanlines at a time.
gilsonalencar:
The image file attached, shows the problem. On the left, the original graphics from OpenGLControl. On the right, the result of bitmap image (3D axis).
KpjComp:
That is strange, it's not just top to bottom, but left to right.
Are you calling this during your render while the context is still valid, and straight after you do the swapbuffers?
Navigation
[0] Message Index
[#] Next page
[*] Previous page