[…] Is the performance gained, if any, using ony hardware
surfaces
(sprites, tiles, etc) worth the trouble to avoid such problems (or
worth
using hardware surfaces for that, anyway)? Because I tested using
only
software surfaces (changed the flags on initialization, duh :P)
and I had
no video problem on changing from my full screen app to Windows
and
coming back.
I did some performance tests a while back on my WinXP laptop, which
has an NVidia GeForce2 Go. Hardware-to-hardware blits were on
average 4 times faster than software-to-software blits, and over 9
times faster than blitting from software-to-hardware. If you use
software surfaces only, SDL will not sync to vertical blank, so
you’re also likely to experience tearing. Hardware page flipping
(HWSURFACE | DOUBLEBUF) is virtually free, but when your main
surface is a SWSURFACE, SDL has to blit the main software surface to
the screen at some point, which on my machine took up to 8ms (in
windowed mode). So yes, use hardware surfaces when you can Of
course, YMMV.–
Matthijs Hollemans
All Your Software
www.allyoursoftware.com