Re: [PyOpenGL-Users] PyOpenGL_accelerate / subclassed numpy arrays
Brought to you by:
mcfletch
From: Rob M. - N. A. <rob...@no...> - 2015-11-08 16:20:32
|
I know I've run into that problem when my VBO data was in recarray format. Defining the VBO as a view of the array in dtype=np.float32 format worked. Rob On Thu, Nov 5, 2015 at 11:08 PM, Nicolas P. Rougier < Nic...@in...> wrote: > > 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 > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users > |