Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SDL triple buffering

Tags:

opengl

sdl

Is it possible to setup SDL for triple buffering ?
If so, how to do it since SDL only have a SDL_DOUBLEBUF constant.

like image 545
Franck Freiburger Avatar asked Mar 30 '11 11:03

Franck Freiburger


1 Answers

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.

like image 138
Victor Marzo Avatar answered Nov 15 '22 09:11

Victor Marzo