Jump to content
  • Advertisement
Sign in to follow this  
povilaslt2

OpenGL OpenGL GUI with simple GUI

This topic is 2479 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, i want to ask you for question: I create two GUI's, one is simple GUI win32 and another is OpenGL GUI,but when i close win32 GUI closes both GUI's.. but I want to close just one GUI, not both.. Where is the problem? :?

Share this post


Link to post
Share on other sites
Advertisement
Where do you create the context for OpenGl?

It may that your win Frame is the main Thread and when its closed, the Thread closes your Ogl gui too,. Or you have linked closeevent on both Frames.

Share this post


Link to post
Share on other sites
OpenGL:
int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
glutInitWindowSize (500, 500);
glutInitWindowPosition (100, 100);
win = glutCreateWindow (argv[0]);
init ();
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutIdleFunc(animate);
glutKeyboardFunc(keyPressed);
glutMainLoop();
return true;
}


closing OpenGl window with : glutDestroyWindow(win);

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!