[PyOpenGL-Users] Togl on windows
Brought to you by:
mcfletch
From: Jon W. <wr...@es...> - 2008-05-30 08:20:41
|
Hello, I noticed that the windows download of PyOpenGL (3.0.0b2 via easy_install) does not include Togl? It appears to work to get Togl2.0-8.4-Windows.zip from : http://sourceforge.net/project/showfiles.php?group_id=519 ... and unzip the Togl2.0 either into C:\python25\tcl\tcl8.4\ , or, put the Togl files into : pyopengl-3.0.0b2-py2.5.egg\OpenGL\Tk\win32-tk8.4 and patch your Tk/__init__.py script to actually append TOGL_DLL_PATH in: =========================================== # add this file's directory to Tcl's search path # on Linux Togl is installed in ./linux2-tk8.0 # on Windows (Python2.0) in ./win32-tk8.3 try: TOGL_DLL_PATH = os.path.join( os.path.dirname(__file__), sys.platform + "-tk" + _default_root.getvar("tk_version") ) # ******* This line added - use the path *************** _default_root.tk.call('lappend', 'auto_path', TOGL_DLL_PATH) except NameError, err: # no __file__, likely running as an egg TOGL_DLL_PATH = "" # ******* Is this intentional, or should it be indented ? _default_root.tk.call('lappend', 'auto_path', ) try: _default_root.tk.eval('load {} Togl') except TclError: pass ============================================ ... when 'load {} Togl' gives a TclError this might be a good time to print something on stdout to help the user to fix their installation. I seem to have been bouncing my head on these PyOpenGl/Togl problems for some time. Since the Togl folks are now making binaries available it may be possible to fix pyopengl by using them. Do you need some help with this? If so, please let me know whereabouts in CVS I could start to take a look. Best, Jon |