nurb:Callback(which, func)
func is Nil, then this callback will not get invoked and the related data, if any,
will be lost.
Except the error callback, these callbacks are used by NURBS tessellator (when #GLU_NURBS_MODE is set to be #GLU_NURBS_TESSELLATOR)
to return back the OpenGL polygon primitives resulting from the tessellation. The error callback function is effective no matter which
value that #GLU_NURBS_MODE is set to. All other callback functions are effective only when #GLU_NURBS_MODE is set to #GLU_NURBS_TESSELLATOR.
All callbacks receive a handle to the NURBS object as their first parameter. The second parameter depends on the
callback type specified in which.
The legal callbacks are as follows:
#GLU_NURBS_BEGIN#GLU_LINES,
#GLU_LINE_STRIP, #GLU_TRIANGLE_FAN, #GLU_TRIANGLE_STRIP, #GLU_TRIANGLES, or #GLU_QUAD_STRIP. The default begin callback function is Nil.
#GLU_NURBS_VERTEXNil.
#GLU_NURBS_NORMAL#GLU_MAP1_NORMAL).
In the case of a NURBS surface, if a normal map (#GLU_MAP2_NORMAL) is provided, then the generated normal is computed from the normal map.
If a normal map is not provided, then a surface normal is computed in a manner similar to that described for evaluators when #GLU_AUTO_NORMAL
is enabled. The default normal callback function is Nil.
#GLU_NURBS_COLOR#GLU_MAP1_COLOR_4 or #GLU_MAP2_COLOR_4). The table passed to
this callback contains four floating-point components: R, G, B, A. The default color callback function is Nil.
#GLU_NURBS_TEXTURE_COORD#GLU_MAP1_TEXTURE_COORD_1,
#GLU_MAP1_TEXTURE_COORD_2, #GLU_MAP1_TEXTURE_COORD_3, #GLU_MAP1_TEXTURE_COORD_4, #GLU_MAP2_TEXTURE_COORD_1, #GLU_MAP2_TEXTURE_COORD_2,
#GLU_MAP2_TEXTURE_COORD_3, #GLU_MAP2_TEXTURE_COORD_4). If no texture map is specified, this callback function will not be called. The
default texture callback function is Nil.
#GLU_NURBS_ENDNil. This callback doesn't receive
any parameters except a handle to the NURBS object.
Please consult an OpenGL reference manual for more information.