gultInit() crashing

Hey,

I'm having an issue with calling Glut.glutInit(). I have a form with the SimpleOpenGLControl on it and in the control's load routine, I call Glut.glutInit(). This is all fine and dandy, but when after I close that form and make a new instance of it, the application crashes.

Ex:
I have a form with navigation stuffs on it and one of the other forms it can open has the opengl control on it. So, navForm makes a new oglForm and it opens and all is well. Then I close the oglForm and use the navForm to make a new oglForm. This time when it gets to Glut.glutInit(), it crashes the application.

Maybe I'm forgetting to do something??

Thanks,

Mike

Try hooking the form's

Try hooking the form's Closing event and call DestroyContexts() and glutExit().

------
OpenTK

I don't have either of those

I don't have either of those as valid function calls Arf

protected override void OnClosing(CancelEventArgs e)
{

Glut.glutExit();//doesn't exist Arf

}

You are right, there's no

You are right, there's no GLUT doesn't specify an exit function (yet another weakness compared to GLFW or SDL).

However SimpleOpenGlControl does have a DestroyContexts function in the latest version (2.1).

Try updating to that, maybe this will help.

------
OpenTK

Theme by La Boite a site | Powered by Drupal