PyOpenGL_accelerate / subclassed numpy arrays

"Nicolas P. Rougier" <[email protected]> Fri, 6 Nov 2015 08:08:43 +0100
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
I've made a numpy array subclass for a vertex buffer that works great with PyOpenGL but does not work if PyOpenGL_accelerate is installed, it complains about about missing handler:

File "/Users/rougier/Development/Public/glumpy/glumpy/gloo/buffer.py", line 75, in _update
    gl.glBufferSubData(self.target, offset, nbytes, data)
  File "latebind.pyx", line 44, in OpenGL_accelerate.latebind.Curry.__call__ (src/latebind.c:1201)
  File "/usr/locaL/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/OpenGL/GL/VERSION/GL_1_5.py", line 122, in glBufferSubData
    data = ArrayDatatype.asArray( data )
  File "arraydatatype.pyx", line 174, in OpenGL_accelerate.arraydatatype.ArrayDatatype.asArray (src/arraydatatype.c:4221)
  File "arraydatatype.pyx", line 57, in OpenGL_accelerate.arraydatatype.HandlerRegistry.c_lookup (src/arraydatatype.c:2230)
TypeError: No array-type handler for type <class 'glumpy.gloo.buffer.VertexBuffer'> (value: VertexBuffer([151,  10,   1, ...,   0, 128,  63], ) registered


Python: 3.5
PyOpenGL: 3.1.0
PyOpenGL_accelerate: 3.1.0
The package I'm developing: http://glumpy.github.io

Any idea ?

Nicolas



------------------------------------------------------------------------------
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net