[PyOpenGL-Users] glGenVertexArrays present with python/absent with python3
Brought to you by:
mcfletch
From: rndblnch <rnd...@gm...> - 2014-01-15 21:11:56
|
Hello, I am experimenting with OpenGL 3.2 core using PyOpenGL 3.0.2 I am experiencing something strange: a function (glGenVertexArrays) that is present when I use python 2.7 is absent when I use python 3.3. Maybe the automatic conversion from 2to3 breaks something? I have a lot of PyOpenGL code that run on both python/python3, and it is the first time I am experiencing something like that. Any hint? Below a quick transcript to show the problem (the "core" in the glut init display string is a hack of mine to get apple's glut supporting opengl 3.2 core): python 2.7: blanch% python Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from OpenGL import GL >>> from OpenGL import GLUT >>> GLUT.glutInit(["test"]) ['test'] >>> GLUT.glutInitDisplayString(b"rgba double depth core") >>> GLUT.glutCreateWindow(b"titi") 1 >>> bool(GL.glGenVertexArrays) True >>> GL <module 'OpenGL.GL' from '/Library/Python/2.7/site-packages/ PyOpenGL-3.0.2-py2.7.egg/OpenGL/GL/__init__.pyc'> >>> GL.glGetString(GL.GL_VERSION) '3.2 NVIDIA-8.16.74 310.40.00.10f02' >>> GL.glGetString(GL.GL_SHADING_LANGUAGE_VERSION) '1.50' >>> ^D python 3.3: blanch% python3 Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from OpenGL import GL >>> from OpenGL import GLUT >>> GLUT.glutInit(["test"]) ["b'test'"] >>> GLUT.glutInitDisplayString(b"rgba double depth core") >>> GLUT.glutCreateWindow(b"titi") 1 >>> bool(GL.glGenVertexArrays) False >>> GL <module 'OpenGL.GL' from '/Library/Frameworks/Python.framework/Versions/ 3.3/lib/python3.3/site-packages/ PyOpenGL-3.0.2-py3.3.egg/OpenGL/GL/__init__.py'> >>> GL.glGetString(GL.GL_VERSION) b'3.2 NVIDIA-8.16.74 310.40.00.10f02' >>> GL.glGetString(GL.GL_SHADING_LANGUAGE_VERSION) b'1.50' >>> bool(GL.ARB.vertex_array_object.glGenVertexArrays) False >>> from OpenGL.GL.APPLE import vertex_array_object >>> bool(vertex_array_object.glGenVertexArraysAPPLE) False >>> ^D thanks, renaud |