Another opengl issue/question


i searched the forum but i didn’t find any reference to this specific problem…

I have a window with multiple tabs, 2 of which contain opengl components and some which don’t. Everything is fine until i try to switch directly between the 2 opengl tabs - nothing is rendered in the component that i switch to. (though renderOpengl appears to be called - i’m calling repaint on a timer). However, if i move the window, or make it partially hidden at this point, it suddenly fixes itself. The problem also doesn’t occur if i switch from an opengl tab, to a non-gl tab, and then to the 2nd gl tab.
I’m guessing theres an issue in the (de)activation of the 2 contexts, but from my limited debugging of the problem, i couldn’t see anything obviously wrong.

Any ideas?


Not sure… Maybe try calling resized() on the gl component when the tabs change?


i quickly tried adding a call to resized() but it didn’t help :frowning:
In fact, just be sure it wasn’t a timing issue, i called it repeatedly from my timer, if isShowing() returned true. Still didn’t help. Not sure what the difference in the codepath between moving/resizing the window and calling resized() directly is.

It seems that the new context is definitely getting created as expected, and i’m getting i’m getting the appropriate event to tell me that.
Will try to debug it a little more this evening…