- May 12, 2009 at 11:37 am #29794
I don’t want framebuffer to be shown on display. In my algorithm what is seen on display isn’t relevant and I want to make it as fast as possible so how can I stop it wasting resources on swapping buffers? Thanks.
-hnykMay 27, 2009 at 4:28 pm #33043
Assuming you are using the PVRShell abstraction layer with an API such as OpenGL ES 2 then you will have to look for where glSwapBuffers is called in this code. For instance, in PVRShellAPI.cpp::PVRShellInit::ApiRenderComplete(). You can remove this call to stop display.
Alternatively, if you know the number of frames you require n then you could set the swap interval by calling setSwapInterval(n( or larger)) in the PVRShell::InitApplication() function. This means swaps will occur only every after every n times RenderScene() is called during the running of your program. You could use this to update the frame infrequently, but regularly during runtime or not at all. Passing 0 to this function should disable vetical syncing which could improve performance by itself.
Unless glSwapBuffers is called then there is nothing to tell the GPU that the render has finished, so you will have to use glReadPixels in order to flush rendering operations at the program finish. I’m assuming you will do this anyway in order to retrieve data.