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);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
filter type | filter effect |
---|---|
GL_LINEAR | bilinear interpolation |
GL_NEAREST | nearest neighbor (no interpolation) |
GL_LINEAR_MIPMAP_LINEAR | bilinear interpolation with mipmapping |
GL_NEAREST_MIPMAP_NEAREST | nearest 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);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
coordinate mapping | effect |
---|---|
GL_CLAMP_TO_EDGE | nearest border color is extended to outside |
GL_CLAMP_TO_BORDER | outside color is explicitly specified |
GL_REPEAT | inside color is repeated as tile pattern |
GL_MIRRORED_REPEAT | … |
Live Demo: Texture Parameters (T#16)