Re: [PyOpenGL-Users] OPENGL
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2007-03-13 04:19:47
|
JoN wrote: > Quoting Jason Ward <ir...@gm...>: > > >> Python is extensible with C++. >> So why not just take the gl.h glu.h and friends >> and mod them so python can call them? >> > > Isn't that exactly what PyOpenGL does? > It's sort-of what PyOpenGL does. I believe Jason was asking why we don't use C directly to gain speed. The answer is basically that the maintenance headaches outweigh the performance gain (to the extent that the system would likely have been abandoned if we'd kept on with the hand-coded, and then SWIG-coded wrappers). >> wouldn't this be faster than your wrapper around ctypes? >> > > Its hard to imagine anything faster than ctypes, as it binds calls directly to > the binary code in the .so/.dll's > Actually, ctypes is quite slow compared to e.g. SWIG. That's because it does a lot more work at run-time for every call than a SWIG or similar system does. OpenGL-ctypes (PyOpenGL) is even slower because it has to provide the array and similar semantics that aren't available in ctypes' core. Have fun, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |