Re: [PyOpenGL-Users] GLU NURBS precision
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2012-10-26 18:38:25
|
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 |