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.)

QuickInfo

  Windows NT: Use version 3.5 and later.
  Windows: Use Windows 95 and later.
  Windows CE: Unsupported.
  Header: Declared in glu.h.
  Import Library: Link with glu32.lib.

See Also

glGetFloatv, glGetIntegerv, gluGetNurbsProperty, gluNewNurbsRenderer