[SDL] Flickering and division by zero in Windows
Ryan C. Gordon
icculus at icculus.org
Sun Feb 25 18:31:21 PST 2007
>> I'm writing an SDL application but am having trouble with flickering.
>> I tried all combinations of flags (SDL_SWSURFACE, SDL_HWSURFACE,
>> SDL_DOUBLEBUF, SDL_NOFRAME, SDL_FULLSCREEN etc.) but with no luck.
>>
> What about this one, any thoughts?
Is it possible that you're drawing to one buffer and SDL_gfx is drawing
to the other? Try removing SDL_DOUBLEBUF and see if it makes a difference.
Also, if you need to touch pixels directly, SDL_HWSURFACE is probably
going to slow you down...that's meant to be a speed boost if you're just
doing SDL_FillRect() and SDL_BlitSurface() and the hardware supports it,
but if you have to access the framebuffer directly (like SDL_gfx
probably does), you're probably taking a speed hit here as it has to
keep locking and unlocking the surface.
--ryan.
More information about the SDL
mailing list