SilverScreen Solid Modeler

MAKE_TEXTURE_FLAG

MAKE_TEXTURE_FLAG

Previous topic Next topic  

MAKE_TEXTURE_FLAG

Previous topic Next topic JavaScript is required for the print function  

 

SilverScreenAPI

 

USINT32 MAKE_TEXTURE_FLAG ( int index, int map, int mode, int flags )

 

int index;   // An integer value that is a texture index

int map;     // An integer value that is a texture mapping mode

int mode;    // An integer value that is a texture blending mode

int flags;   // An integer value that is a texture bit-flag

 

 




Synopsis

#include "silver.h"

 

The MAKE_TEXTURE_FLAG macro combines a texture index, map, blend-mode, and flags into a 32-bit unsigned integer value.

 

 

Parameters

index is an integer value that is an index into the global texture table. It must be between 1 and 65535.

 

map is a texture mapping mode whose meaning is as follows:

 

Constant

Meaning

TEXTURE_MAP_SPHERE

The texture is applied to the geometry using a spherical projection

TEXTURE_MAP_CYLINDER

The texture is applied to the geometry using a cylindrical projection

TEXTURE_MAP_PLANE

The texture is applied to the geometry using a planar projection

TEXTURE_MAP_BOX

The texture is applied to the geometry using box-mapping

 

mode is a texture decal mode whose meaning is as follows:

 

Constant

Meaning

TEXTURE_MODE_REPLACE

The texture will replace the surface color when it is applied to geometry.

TEXTURE_MODE_MODULATE

The texture will be blended with the surface color when it is applied to the geometry.

 

flags is a bit-flag whose meaning is as follows. These flags may be combined with the Or operator '|'

 

Constant

Meaning

TEXTURE_FLAG_HORZFLIP

Flip the texture horizontally before applying it to geometry

TEXTURE_FLAG_VERTFLIP

Flip the texture vertically before applying it to geometry

TEXTURE_FLAG_STRETCHTOFIT

Stretch the texture to fit the geometry in a manner appropriate for the mapping.

TEXTURE_FLAG_IGNORE_ALPHA

If the texture image contains alpha data do not use it

 

 

Return Value

MAKE_TEXTURE_FLAG returns a 32-bit unsigned integer value that is appropriate for a Flags field of a TEXTURE_DATA data type.

 

See Also

TEXTURE_FLAGS, TEXTURE_INDEX, TEXTURE_MAP, TEXTURE_MODE, TEXTURE_DATA