class TextureAttribute
Defined in:
The C4Attributes.h
TextureAttribute
class is the base class for attributes that use a texture map.
Definition
class TextureAttribute : public Attribute
Member Functions
TextureAttribute::GetTextureName |
Returns the name of the texture map. |
TextureAttribute::GetTexture |
Returns the texture map object. |
TextureAttribute::SetTexture |
Sets the texture map object. |
TextureAttribute::GetTextureBlendMode |
Returns the texture blend mode. |
TextureAttribute::SetTextureBlendMode |
Sets the texture blend mode. |
Constructor
TextureAttribute(AttributeType type, const char *name);
TextureAttribute(AttributeType type, Texture *texture);
TextureAttribute(AttributeType type, const TextureHeader *header, const void *image = nullptr);
TextureAttribute
class can only exist as the base class for other material attribute classes that use texture maps.
Parameters
type |
The attribute type. This must be the type of a subclass that inherits from TextureAttribute .
|
name |
The name of the texture map to load. |
texture |
The texture object to use. Specifying this parameter increments the reference count of the texture object. |
header |
A texture header from which to construct a new texture object. |
image |
A pointer to a texture image that is used if the texture header does not specify an offset to an image. |
Description
The TextureAttribute
class encapsulates information about a texture map for other material attributes. If a TextureAttribute
object is constructed by passing the name
parameter, then the texture map is loaded through the Resource Manager. If a TextureAttribute
object is constructed by passing the header
and image
parameters, then a new texture map is constructed using the information in the TextureHeader
structure. If the image
parameter is not nullptr
, then the texture image is read from the location to which it points; otherwise, the texture header specifies the location of the image.
Base Classes
Attribute |
A TextureAttribute is a specific type of attribute.
|
See Also