- October 3, 2013 at 6:14 am #31505
We use the PVR SDK to run our 3D layer. The top layer consists of GUI with elements composed from the platform SDK. There are instances where I run both layers and some where I don’t need 3D rendering happening. For such an instance, I am sure shutting down and restarting the 3D layer is inefficient. Our renderer will not be rendering anything, but currently simply returns true.
I just want to know if not calling swapbuffers have any consequences (good and bad) ? (Ofcourse I need to change PVR code for this !!)October 4, 2013 at 10:21 am #38075
If the image doesn’t need to update, then you shouldn’t update it. Avoiding unnecessary processing is always a good idea 🙂
However, you need to be cautious of how the OS detects an application as being unresponsive. For example, Android will kill an application if it’s not handled user input events for a while. This means not returning from our RenderScene() function on Android will cause the application to be killed.
One way to resolve this is to handle the swap yourself, but allow the RenderScene function to continue returning regularly (so the shell can continue to process input events). This can be done by setting PVRShellSet(prefNoShellSwapBuffer, true) during your application setup. Once this flag is set, you will have to call the swap yourself each time you want to render a new frame.