My system is OS X 10.7.2, Python 2.7. Under a core, 3.2, forward-compatible context created via glfw (with OpenGL.FORWARD_COMPATIBLE_ONLY = True).
In attempting to bind a VBO oibject the following occurs
Traceback (most recent call last):
File "test.py", line 94, in <module>
with vb:
File "/Library/Python/2.7/site-packages/OpenGL/arrays/vbo.py", line 319, in bind
buffers = self.create_buffers()
File "/Library/Python/2.7/site-packages/OpenGL/arrays/vbo.py", line 269, in create_buffers
self.buffers = [ long(self.implementation.glGenBuffers(1)) ]
AttributeError: 'Implementation' object has no attribute 'glGenBuffers'
I have tracked it down to lines 61-71 in vbo.py:
The code seems to build an implementation object based upon vertex buffer objects are implemented in the renderer (i.e. ARB or mainline). To choose the correct implementation to use it does two checks
if not GL.glBufferData:
...
elif vertex_buffer_object.glBufferDataARB:
...
However on my system (after creating the opengl 3 context):
print bool(GL.glBufferData)
print bool(vertex_buffer_object.glBufferDataARB)
Results in
True
False
And so no implementation is assigned. If I add an "or True" to the second condition to force it down that path all seems to work. Presumably an else or another elsif clause needs to be added here. I unfortunately am not familiar enough with PyOpenGL to know the best way to fix this to submit a patch. If there are some checks I can run to help build a correct elsif statement or if there is some other part that I can give more info on please let me know.
Incidentally this all seems to work when I use an old-fashion 2.1 context.
Thanks
This should, I believe, now be fixed in bzr head. The logic for choosing implementations was overly complex; if we have core, we should use it, if we have arb, use that.