MedicalVisualization

Textureinstellungen

Texture Data | | 2DTexturMipmaps

Interpolation mode of the 2D texture:

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

Extrapolation mode of the 2D texture:

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
coordinate mappingeffect
GL_CLAMPnearest border color is extended to outside
GL_REPEATinside color is repeated as tile pattern

Der Textur Modus der 2D Textur wird spezifiziert via:

glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);

Mode of combining vertex color attribute with texture color:

texturing modevertex color is modified by texture color via
GL_REPLACEreplace vertex color with texture color
GL_DECALlinear interpolation with texture alpha
GL_MODULATEcomponentwise multiplication
GL_BLENDcomponentwise linear interpolation

Example with red vertex color, blue texture color, partially semi-transparent texture and texture coordinate repetition:

TexEnvRep TexEnvDec TexEnvMod TexEnvBld

Initially, texture mapping ist disabled in OpenGL. It is enabled with:

glEnable(GL_TEXTURE_2D);

More details in chapter #9 of the The Red Book (PDF, Codebeispiele)

Texture Data | | 2DTexturMipmaps

Options: