Drawing on multiple Canvases messes up Graphics

BlitzMax Forums/MaxGUI Module/Drawing on multiple Canvases messes up Graphics

shinkiro1(Posted 2010) [#1]
I am programming a map editor with 2 canvases in the main view.
Everything( nearly everything works fine) until I create a new TOOL Window which also has a canvas while the whole main window gets disabled.

When I return from the TOOL window to the main window my graphics get messed up( they become complete white), however this seems to happen more randomly but at least every second time I can reproduce this problem.

Using Max2D OpenGL Driver on Ubuntu 10.04 with bruceys gtk mod


d-bug(Posted 2010) [#2]
Have you called GLShareContexts() before creating the the canvases? I don't know if it has any effect on GTK but this solved all the render issues I had on OSX.

Last edited 2010


shinkiro1(Posted 2010) [#3]
d-bug, you're a genious ^^
By just calling this function it solved my problem immediately.
This should definetely be in the docs.

Thanks a lot


ima747(Posted 2010) [#4]
It used to be on by default (1.28 an earlier perhaps?) but was disabled because it can cause some conflicts on older or crappy graphics cards if I recall correctly. Just something to keep in mind...

Personally I force everything to OpenGL regardless of platform and always throw this at the top of the code, intel graphics and legacy systems be damned. But I tend to use other stuff as well that would cause problems on those systems so they're dead to me regardless :0)


shinkiro1(Posted 2010) [#5]
It's just an editor so it's not that important that it will run on every machine.
As said above, this should be in the docs( maybe in CreateCanvas() ) as it is very frustrating if you don't know it.


Richard Betson(Posted 2010) [#6]
@d-bug
Thanks for this little nugget. :)

Just ran across the same problem within one window using multiple canvas. It too is an editor type application.