[SDL] problem with SDL_SwapBuffers()

Mikael Eriksson mikael_miffe_eriksson at yahoo.se
Fri Jun 30 06:52:25 PDT 2006


On Tue, Jun 27, 2006 at 12:57:28PM +0200, Davide M3xican Coppola wrote:
> Hi,
> 
> 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?

I think opengl only renders when it needs to. Try calling glFinish()
before SDL_SwapBuffers() and check if it's faster.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060630/4a7de645/attachment.pgp 


More information about the SDL mailing list