I think it's time to move PyOpenGL off of SWIG and on to ctypes. Rene did some preliminary work on this... well... it's a while ago now. The basic C-style API isn't that hard, it's replicating the Pythonic API that causes the problems. It's likely worth the pain just to reduce build problems, the flexibility it would provide puts it over the top, and the coolness factor... well, who could possibly think this isn't the coolest thing since pocket protectors ;) .
It's likely going to be slower than the SWIG version, but we can look at writing tiny accelerators for anything that's truly horrendous. Likely need a few of them for e.g. the Numpy conversions, and callback-holders anyway.
There may also be problems with the older, more exotic platforms (Sun, HPUX, AIX), but I'd think getting libffi ported to those platforms would be a worthy goal, so if PyOpenGL adds to the weight, great :) .
ctypes likely should be the method-of-choice for wrapping libraries going forward. I've even been toying with the idea of writing a PostgreSQL driver wrapping libpq using it. Why? For flexibility, mostly... and again, that coolness factor.
Pingbacks are closed.