Re: GLU NURBS precision
"Mike C. Fletcher" <[email protected]> Fri, 26 Oct 2012 14:38:18 -0400
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <[email protected]> |
On 12-10-26 10:21 AM, Hugo Gagnon wrote: > Hello, > > I'm writing an application that uses GLU's NURBS capabilities. I'm > passing double-precision numpy arrays to gluNurbsCurve and > gluNurbsSurface, which works fine, only that PyOpenGL seems to > automatically convert them to single-precision, which slows down my app. > Does this conversion have to do with PyOpenGL or is it an OpenGL > limitation? Is there any way around it? other than having to keep > track of two arrays of different types around... The C-level function requires GLfloat * arrays (i.e. single precision). PyOpenGL, by default, will copy the array if the type is not compatible with the target function. So the conversion is PyOpenGL, but if it didn't do it you'd get a garbage result (each half of your double interpreted as a float). HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com ------------------------------------------------------------------------------ The Windows 8 Center In partnership with Sourceforge Your idea - your app - 30 days. Get started! http://windows8center.sourceforge.net/ what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/ _______________________________________________ PyOpenGL Homepage http://pyopengl.sourceforge.net