GLUNURBSCALLBACK



GLUNURBSCALLBACK

NAME
C SPECIFICATION
PARAMETERS
DESCRIPTION
NOTES
SEE ALSO

NAME

gluNurbsCallback − define a callback for a NURBS object

C SPECIFICATION

void gluNurbsCallback( GLUnurbs* nurb,

GLenum which,

_GLUfuncptr CallBackFunc )

PARAMETERS

nurb

Specifies the NURBS object (created with gluNewNurbsRenderer).

which

Specifies the callback being defined. Valid values are GLU_NURBS_BEGIN, GLU_NURBS_VERTEX, GLU_NURBS_NORMAL, GLU_NURBS_COLOR, GLU_NURBS_TEXTURE_COORD, GLU_NURBS_END, GLU_NURBS_BEGIN_DATA, GLU_NURBS_VERTEX_DATA, GLU_NURBS_NORMAL_DATA, GLU_NURBS_COLOR_DATA, GLU_NURBS_TEXTURE_COORD_DATA, GLU_NURBS_END_DATA, and GLU_NURBS_ERROR.

CallBackFunc

Specifies the function that the callback calls.

DESCRIPTION

gluNurbsCallback is used to define a callback to be used by a NURBS object. If the specified callback is already defined, then it is replaced. If CallBackFunc is NULL, 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. Note that there are two versions of each callback: one with a user data pointer and one without. If both versions for a particular callback are specified then the callback with the user data pointer will be used. Note that ‘‘userData’’ is a copy of the pointer that was specified at the last call to gluNurbsCallbackData.

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.

The legal callbacks are as follows:
GLU_NURBS_BEGIN

The begin callback indicates the start of a primitive. The function takes a single argument of type GLenum, which can be one of GL_LINES, GL_LINE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, GL_TRIANGLES, or GL_QUAD_STRIP. The default begin callback function is NULL. The function prototype for this callback looks like:
void begin ( GLenum type );

GLU_NURBS_BEGIN_DATA

The same as the GLU_NURBS_BEGIN callback except that it takes an additional pointer argument. This pointer is a copy of the pointer that was specified at the last call to gluNurbsCallbackData. The default callback function is NULL. The function prototype for this callback function looks like:
void beginData (GLenum type, void *userData);

GLU_NURBS_VERTEX

The vertex callback indicates a vertex of the primitive. The coordinates of the vertex are stored in the parameter ‘‘vertex’’. All the generated vertices have dimension 3, that is, homogeneous coordinates have been transformed into affine coordinates. The default vertex callback function is NULL. The function prototype for this callback function looks like:
void vertex ( GLfloat *vertex );

GLU_NURBS_VERTEX_DATA

This is the same as the GLU_NURBS_VERTEX callback, except that it takes an additional pointer argument. This pointer is a copy of the pointer that was specified at the last call to gluNurbsCallbackData. The default callback function is NULL. The function prototype for this callback function looks like:
void vertexData ( GLfloat *vertex, void *userData );

GLU_NURBS_NORMAL

