[SDL] problem with SDL_SwapBuffers()

Davide "M3xican" Coppola dmc at dev-labs.net
Thu Jun 29 09:02:02 PDT 2006


Davide "M3xican" Coppola wrote:
> I have a problem with SDL_SwapBuffers() in a SDL/GL game,
> this function requires about 9~10 ms. with a resolution of 800x600
> and 15~16 ms. with a resolution of 1024x768, but I have tested
> other SDL/GL programs/games (Nehe demos, Supertux, etc...) and
> usually it requires 1~5 ms. with these resolutions.
>
> Does someone knows a possible cause that can generate this problem?
>
> If this can help, I can post the screen init and surface loading code
> in my next message.
>   
I have solved the problem using a fixed delay (20 ms. -> 50 FPS),
now the GL_SwapBuffers() requires 0~1 ms.

I don't know the reason, but I hope this could help someone else
with the same problem.

Cya.

-- 

Davide "M3xican" Coppola

--------------------------------------------------------------------
email:  dmc at dev-labs.net
homep:  http://dmc.dev-labs.net
ICQ:    104241710
MSN:	bad_hangover at hotmail.it

Don't use IE and OE! 
Download FireFox and ThunderBird: http://www.mozilla.org/
--------------------------------------------------------------------





More information about the SDL mailing list