Re: PyOpenGL: numpy dependency?

"Giovanni Bajo" <[email protected]>
Newsgroups gmane.comp.python.opengl.devel
Message-ID <092f01c6fad6$2f4defe0$1abe2997@bagio>
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.

Great news, thanks! What's the easy_install magic to pull an updated version?

> At the moment it does
> *not* convert back to lists/tuples on output (it returns ctypes
> arrays-of-arrays).

OK. I guess you want it fixed as ctypes is an implementation detail of PyOpenGL
after all, don't you?

Giovanni Bajo


-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.