glTexParameteriv Function

Syntax

GL_APICALL void GL_APIENTRY glTexParameteriv(
     GLenum target,
     GLenum pname,
     const GLint * params
);

Parameters

Name Description
in target Target texture.
in pname Name of the parameter to configure
in params Array storing the parameter settings

Return Values

There is no return value.

Description

Sets a texture parameter array as GLint values.

You can set target to the following values.

GL_TEXTURE_2D2D texture.
GL_TEXTURE_CUBE_MAPCube-map texture.

Set pname to one of the following values.

GL_TEXTURE_MIN_FILTERSets the texture minification filter.
GL_TEXTURE_MAG_FILTERSets the texture magnification filter.
GL_TEXTURE_WRAP_SSets the wrapping mode of texture coordinate s.
GL_TEXTURE_WRAP_TSets the wrapping mode of texture coordinate t.
GL_TEXTURE_MIN_LODSets the smallest mipmap level.
GL_GENERATE_MIPMAPSets mipmap data to be automatically generated or not.

GL_TEXTURE_MIN_FILTER specifies a texture minification filter. Set params[0] to GL_NEAREST, GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, or GL_LINEAR_MIPMAP_LINEAR. GL_TEXTURE_MAG_FILTER specifies a texture magnification filter. Set params[0] to GL_NEAREST or GL_LINEAR.

GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T specify the wrapping modes for texture coordinates s and t, respectively. Set params[0] to GL_CLAMP_TO_EDGE, GL_REPEAT, GL_CLAMP_TO_BORDER, or GL_MIRRORED_REPEAT. GL_TEXTURE_MIN_LOD specifies the minimum level-of-detail for valid mipmaps. GL_GENERATE_MIPMAP specifies whether mipmap data is automatically generated (only for some texture formats). You can also set pname to any parameter that can be specified with glTexParameterfv.

The following errors occur in this function.

GL_INVALID_ENUMThe target or pname argument was set to an invalid value.
GL_INVALID_VALUEThe param argument was set to an invalid value.

Revision History

2010/06/09
Added support for GL_GENERATE_MIPMAP.
2010/01/07
Initial version.

CONFIDENTIAL