gluLoadSamplingMatrices
The gluLoadSamplingMatrices function loads NURBS sampling and culling matrices.
void gluLoadSamplingMatrices(
GLUnurbsObj *nobj, const GLfloat modelMatrix[16], const GLfloat projMatrix[16], const GLint viewport[4]);
Parameters
- nobj
The NURBS object (created with gluNewNurbsRenderer). - modelMatrix
A modelview matrix (as from a glGetFloatv call). - projMatrix
A projection matrix (as from a glGetFloatv call). - viewport
A viewport (as from a glGetIntegerv call).
Remarks
The gluLoadSamplingMatrices function uses modelMatrix, projMatrix, and viewport to recompute the sampling and culling matrices stored in nobj. The sampling matrix determines how finely a NURBS curve or surface must be tessellated to satisfy the sampling tolerance (as determined by the GLU_SAMPLING_TOLERANCE property). The culling matrix is used in deciding if a NURBS curve or surface should be culled before rendering (when the GLU_CULLING property is turned on).
The gluLoadSamplingMatrices function is necessary only if the GLU_AUTO_LOAD_MATRIX property is turned off (see gluNurbsProperty). Although it can be convenient to leave the GLU_AUTO_LOAD_MATRIX property turned on, doing so necessitates a round trip to the OpenGL server to get the current values of the modelview matrix, projection matrix, and viewport.)
Requirements
** Windows NT/2000:** Requires Windows NT 3.5 or later.
** Windows 95/98:** Requires Windows 95 or later. Available as a redistributable for Windows 95.
** Header:** Declared in Glu.h.
** Library:** Use Glu32.lib.
See Also
glGetFloatv, glGetIntegerv, gluGetNurbsProperty, gluNewNurbsRenderer