glTexParameteri Function
GL_APICALL void GL_APIENTRY glTexParameteri(
GLenum target,
GLenum pname,
GLint param
);
| Name | Description | |
|---|---|---|
| in | target | Target texture. |
| in | pname | Name of the parameter to configure |
| in | param | Value to set for the parameter |
Sets a texture parameter as a GLint value.
You can set target to the following values.
GL_TEXTURE_2D | 2D texture. |
|---|---|
GL_TEXTURE_CUBE_MAP | Cube-map texture. |
You can set pname equal to GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_TEXTURE_MIN_LOD, or GL_GENERATE_MIPMAP.
GL_TEXTURE_MIN_FILTER specifies a texture minification filter. Set param 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 param 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 param 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 some texture formats support this).
You can also set pname to any parameter that can be specified with glTexParameterf.
The following errors occur in this function.
GL_INVALID_ENUM | The target or pname argument was set to an invalid value. |
|---|---|
GL_INVALID_VALUE | The param argument was set to an invalid value. |
GL_GENERATE_MIPMAP.CONFIDENTIAL