Glreadpixels returns garbage

Hi, I’m having a problem with onscreen and offscreen (double buffered) rendered images under Windows XP.

Whenever a window partially, or entirely overlaps the image glReadPixels returns black pixels, or often just garbage of those areas obscured.

Why does this happen? I thought glReadPixels returns pixels straight from the hardware (thought thats why it was known to be slow). If thats true, could it be a nasty trick from my cards manufacturer to speed up glReadPixels (i.e. not rasterize pixels that are underneath other windows)?

Any alternatives to glReadPixels? Or maybe I have to play some tricks on my window device context?

[b]Hi, I’m having a problem with onscreen and offscreen (double buffered) rendered images under Windows XP.

[/b]
Just because you use double buffering does not mean it’s off-screen rendering. You have to use pbuffers to make use of off-screen rendering.

[b]
Whenever a window partially, or entirely overlaps the image glReadPixels returns black pixels, or often just garbage of those areas obscured.

[/b]
Reading back pixels that fail the pixelownership test results in undefined behaviour. This is defined by the spec.

[b]

Any alternatives to glReadPixels?
[/b]
No, not really.

I see, makes sense.

Is there a way to reclaim these pixels?

Can I trick Windows not to own the clipped areas, or make it believe the pixels are owned by the OpenGL plane?

No and no from what I know.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.