Computergrafik

Textureinstellungen

2D Texturdaten Besonderheiten | | 2D Texturen Laden

Die Interpolationsart der 2D Textur wird spezifiziert durch:

glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
filter typefilter effect
GL_LINEARbilinear interpolation
GL_NEARESTnearest neighbor (no interpolation)
GL_LINEAR_MIPMAP_LINEARbilinear interpolation with mipmapping
GL_NEAREST_MIPMAP_NEARESTnearest neighbor with mipmapping

Das Verhalten der Texturkoordinaten ausserhalb der Textur wird spezifiziert durch:

glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
coordinate mappingeffect
GL_CLAMP_TO_EDGEnearest border color is extended to outside
GL_CLAMP_TO_BORDERoutside color is explicitly specified
GL_REPEATinside color is repeated as tile pattern
GL_MIRRORED_REPEAT
TexRepClp TexRepRep

Live Demo: Texture Parameters (T#16)

2D Texturdaten Besonderheiten | | 2D Texturen Laden

Options: