[PyOpenGL-Users] glGenVertexArrays producing 'invalid enumerant' error.
Brought to you by:
mcfletch
|
From: Gordon W. <go...@to...> - 2011-10-13 07:56:40
|
Version stuff:
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import OpenGL
OpenGL.__version__
'3.0.2a1'
I'm using FORWARD_COMPATIBLE_ONLY, context version 3.3 and
GLUT_CORE_PROFILE.
I'm porting a working (same machine and environment etc) C program to
Python,
and the glGenVertexArrays function is giving me grief.
The pythonic form:
vao = glGenVertexArrays(1)
produces "TypeError: this function takes at least 2 arguments" which I
presume
means it hasn't been wrapped yet.
The ctypes form:
vao = GLuint()
glGenVertexArrays(1, ctypes.byref(vao))
produces:
Traceback (most recent call last):
File "main.py", line 230, in <module>
main(sys.argv)
File "main.py", line 221, in main
init()
File "main.py", line 155, in init
glGenVertexArrays(1, ctypes.byref(vao))
File
"/usr/local/lib/python2.7/dist-packages/OpenGL/platform/baseplatform.py",
line 372, in __call__
return self( *args, **named )
File "/usr/local/lib/python2.7/dist-packages/OpenGL/error.py", line 208,
in
glCheckError
baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
err = 1280,
description = 'invalid enumerant',
baseOperation = glGenVertexArrays,
cArguments = (1, <cparam 'P' (0xb74b9b48)>)
)
I've no idea what could be causing that and googling hasn't turned up
anything
useful.
Does anyone have any suggestions as to where to look?
Are there any known working examples of using vertex array objects and
pyopengl
that I could cross check against?
G
|