glGetTexGendv, glGetTexGenfv, glGetTexGeniv

These functions return texture coordinate generation parameters.

void glGetTexGendv(
  GLenum coord,  GLenum pname,  GLdouble *params);void glGetTexGenfv(  GLenum coord,  GLenum pname,  GLfloat *params);void glGetTexGeniv(  GLenum coord,  GLenum pname,  GLint *params);

Parameters

  • coord
    A texture coordinate. Must be GL_S, GL_T, GL_R, or GL_Q.

  • pname
    The symbolic name of the value(s) to be returned. Must be either GL_TEXTURE_GEN_MODE or the name of one of the texture generation plane equations: GL_OBJECT_PLANE or GL_EYE_PLANE. These values are as follows:

    Value Meaning
    GL_TEXTURE_GEN_MODE The params parameter returns the single valuedtexture generation function, a symbolic constant.
    GL_OBJECT_PLANE The params parameter returns the four planeequation coefficients that specify object linearcoordinate generation. Integer values, when requested, are mapped directly from the internal floating-point representation.
    GL_EYE_PLANE The params parameter returns the four planeequation coefficients that specify eye linear-coordinate generation. Integer values, when requested, are mapped directly from the internal floating-point representation. The returned values are those maintained in eye coordinates. They are not equal to the values specified using glTexGen, unless the modelview matrix was identified at the time glTexGen was called.
  • params
    Returns the requested data.

Remarks

The glGetTexGen function returns in params selected parameters of a texture-coordinate generation function that you specified with glTexGen. The coord parameter names one of the (s,t,r,q) texture coordinates, using the symbolic constant GL_S, GL_T, GL_R, or GL_Q.

If an error is generated, no change is made to the contents of params.

Error Codes

The following are the error codes generated and their conditions.

Error code Condition
GL_INVALID_ENUM coord or pname was not an accepted value.
GL_INVALID_OPERATION glGetTexGen was called between a call to glBegin and the corresponding call to glEnd.

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 Gl.h.
**  Library:** Use Opengl32.lib.

See Also

glBegin, glEnd, glTexGen