Contents / Previous / Next


glTexParameter

You've now seen all the possible arguments for glTexParameter*(), which is summarized here:

void glTexParameter{if}(GLenum target, GLenum pname, TYPE param);
void glTexParameter{if}v(GLenum target, GLenum pname,TYPE *param); 
Sets various parameters that control how a texture is treated as it's applied to a fragment or stored in a texture object. The target parameter is either GL_TEXTURE_2D or GL_TEXTURE_1D to indicate a two- or one-dimensional texture. The possible values for pname and param are shown in the table. You can use the vector version of the command to supply an array of values for GL_TEXTURE_BORDER_COLOR, or you can supply individual values for other parameters using the nonvector version. If these values are supplied as integers, they're converted to floating-point according to the Table; they're also clamped to the range [0,1].

Parameter

Values

GL_TEXTURE_WRAP_S

GL_CLAMP, GL_REPEAT

GL_TEXTURE_WRAP_T

GL_CLAMP, GL_REPEAT

GL_TEXTURE_MAG_FILTER

GL_NEAREST, GL_LINEAR

GL_TEXTURE_MIN_FILTER

GL_NEAREST, GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_LINEAR

GL_TEXTURE_BORDER_COLOR

any four values in [0.0, 1.0]

GL_TEXTURE_PRIORITY

[0.0, 1.0] for the current texture object