Fastest video setting

what are the fatest video setting for sdl, eg SDL_HWSURFACE or
SDL_SWSURFACE etc?

Neither and both. It depends on what you need.
If you are only writing to the surface, hardware surfaces is what you want.
If you are both writing and reading, you need to use software surfaces because
its always slower to read from video memory then it is to read from system
memory.

If you are only writting to it, I suggest you also use SDL_DOUBLEBUF which
allows SDL to double buffer if it can, which usally causes smoother graphics.On 03-Aug-2002, Andrew O’Neil wrote:

what are the fatest video setting for sdl, eg SDL_HWSURFACE or
SDL_SWSURFACE etc?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Patrick “Diablo-D3” McFarland || unknown at panax.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids, we’d
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." --Kristian Wilson, Nintendo, Inc, 1989

How much faster would SDL_DOUBLEBUF be? My game reads from the surface, but i
can easily modify it if double buffering makes it quite a bit smoother.

Patrick McFarland wrote:> Neither and both. It depends on what you need.

If you are only writing to the surface, hardware surfaces is what you want.
If you are both writing and reading, you need to use software surfaces because
its always slower to read from video memory then it is to read from system
memory.

If you are only writting to it, I suggest you also use SDL_DOUBLEBUF which
allows SDL to double buffer if it can, which usally causes smoother graphics.

On 03-Aug-2002, Andrew O’Neil wrote:

what are the fatest video setting for sdl, eg SDL_HWSURFACE or
SDL_SWSURFACE etc?


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Patrick “Diablo-D3” McFarland || unknown at panax.com
"Computer games don’t affect kids; I mean if Pac-Man affected us as kids, we’d
all be running around in darkened rooms, munching magic pills and listening to
repetitive electronic music." --Kristian Wilson, Nintendo, Inc, 1989

How much faster would SDL_DOUBLEBUF be? My game reads from the surface, but i
can easily modify it if double buffering makes it quite a bit smoother.

It won’t make it faster, it will just prevent tearing on some platforms.

If you’re having performance problems, try SDL_SWSURFACE instead of SDL_HWSURFACE.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

If you’re having performance problems, try SDL_SWSURFACE instead of
SDL_HWSURFACE.

Hmmm, I get the same fps with both. And my fps isn’t the greatest (50fps for a
pretty simple 2D 640x480x16 game). I’m sure many things contribute to that at
this point, but right now I’m curious about SDL_HWSURFACE.

The docs say SDL_HWSURFACE will use video->video blitting and that it is
accelerated if possible. But I’ve also read here and there (most recently
reading about glSDL) that SDL apps need OpenGL to take advantage of hardware
accelerated blitting.

Is this OS and/or video card dependent? I’m using Linux with a 16MB Riva TNT2
M64 and the latest nvidia drivers installed and running properly (I get about
200 fps in Tuxracer at 640x480x16). If I reduce my game to 320x240x8, then I
get about 220 fps. Which I’d be perfectly fine with except I can’t get it to
display at a decent size then.

MattOn Saturday 17 August 2002 01:17 pm, Sam Lantinga wrote:

The docs say SDL_HWSURFACE will use video->video blitting and that it is
accelerated if possible. But I’ve also read here and there (most recently
reading about glSDL) that SDL apps need OpenGL to take advantage of hardware
accelerated blitting.

You don’t need OpenGL to take advantage of hardware accelerated blitting
you need OpenGL to take advantage of 3D power of your card. And current
video cards are oriented on 3D graphics…

Is this OS and/or video card dependent? I’m using Linux with a 16MB Riva TNT2
M64 and the latest nvidia drivers installed and running properly (I get about
200 fps in Tuxracer at 640x480x16). If I reduce my game to 320x240x8, then I
get about 220 fps. Which I’d be perfectly fine with except I can’t get it to
display at a decent size then.

Matt

Yes this is OS dependent (it also depends on windowed mode/fullscreen
mode) And be sure that 200fps is far more then your monitor can handle :slight_smile:
Krata