[PyOpenGL-Users] Changes in glutCreateMenu from v 2.0.1 to 3.0.0 ?
Brought to you by:
mcfletch
From: Neal H. <nh...@do...> - 2008-01-08 20:53:50
|
Hi, I tried to find the answer myself -- I really did -- but now I seem to be at a dead end. This worked in 2.0.1.09.dfsg.1-0.3 on ubuntu feisty: def handleSelect( self, index ): """Handle menu item selection by calling the handler specified in the menu description.""" try: name, fn = self.dispatchTable[index] except: return if callable(fn): fn() def create_menu( self, items ): """Create the open GL menu based on the menu descriptor in 'items'.""" id = glutCreateMenu( self.handleSelect ) ... but not in 3.0.0 on ubutnu gutsy. On that last line ("id = glutCreateMenu...") I get: Traceback (most recent call last): File "./viewframe", line 21, in <module> app = FrameViewer( fd=framedata ) File "../OpenGL/GLFramework.py", line 90, in __init__ self.init_GL() File "../OpenGL/GLFramework.py", line 358, in init_GL m = GLMenu( menu ) File "../OpenGL/GLFramework.py", line 853, in __init__ self.create_menu( items ) File "../OpenGL/GLFramework.py", line 868, in create_menu id = glutCreateMenu( self.handleSelect ) File "/usr/lib/python2.5/site-packages/OpenGL/GLUT/special.py", line 165, in glutCreateMenu result = simple.glutCreateMenu( cCallback ) ctypes.ArgumentError: argument 1: <type 'exceptions.TypeError'>: expected CFunctionType instance instead of CFunctionType ----------------------------------- Some of the other problems I had when searching for solution: 1. In the documentation, http://pyopengl.sourceforge.net/documentation/manual/glutCreateMenu.3GLUT.xml clicking on the Python Sample Code link at the bottom results in a server timeout (cvs.sourceforge...) 2. Ubuntu feisty had the Demo/suit/GLUT.py file, but there was nothing obvious from looking at that (of course, it was on a system whose version worked). 3. Ubuntu gutsy doesan't have that file, nor could I find it in any of the places I looked. Thanks neal -- Neal Holtz http://cee.carleton.ca/~nholtz Dept. of Civil and Environmental Engineering, Carleton University, Ottawa, Ontario, Canada K1S 5B6. nh...@do... |