Computergrafik
Textureinstellungen
← 2D Texturdaten | ● | 2D Texturmodi →
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);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
coordinate mapping | effect |
---|---|
GL_CLAMP | nearest border color is extended to outside |
GL_REPEAT | inside color is repeated as tile pattern |
← 2D Texturdaten | ● | 2D Texturmodi →