View Full Version : clubbing glut and gtk
04-20-2002, 10:54 PM
I am an engg. student. we do have a project session in our syllabus. i am supposed to do my project in opengl under linux platform using glut library. the gui is to be done in either glade or gtk. so far i couldn't club glut and gtk together. so if any can help me out of this mess, it would be helpful for me. i would like to know how i can bring a glut window in a gtk designed window...
I do not think you can do that unless you rewrite the GLUT library. You can create windows with OpenGL support and GUI stuff but it is not possible to mix them with GLUT. If you are using GLUT does it take over the message loop and how would you add callbacks for your GUI?
Here is some information about OpenGL+Motif perhaps can they help. They are talking about using OpenGL windows with different color depth than the screen but I do not think that is possible in linux. The other information should be valid.
Mark Kilgard articles: http://toolbox.sgi.com/linux/documents/OpenGL/overviews.html#OglXIn
OpenGL on SGI manual: http://toolbox.sgi.com/linux/documents/OpenGL/overviews.html#OGLSGS
04-21-2002, 01:34 AM
like the previous poster said you won't be able to use gtk and glut together.
The only way i know to use gtk and opengl i told you in your other thread in the advanced forum.
So you have to decide if you want glut or gtk. If you want gtk just forget about glut, because you do not need it (glut is for window creation and callback handling, which shall be portable). But if you use gtk and gtkglarea it is at least possible to have tis on linux and win32. And i would say that you better forget motif, too, it just looks to ugly (but in the end it is all your choice).
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.