The normal callback is invoked as the vertex normal is generated. The components of the normal are stored in the parameter ‘‘normal’’. In the case of a NURBS curve, the callback function is effective only when the user provides a normal map (GL_MAP1_NORMAL). In the case of a NURBS surface, if a normal map (GL_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 GL_AUTO_NORMAL is enabled.

The default normal callback function is NULL. The function prototype for this callback function looks like:
void normal ( GLfloat *normal );

GLU_NURBS_NORMAL_DATA

The same as the GLU_NURBS_NORMAL callback except that it takes an additional pointer argument. This pointer is a copy of the pointer that was specified at the last call to gluNurbsCallbackData. The default callback function is NULL. The function prototype for this callback function looks like:
void normalData ( GLfloat *normal, void *userData );

GLU_NURBS_COLOR

The color callback is invoked as the color of a vertex is generated. The components of the color are stored in the parameter ‘‘color’’. This callback is effective only when the user provides a color map (GL_MAP1_COLOR_4 or GL_MAP2_COLOR_4). ‘‘color’’ contains four components: R,G,B,A. The default color callback function is NULL. The prototype for this callback function looks like:
void color ( GLfloat *color );

GLU_NURBS_COLOR_DATA

The same as the GLU_NURBS_COLOR callback except that it takes an additional pointer argument. This pointer is a copy of the pointer that was specified at the last call to gluNurbsCallbackData. The default callback function is NULL. The function prototype for this callback function looks like:
void colorData ( GLfloat *color, void *userData );

GLU_NURBS_TEXTURE_COORD

The texture callback is invoked as the texture coordinates of a vertex are generated. These coordinates are stored in the parameter ‘‘texCoord’’. The number of texture coordinates can be 1, 2, 3, or 4 depending on which type of texture map is specified (GL_MAP1_TEXTURE_COORD_1, GL_MAP1_TEXTURE_COORD_2, GL_MAP1_TEXTURE_COORD_3, GL_MAP1_TEXTURE_COORD_4, GL_MAP2_TEXTURE_COORD_1, GL_MAP2_TEXTURE_COORD_2, GL_MAP2_TEXTURE_COORD_3, GL_MAP2_TEXTURE_COORD_4). If no texture map is specified, this callback function will not be called.

The default texture callback function is NULL. The function prototype for this callback function looks like:
void texCoord ( GLfloat *texCoord );

GLU_NURBS_TEXTURE_COORD_DATA

This is the same as the GLU_NURBS_TEXTURE_COORD callback, except that it takes an additional pointer argument. This pointer is a copy of the pointer that was specified at the last call to gluNurbsCallbackData. The default callback function is NULL. The function prototype for this callback function looks like:
void texCoordData (GLfloat *texCoord, void *userData);

GLU_NURBS_END

The end callback is invoked at the end of a primitive. The default end callback function is NULL. The function prototype for this callback function looks like:
void end ( void );

GLU_NURBS_END_DATA

This is the same as the GLU_NURBS_END callback, except that it takes an additional pointer argument. This pointer is a copy of the pointer that was specified at the last call to gluNurbsCallbackData. The default callback function is NULL. The function prototype for this callback function looks like:
void endData ( void *userData );

GLU_NURBS_ERROR

The error function is called when an error is encountered. Its single argument is of type GLenum, and it indicates the specific error that occurred. There are 37 errors unique to NURBS named GLU_NURBS_ERROR1 through GLU_NURBS_ERROR37. Character strings describing these errors can be retrieved with gluErrorString.

NOTES

gluNurbsCallback is available only if the GLU version is 1.2 or greater.

GLU version 1.2 supports only the GLU_ERROR parameter for which. The GLU_ERROR value is deprecated in GLU version 1.3 in favor of GLU_NURBS_ERROR. All other accepted values for CallBackFunc are available only if the GLU version is 1.3 or greater.

SEE ALSO

gluErrorString(3G), gluNewNurbsRenderer(3G), gluNurbsCallbackData(3G), gluNurbsProperty(3G)



More Linux Commands

manpages/tcpdmatch.8.html
tcpdmatch(8) - tcp wrapper oracle - Linux manual page.......
tcpdmatch predicts how the tcp wrapper would handle a specific request for service. Examples are given below. The program examines the tcpd access control table

manpages/fesetenv.3.html
fesetenv(3) - floating-point rounding and exception handling
These eleven functions were defined in C99, and describe the handling of floating-point rounding and exceptions (overflow, zero-divide, etc.). Exceptions The di

manpages/XF86VidModeSwitchToMode.3.html
XF86VidModeSwitchToMode(3) - Extension library for the XFree
These functions provide an interface to the server extension XFree86-VidModeExtension which allows the video modes to be queried and adjusted dynamically and mo

manpages/XtAppGetExitFlag.3.html
XtAppGetExitFlag(3) - thread support functions (Man Page)...
To indicate that an application context should exit, use XtAppSetExitFlag. To test the exit status of an application context, use XtAppGetExitFlag. SEE ALSO X T

manpages/fsadm.8.html
fsadm(8) utility to resize or check filesystem on a device
fsadm utility checks or resizes the filesystem on a device. It tries to use the same API for ext2, ext3, ext4, ReiserFS and XFS filesystem. OPTIONS -e, --ext-of

manpages/glDepthRange.3gl.html
glDepthRange(3gl) - specify mapping of depth values from nor
After clipping and division by w, depth coordinates range from -1 to 1, corresponding to the near and far clipping planes. glDepthRange specifies a linear mappi

manpages/SDL_JoystickOpened.3.html
SDL_JoystickOpened(3) - Determine if a joystick has been ope
Determines whether a joystick has already been opened within the application. index refers to the Nth joystick on the system. RETURN VALUE Returns 1 if the joys

manpages/h_errno.3.html
h_errno(3) - get network host entry - Linux manual page.....
The gethostbyname*(), gethostbyaddr*(), herror(), and hstrerror() functions are obsolete. Applications should use getaddrinfo(3), getnameinfo(3), and gai_strerr

manpages/git-check-ignore.1.html
git-check-ignore(1) Debug gitignore exclude files (ManPage)
For each pathname given via the command-line or from a file via --stdin, show the pattern from .gitignore (or other input files to the exclude mechanism) that d

manpages/netsnmp_init_mib.3.html
netsnmp_init_mib(3) - netsnmp_mib_api functions (Man Page)
The functions dealing with MIB modules fall into four groups - those dealing with initialisation and shutdown, with reading in and parsing MIB files, with searc

manpages/lscpu.1.html
lscpu(1) - display information on CPU architecture (ManPage)
lscpu gathers CPU architecture information from sysfs and /proc/cpuinfo. The command output can be optimized for parsing or for easy readability by humans. The

manpages/XcmsCIELab.3.html
XcmsCIELab(3) - Xcms color structure - Linux manual page....
The XcmsColor structure contains a union of substructures, each supporting color specification encoding for a particular color space. SEE ALSO XcmsAllocColor(3)





We can't live, work or learn in freedom unless the software we use is free.