MedicalVisualization

3D Texture Parameters

3D Texture Data | | 3D Texture Example

3D texture interpolation mode:

glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
filter typefilter effect
GL_LINEARtrilinear interpolation
GL_NEARESTnearest neighbor (no interpolation)
GL_LINEAR_MIPMAP_LINEARtrilinear interpolation with mipmapping
GL_NEAREST_MIPMAP_NEARESTnearest neighbor with mipmapping

3D texture clamping:

glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_WRAP_S,GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_WRAP_T,GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_WRAP_R,GL_CLAMP);
coordinate mappingmapping effect
GL_CLAMPnearest border color is extended to outside
GL_REPEATinside color is repeated as tile pattern

Texturing mode for all 2D and 3D textures:

glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
texturing modevertex color is modified by texture color via
GL_DECALlinear interpolation with texture alpha
GL_MODULATEcomponentwise multiplication
GL_BLENDcomponentwise linear interpolation
GL_REPLACEreplace vertex color with texture color

Initially, 3D texturing is off. 3D texturing with the actually bound object is enabled via:

glEnable(GL_TEXTURE_3D);

Even if texturing is off, the state of the texture objectes is retained.

3D Texture Data | | 3D Texture Example

Options: