[PyOpenGL-Users] Re: GLUT with another toolbox
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@ro...> - 2003-11-15 09:19:54
|
Hi Fulko, Normally the best place to ask questions about PyOpenGL is the PyOpenGL users list here: http://sourceforge.net/mail/?group_id=5988 As to your question(s), I'm not sure why you would want to combine GLUT (the windowing system built on top of OpenGL) and another windowing system such as Tk/GTK/Qt. It's not necessary to have the GLUT windowing system active to use the GLUT utility code (e.g. primitive shape drawing or text-drawing), in case that's what's hanging you up. In general, each windowing toolkit (GLUT/Tk/PyGame/GTK/Qt/wxPython/FxPy) offers its own widgets, which normally include an OpenGL "context" widget. It is almost always difficult and error prone (likely to crash) to mix widgets and/or windows from the different windowing toolkits, so you'd want to choose a windowing toolkit, and then use the widgets that toolkit provides. As a note, Tk support is being dropped from PyOpenGL, so choosing it as a platform for new development probably isn't a good choice. PyGame tends to be the easiest to work with for game development, as it's got lots of game-oriented functionality (strangely), but very few pre-build UI widgets. wxPython is the toolkit I personally use the most with PyOpenGL, and it has a fairly robust and extensive set of widgets. Qt and GTK have OpenGL widgets IIRC, but I've never used them. FxPy's OpenGL widget was functional last time I looked, but it's been a while. As for demo code, the OpenGLContext project has code for creating wxPython, contexts. The code is just regular wxPython code, with the wxPython OpenGL context responding to wxPython events as seen in the wxPython OpenGLContext. I've attached a minimal module that shows simple OpenGLContext use with wxPython. The code just controls the timer that rotates a red box. The raw wxPython OpenGL context works in much the same way as the wxinteractivecontext (which is a wxPython OpenGL context sub-class), you can find the demo in the wxPython demo for use of the raw widget. HTH, Mike Fulko van Westrenen wrote: >Hello, > >A few days ago I asked help with GLUT/Tk. This combination seems to be >difficult. Is there another combination with GLUT, like GTK or Qt, or a >true GLUT widget-set that I can use to make buttons,sliders,dials,etc? > >If there is such a combination, does it come with example code (I learn >through examples)? > >Thanks, >Fulko > > _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ |