#6 GLWidget doesn't survive being unparented/unrelaize


In GTK the window of a widget is usually created when it is "realized" and destroyed when it is "unrealized". This can happen more than once during the livetime of the widget itself. For instance when setting the widget's parent to zero its window gets destroyed. This on turn happens when using some kind of docking library. GLWidget doesn't handle this case. It still tries to use the old window that is already destroyed.

To fix this I recreated the IWindowInfo from OpenTK in OnRealize and restructured the code to separate the creation of the window info from the creation of the graphics context. I changed a lot of the code in GLWidget to make this work. There are still some problems with the win32 implementation because OpenTK is currently not able to use one render context with multiple user provided windows (SetPixelFormat is not being called). I have a workaround but it is a bit hacky though.

Are you still actively maintaining GLWidget? In this case I can send you my changes. Otherwise I just create my own private fork.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks