Documentation
¶
Overview ¶
Sync fence example using OpenGL ES 3.0.
Demonstrates the ES3-only FenceSync/ClientWaitSync mechanism for CPU-GPU synchronization. In ES2 the only way to guarantee GPU completion is the heavyweight glFinish. ES3 fence syncs let the CPU poll or block until a specific point in the GPU command stream has been reached.
The example issues a clear + draw, inserts a fence, then waits for the GPU to finish processing those commands. This pattern is essential for safe buffer mapping (MapBufferRange) where the CPU must not read data that the GPU is still writing.
This program must run on an Android device with OpenGL ES 3.0 support.
Click to show internal directories.
Click to hide internal directories.