The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Please clarify SDL's buffering model?
hyphz


Joined: 09 Feb 2014
Posts: 1
Hi,

Can anyone give me a clear technical statement of what buffering model SDL uses?

The fact that you perform a series of drawing operations and then call Present seems to imply double buffering, but I've seen claims on other forums that this isn't the case and you're actually just building a command list for the pipeline. I tried looking at the source code and it just seems to imply that the actual strategy used varies with the driver, and also that apparently some drivers do not support "back buffer emulation" - I presume this is the use of raw GPU RAM to hold a backbuffer?

Is it possible to choose to use triple buffering? How would this be implemented?
mattbentley


Joined: 07 Jul 2013
Posts: 72
I also would like a definitive answer to this,
as well as an outline of situations in which creating your own RenderTarget texture (with streaming texture access) and then rendering that to the Renderer is beneficial-
Thanks
Re: Please clarify SDL's buffering model?
mattbentley


Joined: 07 Jul 2013
Posts: 72
hyphz wrote:

Is it possible to choose to use triple buffering? How would this be implemented?


ps. Hyphz, you can create your own triple-buffering using a texture created with streaming access, and changing the render target to the texture, rendering to it, then changing the render target back to the Renderer and rendering the texture to it. Then RenderPresent.