Graphics Reference
In-Depth Information
The filtering modes are specified (along with many other texture
options) with
glTexParameter[i
|
f][v]
. The texture filtering modes are
described next, and the remaining options are described in subsequent
sections.
void
glTexParameteri
(GLenum
target,
GLenum
pname,
GLint
param
)
void
glTexParameteriv
(GLenum
target
, GLenum
pname
,
const GLint
*params
)
void
glTexParameterf
(GLenum
target
, GLenum
pname,
GLfloat
param
)
void
glTexParameterfv
(GLenum
target,
GLenum
pname,
const GLfloat
*params
)
the texture target can be
GL_TEXTURE_2D
,
GL_TEXTURE_3D
,
GL_TEXTURE_2D_ARRAY
, or
GL_TEXTURE_CUBE_MAP
target
the parameter to set; one of
GL_TEXTURE_BASE_LEVEL
GL_TEXTURE_COMPARE_FUNC
GL_TEXTURE_COMPARE_MODE
GL_TEXTURE_MIN_FILTER
GL_TEXTURE_MAG_FILTER
GL_TEXTURE_MIN_LOD
GL_TEXTURE_MAX_LOD
GL_TEXTURE_MAX_LEVEL
GL_TEXTURE_SWIZZLE_R
GL_TEXTURE_SWIZZLE_G
GL_TEXTURE_SWIZZLE_B
GL_TEXTURE_SWIZZLE_A
GL_TEXTURE_WRAP_S
GL_TEXTURE_WRAP_T
GL_TEXTURE_WRAP_R
pname
the value (or array of values for the āvā entrypoints) to set the
texture parameter to
If
pname
is
GL_TEXTURE_MAG_FILTER
, then
param
can be
GL_NEAREST
or
GL_LINEAR
If
pname
is
GL_TEXTURE_MIN_FILTER
, then
param
can be
GL_NEAREST
,
GL_LINEAR
,
GL_NEAREST_MIPMAP_NEAREST
,
GL_NEAREST_MIPMAP_LINEAR
,
GL_LINEAR_MIPMAP_NEAREST
,
or
GL_LINEAR_MIPMAP_LINEAR
params
(continues)