marialarsson / tsugite

This is the repository of a Tsugite. It is a research prototype of an interactive software that supports the design and fabrication of wood joints.
http://www.ma-la.com/tsugite.html
Other
434 stars 79 forks source link

glUniformMatrix4fv throws error because of pyrr's Matrix444 objects #5

Closed ghost closed 3 years ago

ghost commented 3 years ago

The glUniformMatrix4fv throws error because of pyrr's Matrix444 objects.

tsugite/setup/Show.py", line 95, in init_shader glUniformMatrix4fv(3, 1, GL_FALSE, rot_x * rot_y) File "src/latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.call File "src/wrapper.pyx", line 299, in OpenGL_accelerate.wrapper.Wrapper.call File "src/wrapper.pyx", line 161, in OpenGL_accelerate.wrapper.PyArgCalculator.c_call File "src/wrapper.pyx", line 128, in OpenGL_accelerate.wrapper.PyArgCalculatorElement.c_call File "src/wrapper.pyx", line 114, in OpenGL_accelerate.wrapper.PyArgCalculatorElement.c_call File "src/wrapper.pyx", line 212, in OpenGL_accelerate.wrapper.CallFuncPyConverter.c_call File "src/arraydatatype.pyx", line 174, in OpenGL_accelerate.arraydatatype.ArrayDatatype.asArray File "src/arraydatatype.pyx", line 57, in OpenGL_accelerate.arraydatatype.HandlerRegistry.c_lookup TypeError: ("No array-type handler for type <class 'pyrr.objects.matrix44.Matrix44'> (value: Matrix44([[ 0.92106099, 0.27935162, 0.27131037, ) registered", None)

ghost commented 3 years ago

It was because the glUniformMatrix4fv needs a numpy array instead of pyrr Matrix444 type, so I had to convert it. Now it works well :)