Minimal SDLLoop using SDL_GL_Swapbuffers freezes gfx

Hi,

I’ve fixed that problem,
you can download update & diff here:

http://activekitten.com/files/sdl_dx_patch.zip

I do not know why developers of SDL did not commit that patch to CVS.
And I can’t commit to CVS as I’m not SDL developer.

May be I should open new site called “unofficial SDL updates” ?–
Best regards,
Dmitry Yakimov, ISDEF member
ActiveKitten.com

I’ve fixed that problem,
you can download update & diff here:

http://activekitten.com/files/sdl_dx_patch.zip

How does this diff fix a freeze in GL_Swapbuffers?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hi,

I was wrong, my patch does not fix that.
The root of the problem is the same as in case of freeze while 2D
hardware page swapping. If we execute SwapBuffers without any delay
between calls, OpenGL driver should wait until hardware completes
previous frame. Driver is executed in ring0, so when it waits it
freezes all the system :slight_smile: It’s better to wait in user code rather
than in driver code. That’s why I wrote the patch for the same
behavior in 2D.> How does this diff fix a freeze in GL_Swapbuffers?

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment


Best regards,
Dmitry Yakimov, ISDEF member
ActiveKitten.com