I'm working on some ES 2 code and setup is done using EGL and I want to enable triple buffering.
Is this not handled by OpenGL at all? Not in EGL or any other spec?
Is it implied in the eglSwapInterval API?
I'm working on some ES 2 code and setup is done using EGL and I want to enable triple buffering.
Is this not handled by OpenGL at all? Not in EGL or any other spec?
Is it implied in the eglSwapInterval API?
Double buffering is a feature of the underlying OS (wglSwapBuffer etc.) and it seems that triple buffering is not really supported. Thought you can always implement it yourself, something like this (pseudo-code idea, looks more like quad-buffering ):
Display: Front
Ready for swap: Back
Render to: my_own_framebuffer (based on internal double buffering my_buffer1,my_buffer2)
...
render scene
...
wglSwapBuffers(); // back->front
copyBuffer(my_own_framebuffer,back);
my_own_framebuffer = my_own_framebuffer==my_buffer1 ? my_buffer2 : my_buffer1;
When you already have a more complex post-processing chain, then the final post-processing step could directly render to the back buffer, saving a copy operation (thought copy should be really fast and should not block other buffers).
Like L.Spiro mention. You can create an aditional FrameBuffer object and use those as your extra buffers.