Quote Originally Posted by mustaf

So, is there any implementation where we have double buffered pbuffer?I have some question regarding the double buffered pbuffer

1>Can we specify which buffer of pbuffer is used for writing to pbuffer and which for reading from pbuffer?
2>Who takes care of the synchronization issue i.e. whether simultaneously reading and writing is possible.
3>Do i need to explicitly call eglswapbuffers on pbuffer to transfer the content from back buffer to front buffer?
Even if there were an implementation that used double buffered pbuffers for whatever reason (though I can't think of any right now), that would be completely hidden. It would behave as if single-buffered.

What is the effect if i call eglswapbuffers on single buffered pbuffer?My opinion is it is a NOP, but just want to confirm.I have verified in the rasteroid (Hybrid) exmaple that it is a NOP.
EGL spec, section 3.9.1: "If surface is a single-buffered window, pixmap, or pbuffer surface, eglSwapBuffers has no effect."

In case of single buffered pbuffer, how is the synchronization happen i.e. we are not reading and writing to/from pbuffer simultaneously.
The same way it happens for window surfaces: a read operation from the surface causes a flush of all rendering commands to that surface. I.e. it will block until all rendering has been completed.