aperson
08-17-2012, 02:32 AM
How would I implement triple buffering? (https://en.wikipedia.org/wiki/Multiple_buffering#Triple_buffering)
From a bit of searching, I know that a framebuffer object can be used for a buffer.
Triple buffering implies that one back buffer is always being rendered to, and the other back buffer is done rendering.
I imagine (at least part of) the code looks something like:
while true
render to bufferA
swap bufferA and bufferB
How does the swap with the front buffer happen? If you look at https://en.wikipedia.org/wiki/File:Comparison_double_triple_buffering.svg , the copying (i.e. swap with front) happens at the same time asthe rendering. Is multithreading required?
From a bit of searching, I know that a framebuffer object can be used for a buffer.
Triple buffering implies that one back buffer is always being rendered to, and the other back buffer is done rendering.
I imagine (at least part of) the code looks something like:
while true
render to bufferA
swap bufferA and bufferB
How does the swap with the front buffer happen? If you look at https://en.wikipedia.org/wiki/File:Comparison_double_triple_buffering.svg , the copying (i.e. swap with front) happens at the same time asthe rendering. Is multithreading required?