I have a cross-platform code base (iOS and Android) that uses a standard rendering setting for texture. Each frame (after initialization) has the following sequence:
- glBindFramebuffer texture-bound framebuffer
- Check out some things.
- *
- glBindFramebuffer standard framebuffer (0 on Android, usually 2 on iOS)
- glBindTexture of the texture that was the color binding to the first framebuffer
- Render using related texture
On iOS and some Android devices (including the emulator), this works fine and as expected. On other devices (currently seated in front of the Samsung Galaxy Note 4.0.4), rendering the second phase using texture looks βnervousβ. Other animations continue to run at 60 frames per second on the same screen as the jumping bits; my conclusion is that changes in the target texture are not always visible in the second render pass.
To test this theory, I insert glFinish () in the step marked * above. On all devices, this now has the correct behavior. Interestingly, glFlush () does NOT fix the problem. But glFinish () is expensive, and I have not seen any documentation that suggests this is necessary.
So, here is my question: what should I do when I finish rendering the texture to make sure that the latest texture is available in subsequent transfers?
source share