SDL OpenGL windows resize on MacOS X

I’m trying to support window resizing on MacOS X when using SDL 1.3 and OpenGL. No matter what I try, the window gets filled with garbage (or becomes blank) and no further drawing occurs in it after I resize it.

I read something in another thread about how the OpenGL context needs to be “updated” for a window resize to work on the Mac. I’m not sure how this “update” would be done.

http://forums.libsdl.org/viewtopic.php?t=6613&sid=fdde569e11c302a7142c1bcc481bc377

Is anyone else out there using OpenGL with SDL on a Mac? If so, do you have window resizing working? If so, what did you do?

-Vern

Oh, and FYI, the fix by “Xecutor” in the other thread posted above is for SDL 1.2:

https://ssl.keshi.org/projects/ps3/trac.fcgi/browser/vendorsrc/SDL/release-1.2.11/src/video/quartz/SDL_QuartzWindow.m?rev=24

I have no idea what I’d change in SDL 1.3 to have the same effect.

I’ve had success with essentially reinitializing all my SDL/OpenGL
state variables (and rebuilding textures) every time I receive a
resize event from the event queue. Granted, I haven’t tried this on
1.3, but I think it’s worth a shot.

JohnOn Fri, Oct 22, 2010 at 1:11 PM, VernJensen wrote:

I’m trying to support window resizing on MacOS X when using SDL 1.3 and
OpenGL. No matter what I try, the window gets filled with garbage (or
becomes blank) and no further drawing occurs in it after I resize it.

That sounds like overkill to me, if there is a source-level fix for this as indicated in the above thread for SDL 1.2 I’m hoping for a similar solution for SDL 1.3. In the thread above, Xecutor posted a fix for SDL 1.2 that is just a single line added to an SDL source code file. I just don’t know what the equivalent fix for SDL 1.3 would be.