Silicon Graphics

[Prev] [TOC] [Next]



(-) OpenGL Programming Guide
(-) Appendix BOpenGL State Variables

The Query Commands

There are four commands for obtaining simple state variables, and one for determining whether a particular state is enabled or disabled. void glGetBooleanv(GLenum pname, GLboolean *params);
void glGetIntegerv(GLenum pname, GLint *params);
void glGetFloatv(GLenum pname, GLfloat *params);
void glGetDoublev(GLenum pname, GLdouble *params);

Obtains Boolean, integer, floating-point, or double-precision state variables. The pname argument is a symbolic constant indicating the state variable to return, and params is a pointer to an array of the indicated type in which to place the returned data. The possible values for pname are listed in the tables in "OpenGL State Variables." A type conversion is performed if necessary to return the desired variable as the requested data type.

GLboolean glIsEnabled(GLenum cap)

Returns GL_TRUE if the mode specified by cap is enabled; otherwise, returns GL_FALSE. The possible values for cap are listed in the tables in "OpenGL State Variables"

Other specialized commands return specific state variables. The prototypes for these commands are listed here; to find out when you need to use these commands, use the tables in "OpenGL State Variables" Also see the OpenGL Reference Manual. OpenGL's error handling facility and the glGetError() command are described in more detail in the next section.

void glGetClipPlane(GLenum plane, GLdouble *equation);


GLenum glGetError(void);


void glGetLight{if}v(GLenum light, GLenum pname, TYPE *params);


void glGetMap{ifd}v(GLenum target, GLenum query, TYPE *v);


void glGetMaterial{if}v(GLenum face, GLenum pname, TYPE *params);


void glGetPixelMap{f ui us}v(GLenum map, TYPE *values);


void glGetPolygonStipple(GLubyte *mask);


const GLubyte * glGetString(GLenum name);


void glGetTexEnv{if}v(GLenum target, GLenum pname, TYPE *params);


void glGetTexGen{ifd}v(GLenum coord, GLenum pname, TYPE *params);


void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);


void glGetTexLevelParameter{if}v(GLenum target, GLint level, GLenum pname, TYPE *params);


void glGetTexParameter{if}v(GLenum target, GLenum pname, TYPE *params);


[Prev] [TOC] [Next]

OpenGL Programming Guide


Maintained by Maintainer: Send e-mail to .htm">name@address.