If you use an emulated mode with SDL under DGA, SDL fails to clear the
screen, so you end up getting garbage in the unaccessable parts of the
screen, e.g. if you initialize 640x480x8bpp fullscreen mode under DGA, line
0 - 40 and line 440 - 480 contains garbage. Maybe put a SDL_FillRect() in
SDL_SetVideoMode to fix the problem?
SDL_DOUBLEBUF is broken when using DGA. I’ve tested this several ways.
Initialize SDL_SWSURFACE: Code works fine, smooth, etc.
SDL_SWSURFACE | SDL_DOUBLEBUF: Flickering starts.
SDL_HWSURFACE: Real bad flickering (this is also not right, since
SDL_Flip() is supposed to wait for the vertical refresh. I reported this
earlier, but you guys didn’t agree that You should first wait for
vertical refresh and then update the screen - I’m sure it will fix
this problem)
SDL_HWSURFACE | SDL_DOUBLEBUF: Same as in 2) - Flickering starts.
I’ve looked at other demos and eyecandy written for SDL and noticed
everybody stays away from using SDL_DOUBLEBUF and SDL_HWSURFACE. Change
their code and it breaks. Same happens to all my code.–
If you use an emulated mode with SDL under DGA, SDL fails to clear the
screen, so you end up getting garbage in the unaccessable parts of the
screen, e.g. if you initialize 640x480x8bpp fullscreen mode under DGA, line
0 - 40 and line 440 - 480 contains garbage. Maybe put a SDL_FillRect() in
SDL_SetVideoMode to fix the problem?
This should already be done. Can you post a small test program that shows
both problems?
Thanks!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software