GINO Graphics Suite - GINO v9.0  

gSetTextureMappingMode

Syntax

[C/C++:]
void gSetTextureMappingMode(int mode, ...);
[F90:]
subroutine gSetTextureMappingMode(mode, gBlendCol, gWraps, gWrapt, gMaxfil, gMinfil, gBorderCol)
integer, intent(in) :: mode
integer, optional, intent(in) :: gBendCol,gWraps,gWrapt,gMaxfil,gMinfil,gBorderCol

Arguments

mode
Texture mapping mode

= GOFF, Switch off texture mapping (default)
= GOVERLAY, Overlay texture on surface
= GMODULATE, Modulate texture colours with facet colour
= GBLEND, Blend texture colours with facet colour and a constant  colour gBlendCol

Optional Args.

gBlendCol
Blend mode colour (default = current background colour)

gWraps
Texture wrapping switch in S direction

= GREPEAT, Repeat texture map (default)
= GCLAMP, Clamp texture map

gWrapt
Texture wrapping switch in T direction

= GREPEAT, Repeat texture map (default)
= GCLAMP, Clamp texture map

gMaxfil
Filter when enlarging  texture map

= GNEAREST, Use nearest texel (default)
= GLINEAR, Use weighted average of 2x2 texels

gMinfil
Filter when reducing  texture map

= GNEAREST, Use nearest texel (default)
= GLINEAR, Use weighted average of 2x2 texels
= GNEARESTNEAREST, Nearest mipmap using nearest texel filter
= GNEARESTLINEAR, Nearest mipmap using linear texel filter
= GLINEARNEAREST, Linear interpolate mipmap using nearest texel filter
= GLINEARLINEAR, Linear interpolate mipmap and linear texel filter

gBorderCol
Texture map border colour (default = current background colour)

Description

The routine gSetTextureMappingMode() sets the current GINO texture mapping mode which by default is off.

When set to GOVERLAY, the current texture assigned by gDefineTexture() is mapped onto every facet or object subsequently displayed. When set to GMODULATE the current texture is merged with the facet or objects own colour. When set to GBLEND the current texture is merged with the facet colour and a constant colour defined in the optional argument gBlendCol.

The optional arguments gWraps and gWrapt define the action to be taken, where supplied or generated texture coordinates extend outside the default range of 0.0 to 1.0 in either the horizontal (S) or vertical (T) direction.

The optional arguments gMaxfil and gMinfil define the filters used when determining the texture map pixel (texel) to be displayed on the screen when enlarging or reducing the currently defined image. The additional settings for gMinfil apply where multiple texture maps (mipmaps) have been assigned using gDefineTexture() with levels greater than zero.

The optional argument gBorderCol is used to define a constant border colour, where no such border is attached to the currently defined texture map. This border colour is used in clamped images where the linear texel filtering option is also used.

Note that GOVERLAY mode only operates with textures with 3 or 4 bytes per pixel and GBLEND mode only works with textures with 1 or 2 bytes per pixel.

See Also

gSetTextureMappingMode Usage
gDefineTexture