Re: Install/version Trouble?
Adam Steele <[email protected]> Mon, 10 Mar 2014 21:51:02 -0400
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <CAOT9Gf64u0iOip07QkrgZgLogPbSDfNPHx6oMZpn6BBDeztEcQ@mail.gmail.com> |
On Thu, Mar 6, 2014 at 10:39 PM, Ian Mallett <[email protected]> wrote: > On Thu, Mar 6, 2014 at 8:29 PM, Adam Steele <[email protected]> wrote: > >> PyOpenGL-3.0.2.win-amd64.exe >> on a "from OpenGL.GL import *" this gives me error that look like some >> conversion from python 2.x didn't take (some exceptions are of the form >> "Exception Blah, err:") >> > You'll have to be more specific than that. > > python 3.3 x64, install PyOpenGL-3.0.2.win-amd64.exe then run file: ------------------------------ from OpenGL.GL import * if __name__ == '__main__': pass ----------------------- I get error: ------------------------- Traceback (most recent call last): File "C:\Users\ADAM\workspace\oGL_examples\src\PyOpenGL_test\testbed.py", line 13, in <module> from OpenGL.GL import * File "C:\Python33\lib\site-packages\OpenGL\GL\__init__.py", line 3, in <module> from OpenGL.GL.VERSION.GL_1_1 import * File "C:\Python33\lib\site-packages\OpenGL\GL\VERSION\GL_1_1.py", line 10, in <module> from OpenGL import platform, constants, constant, arrays File "C:\Python33\lib\site-packages\OpenGL\platform\__init__.py", line 35, in <module> _load() File "C:\Python33\lib\site-packages\OpenGL\platform\__init__.py", line 26, in _load plugin_class = plugin.load() File "C:\Python33\lib\site-packages\OpenGL\plugins.py", line 14, in load return importByName( self.import_path ) File "C:\Python33\lib\site-packages\OpenGL\plugins.py", line 28, in importByName module = __import__( ".".join(moduleName), {}, {}, moduleName) File "C:\Python33\lib\site-packages\OpenGL\platform\win32.py", line 25 except OSError, err: ^ SyntaxError: invalid syntax ---------------------------------- PyOpenGL-3.1.0b1.win-amd64.exe >> This one installs and lets me do an import, but a simple command like >> "glGetString(GL_VERSION)" returns "None" >> > You'll have to be more specific than that. At a guess (if you only did > this line), then that's to be expected; OpenGL commands require an OpenGL > context before they will work. > > > Thank you for the heads up. I'm moving over from Pyglet, which evidently opens a context upon import. For reference the two file was as below, whre i get the error for the OpenGL import, this makes sense if you need a context as you say. Thanks ------------------------------ from OpenGL.GL import * # or # from pyglet.gl import * import ctypes if __name__ == '__main__': ver=glGetString(GL_VERSION) print(ctypes.string_at(ver,30)) ------------------------------------------- ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net _______________________________________________ PyOpenGL-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyopengl-users