I would love to design around it but the crux of the issue is this.
1) I use MaxGUI with 3 canvases (and therefore GLSharedContext()) for the setup portion of the application. The canvases are used for 3 custom GUI controls that can't just be replaced with something more standard.
2) All of the setup from that GUI is used to prepare data structures to be used for a 3D display. So if I can't switch to minib3D it doesn't really do anything, and likewise if I can't do the setup then the 3D has no information to work with.
3) None of the graphics used in the 2D are re-used in 3D. All of the 2D are thumbnails or just images needed for the GUI elements (buttons and such). When switching to 3D I need to unload all of that and re-load the user images in higher resolution for use as textures in 3D. I need to keep very tight control over what is loaded into openGL as I'm basically using all available VRAM to display onscreen items, when openGL handles too much there are hicups as it loads/unloads images which can be avoided by forcing it to load when I'm not busy drawing things.
4) The only reason I need to turn off shared contexts at all and manually unload everything is to prevent a crash on one computer used by one of my testers. A mac Pro with both an ATI and NVIDIA graphics card. We've tried to eliminate the chance that it's a software conflict by shutting off everything else he's running that could be in any way related to the graphics system. We've paired down to 1 monitor and with that tried both cards and it still crashes. Doesn't crash on any of the 3 other macs I've tested it on or 4 PCs, so it could be just him but he is my main tester. He doesn't have any problem with the GUI with shared contexts OR with the 3D, it's switching from the GUI to 3D that causes a crash when graphics try to initialize. The screen goes black (like it should) then the program just closes, no crash report.
If I could find a way to keep him from crashing without disabling the shared contexts when switching that would be much better but I'm all out of ideas there...
|