Thread: [PyOpenGL-Devel] [ pyopengl-Bugs-3472007 ] vbo.py fails to detect correct implementation
Brought to you by:
mcfletch
From: SourceForge.net <no...@so...> - 2012-01-10 21:28:24
|
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 |
From: SourceForge.net <no...@so...> - 2012-01-15 03:41:56
|
Bugs item #3472007, was opened at 2012-01-10 13:28 Message generated for change (Comment added) made by mcfletch 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 ---------------------------------------------------------------------- >Comment By: Mike C. Fletcher (mcfletch) Date: 2012-01-14 19:41 Message: 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105988&aid=3472007&group_id=5988 |