How does default ReadPixels work?


I’m worried an ambiguous spec. about glReadPixels, glCopyTexImage2D and, glCopyTexSubImage2D.

for example, I may use eglMakeCurrent as following and both drawSurface & readSurface are double-buffering.

   eglMakeCurrent(defualtDisplay, drawSurface, readSurface, glesContext);

If I use glReadPixels, does it read from the front buffer of readSurface?
In a GL sense, it’s correct, but I think the glReadPixels of GLES reads from the current drawing surface(back buffer).
What is correct?

If the above readSurface is same as the drawSurface, how does it work?

glReadPixels reads from the back buffer of a double buffered read surface. If readSurface and drawSurface are the same it will also wait for all pending draw operations to complete before reading the buffer contents.

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