Linux double buffer

are there still some trouble with the linux’s double buffer?
tnx

What kind of trouble, exactly? Double buffering works fine on all
platforms including Linux - but hardware page flipping and/or retrace
synchronization is available only on a few platforms and drivers.

On Linux, your best bet for proper page flipping is to use OpenGL.
Otherwise you need to look into other graphics subsystems than X,
since current X servers do not support hardware page flipping.

Note that hardware page flipping (and usually retrace sync, since that
usually depends on hardware page flipping) works only in fullscreen
modes on practically all platforms. Page flipping in windowed
environments is very complicated, and pretty much requires hardware
support to work well.

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Monday 06 December 2004 16.23, NighTiger wrote:

are there still some trouble with the linux’s double buffer?

What kind of trouble, exactly? Double buffering works fine on all
platforms including Linux - but hardware page flipping and/or retrace
synchronization is available only on a few platforms and drivers.

On Linux, your best bet for proper page flipping is to use OpenGL.
Otherwise you need to look into other graphics subsystems than X,
since current X servers do not support hardware page flipping.

I don’t know… I know only that with 4 png images, 6 surface, 1 TTF_fonts
in 640 x 480 in 24 bpp, I have 34 at 40 fps and I don’t understand why…

I remember that I read that the double buffer still don’t work great under
linux… I would like to use the program under windows but, just now, I don’t
have windows.
tnx

That doesn’t have much to do with double buffering. It’s a blit
performance issue that is caused by the way the CPU interacts with
the video card in a modern computer when using the CPU for rendering.
(In short, touching VRAM with the CPU basically degrades any PC to
something like a 486.)

Under Linux, things are slightly worse than on Windows for some reason
(maybe something to do with the memory type setup in the AGP GART?),
but more importantly, while you can avoid the problem to some extent
by using hardware accelerated blits on Windows, that’s practically
not an option on Linux, unless you use OpenGL.

There is an OpenGL backend in the works. (Almost finished, unless
there are any major issues we’ve overlooked…) For now, you might
find the glSDL wrapper (on my site) useful, or you can use OpenGL
directly.

Using OpenGL directly is the way to go if you rely heavily on alpha
blending and/or need transformation and blending effects that the SDL
API doesn’t support, and high frame rates are required. If you can’t
motivate OpenGL properly, you should probably use the SDL 2D API, or
support both, since relying entirely on OpenGL will most probably
make your application unusable without hardware accelerated OpenGL.

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Tuesday 07 December 2004 03.18, NighTiger wrote:

What kind of trouble, exactly? Double buffering works fine on all
platforms including Linux - but hardware page flipping and/or
retrace synchronization is available only on a few platforms and
drivers.

On Linux, your best bet for proper page flipping is to use OpenGL.
Otherwise you need to look into other graphics subsystems than X,
since current X servers do not support hardware page flipping.

I don’t know… I know only that with 4 png images, 6 surface, 1
TTF_fonts in 640 x 480 in 24 bpp, I have 34 at 40 fps and I don’t
understand why…

I remember that I read that the double buffer still don’t work
great under linux… I would like to use the program under windows
but, just now, I don’t have windows.
tnx