wxMax multiple graphics contextsBlitzMax Modules Forums/Brucey's Modules/wxMax multiple graphics contexts
| I'm (still!) trying to improve compatibility on the dreaded Intel gfx chipsets by trying to only have 1 graphics context at anyone time. The only time there's 2 is when an animation properties dialogue is open. So what I've tried doing is destroying the preview canvas I have, and then creating the dialogue so only 1 context is ever open. This seems ok, except that I'm getting random crashes in release mode when opening the dialogue. Just "TimelineFX has stopped working" so not much in the way of clues.|
Strange that debug works fine. Anyway, just wondering if anyone's got any ideas what might be causing it.
The other idea I'd like to try is this: would it be possible to make the the dialogue use the graphics context of the preview canvas so that an extra context doesn't have to be created? I don't mean just draw to the preview canvas in the background, but somehow move it temporarily into the animation dialogue.
Any other ideas welcome!
| Ok, I think I have the animation dialogue using the same graphics context now, I just did:|
dialog.canvas._graphics = win.PreviewPane._graphics TwxGLGraphics(TMax2DGraphics(dialog.canvas._graphics)._graphics)._context = dialog.canvas
and then switch it back again after the dialog closes. That seems to work ok, with the exception that sometimes when the editor has just been opened the dialogue won't appear after the first few attempts, then it does. It may have always been like that though, I just never noticed... a bit strange.
Anyway, we'll shall see what the intel users say about it :)
Another thing while I was doing this, I updated wxGLMax2D as it was a bit out of date compared to the current BRL version. There were some changes to the way textures are removed from the card which were making a difference if you were trying to recreate graphics, it was causing white textures to appear. Here's an updated version: