OpenGL.GLU.glunurbs
Implementation of GLU Nurbs structure and callback methods
Same basic pattern as seen with the gluTess* functions, just need to
add some bookkeeping to the structure class so that we can keep the
Python function references alive during the calling process.
Functions
Classes
GLU Nurbs structure with oor and callback storage support
IMPORTANT NOTE: the texture coordinate callback receives a raw ctypes
data-pointer, as without knowing what type of evaluation is being done
(1D or 2D) we cannot safely determine the size of the array to convert
it. This is a limitation of the C implementation. To convert to regular
data-pointer, just call yourNurb.ptrAsArray( ptr, size, arrays.GLfloatArray )
with the size of data you expect.
_tex(
self
,
function
)
Texture coordinate callback
NOTE: there is no way for *us* to tell what size the array is, you will
get back a raw data-point, not an array, as you do for all other callback
types!!!
_vec3(
self
,
function
,
size
= 3
)
Convert first arg to size-element array, do OOR on arg2 if present
FUNCTION_TYPE(
restype
,
*
argtypes
,
**
kw
)
CFUNCTYPE(restype, *argtypes,
use_errno=False, use_last_error=False) -> function prototype.
restype: the result type
argtypes: a sequence specifying the argument types
The function prototype can be called in different ways to create a
callable object:
prototype(integer address) -> foreign function
prototype(callable) -> create and return a C callable function from callable
prototype(integer index, method name
paramflags
) -> foreign function calling a COM method
prototype((ordinal number, dll object)
paramflags
) -> foreign function exported by ordinal
prototype((function name, dll object)
paramflags
) -> foreign function exported by name