Reputation: 28428
Is it possible to setup SDL for triple buffering ?
If so, how to do it since SDL only have a SDL_DOUBLEBUF
constant.
Upvotes: 6
Views: 2446
Reputation: 731
You have to activate triple buffering in the driver configuration, not in SDL.
For example, on linux with an nVidia graphics card you have to enable the X.Org TripleBuffer option:
Option "TripleBuffer" "1"
When you use SDL double buffering with vsync and hardware surfaces then the driver will use triple buffering if it supports it and it is enabled in the configuration.
Upvotes: 3
Reputation: 4053
On Mac OS you get triple buffering when you order double-buffering. (3rd is for OS only).
On other OS's it may be possible to change configuration of gpu drivers to have 3rd buffer. But 3rd will be managed by gpu driver, and thus not accessible to you.
Upvotes: 1