Name

glGetTexParameter — return texture parameter values

C Specification

void glGetTexParameterfv(GLenum target,
 GLenum pname,
 GLfloat * params);
 
void glGetTexParameteriv(GLenum target,
 GLenum pname,
 GLint * params);
 
void glGetTexParameterxv(GLenum target,
 GLenum pname,
 GLfixed * params);
 

Parameters

target

Specifies the target texture, which must be GL_TEXTURE_2D.

pname

Specifies the symbolic name of a texture parameter. Which can be one of the following: GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, or GL_GENERATE_MIPMAP.

params

Returns texture parameters.

Description

glGetTexParameter returns in param the value of the texture parameter specified as pname. target defines the target texture, which must be GL_TEXTURE_2D which specifies two-dimensional texturing. pname accepts the same symbols as glTexParameter, with the same interpretations:

GL_TEXTURE_MIN_FILTER

Returns the single-valued texture minifying function, a symbolic constant, which can be one of the following: GL_NEAREST, GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, or GL_LINEAR_MIPMAP_LINEAR. The initial value is GL_NEAREST_MIPMAP_LINEAR.

GL_TEXTURE_MAG_FILTER

Returns the single-valued texture magnification function, a symbolic constant, which can be either GL_NEAREST or GL_LINEAR. The initial value is GL_LINEAR.

GL_TEXTURE_WRAP_S

Returns the single-valued wrapping function for texture coordinate s, a symbolic constant, which can be either: GL_CLAMP_TO_EDGE, or GL_REPEAT. The initial value is GL_REPEAT.

GL_TEXTURE_WRAP_T

Returns the single-valued wrapping function for texture coordinate t, a symbolic constant, which can be either: GL_CLAMP_TO_EDGE, or GL_REPEAT. The initial value is GL_REPEAT.

GL_GENERATE_MIPMAP

Returns a single boolean value indicating if automatic mipmap level updates are enabled. The initial value is GL_FALSE. See glTexParameter.

Notes

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

Errors

GL_INVALID_ENUM is generated if target or pname is not one of the accepted defined values.

See Also

glTexParameter

Copyright

Copyright © 2003-2004 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.