GLSHARPENTEXFUNCSGIS(3gl)GLSHARPENTEXFUNCSGIS(3gl)NAME
glSharpenTexFuncSGIS - Specify the function for sharpen magnification
filter
C SPECIFICATION
void glSharpenTexFuncSGIS( GLenum target,
GLsizei n,
const float* points
)
PARAMETERS
target Specifies the target texture, GL_TEXTURE_1D, GL_TEXTURE_2D, or
GL_TEXTURE_3D.
n Specifies number of the value pairs in points.
points Specifies the array of pairs of floating point values. The first
value of each value pair specifies a value of level-of-detail,
the second value specifies the corresponding function value.
DESCRIPTION
When a textured surface is viewed close up, the magnification of the
texture can sometimes cause bluring. Sharpen texture offers a way to
keep the image crisp. Sharpen texture works by extrapolating from the
level 1 image to level 0 image, creating a magnified image that has
sharper features than either mipmap.
When OpenGL applies a texture to a pixel, it computes a level-of-detail
(LOD) that represents the amount by which the base texture (level 0)
must be scaled. Magnification of the texture occurs if LOD is negative.
If sharpening of the texture is selected for the magnification filter,
the level 0 and the level 1 arrays of the the texure are linearly sam‐
pled. The resulting texture values computed from the level 0 array (T0)
and computed from the level 1 array (T1) are combined to compute the
final texture value (T):
T = ((1 + F(LOD) * T0) - (F(LOD) * T1)
glSharpenTexFuncSGIS defines the function F.
Sharpening can be enabled for all color channels, for the alpha channel
only, or for the red, green and blue channels by selecting GL_LIN‐
EAR_SHARPEN_SGIS, GL_LINEAR_SHARPEN_ALPHA_SGIS, or GL_LIN‐
EAR_SHARPEN_COLOR_SGIS, respectively for GL_TEXTURE_MAG_FILTER.
NOTES
glSharpenTexFuncSGIS is available only if the GL version is 1.2.2 or
greater.
ERRORS
GL_INVALID_ENUM is generated if target is not GL_TEXTURE_1D, GL_TEX‐
TURE_2D, or GL_TEXTURE_3D.
GL_INVALID_VALUE is generated if n is negative.
GL_INVALID_OPERATION is generated if glSharpenTexFuncSGIS is executed
between glBegin and the corresponding glEnd.
SEE ALSO
glTexParameter, glGetTexParameter, glGetSharpenTexFuncSGIS
6 June 01 GLSHARPENTEXFUNCSGIS(3gl)