Re: PyOpenGL: numpy dependency?
"Mike C. Fletcher" <[email protected]>
| Newsgroups | gmane.comp.python.opengl.devel |
|---|---|
| Message-ID | <[email protected]> |
Giovanni Bajo wrote: > Mike C. Fletcher wrote: > > >>> I wonder why numpy is a mandatory dependency for OpenGL-ctypes. As >>> far as I can tell, it's used only to handle arrays, and I pass my >>> arrays as lists of floats to PyOpenGL. Why do I still need to >>> install numpy? >>> >>> >> In fact, you don't. Numpy support is "effectively" required, because >> efficient operation generally wants it, but it's not actually an >> enforced dependency AFAIK. That is, if you've found a true hard >> dependency (rather than a recommendation) let me know and I'll try to >> fix it. >> > > glLoadMatrixd(). I tried to pass a simple Python list of floats and it did not > work. Is there a way to call glLoadMatrixd() without *any* external numeric > package installed? What I find confusing is that the exception raised is an > ImportError with a msg like "numpy not supported". That makes believe that > there is a real dependency on numpy, am I right? > There was a bug and missing functionality. Numpy was being used to support lists and tuples. I've added support that uses ctypes for handling list/tuple input formats for arrays. At the moment it does *not* convert back to lists/tuples on output (it returns ctypes arrays-of-arrays). Sorry about that, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net