[ pyopengl-Bugs-3472007 ] vbo.py fails to detect correct implementation
SourceForge.net <[email protected]> Tue, 10 Jan 2012 13:28:19 -0800
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #3472007, was opened at 2012-01-10 13:28
Message generated for change (Tracker Item Submitted) made by pjbutler
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=3472007&group_id=5988
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GL
Group: v3.0.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Patrik (pjbutler)
Assigned to: Mike C. Fletcher (mcfletch)
Summary: vbo.py fails to detect correct implementation
Initial Comment:
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
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=3472007&group_id=5988
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net