View Full Version : glReadPixels

07-07-2003, 05:11 AM
Does it imply a glFinish?

07-07-2003, 05:53 AM
Somehow. If the call returns the data is guaranteed to be in your buffer.
You don't need to send glFinish before or after, if that's your concern.

07-07-2003, 06:18 AM
Originally posted by Relic:
If the call returns
I must say I don't know how to interpret this.

07-07-2003, 07:05 AM
Interpret it as: "At the time the glReadPixels call returns back from the OpenGL driver, the buffer specified by the pixels parameter will contain the appropriately stored and transfered pixel data generated by the OpenGL calls issued before that glReadPixel call."
It's behaviour is similar to a glFinish in that respect.
Most importantly you don't need to sync it vs. other OpenGL calls in the same thread.

07-08-2003, 05:51 AM
Thanks for the clarification. My reading of your statement was that there was a possibility that the call would not return (at all! http://www.opengl.org/discussion_boards/ubb/biggrin.gif).

07-08-2003, 11:46 PM
Originally posted by Lev:
Does it imply a glFinish?

Yes. Quote from the specs:
"Commands are always processed in the order in which they are received, although there may be an indeterminate delay before the effects of a command are realized. This means, for example, that one primitive must be drawn completely before any subsequent one can affect the framebuffer. It also means that queries and pixel read operations return state consistent with complete execution of all previously invoked GL commands."