Re: [PyOpenGL-Users] glRectfv ctypes bug?
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2007-12-16 21:12:22
|
altern wrote: > sorry, this was on windows XP with python 2.5 and pyopengl3.0.0a6-py2.5.egg > > altern(e)k dio: > >> hi >> >> I am porting an old app to the new PyOPenGL and I get an error at >> >> glRectfv( vlist[0], vlist[2] ) >> >> It says >> >> "wrappercall types.Argument.Error: ("argument 1: <type >> 'exceptions.TypeError'>: byref() argument must be ctypes instance, not >> 'tuple', [(-5.5, -5.5), <OpenGL.arrays.listsc_floatArray_2 object at >> 0x02x10210>])" >> Neat, it was a pretty stupid little bug. I wrapped the function with a type annotation for the first argument and then immediately threw away that annotated function when I wrapped the base function again to annotate the second argument. That said, I wasn't able to reproduce the precise error (though I got lots of other wonky errors with glRectf as a result of the problem). Hopefully that will take care of your issue too, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |