glGenVertexArrays producing 'invalid enumerant' error.

Gordon Wrigley <[email protected]>
Newsgroups gmane.comp.python.opengl.user
Message-ID <CAD-wiX3JspxDKURoYMJdtx=FXn_+efU2-8hYvaynz_q3_uZqrg@mail.gmail.com>
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

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.