Imagination PowerVR SDK Blog

Offscreen rendering and eglSwapBuffers


Recently, I found different results using my offscreen rendering code on PC and TI’sOMAP. Here is my initial post here

Then I turned to TI for help regarding this issue. What they said is that


"Since the eglSwapBuffers() function is getting invoked automatically as part of the PVRShell, the only way we have initially to fix this is to have logic implemented to prevent the eglSwapBuffers() getting invoked for that particular frame.These are the instances in source code where its getting invoked, you should be able to make some top level changes that prevent eglSwapBuffers() being invoked for a particular frame. <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Shell/API/KEGL/PVRShellAPI.cpp:471:     eglSwapBuffers(gEglDisplay, gEglWindow);

Shell/API/KEGL/PVRShellAPI.cpp:721:             bRes = (eglSwapBuffers (gEglDisplay, gEglWindow) == EGL_TRUE);"

Based on my understanding if I render the content to FBO, The PVRshell will handle the offscreen automatically and I do not need to control the eglSwapBuffer for this goal. On my PC test, I did not change anything and I can save the special frame to external file without displaying it on screen. But why I have to do extra controlling on TI's OMAP to do that?


Thank you very much,