Om
1.0.0
A universal framework for multimedia simulation
|
A class that specifies how a texture is semantically used for rendering. More...
#include <omGraphicsTextureUsage.h>
Public Types | |
enum | Enum { UNDEFINED = 0, AMBIENT_COLOR_MAP, DIFFUSE_COLOR_MAP, SPECULAR_COLOR_MAP, NORMAL_MAP, DISPLACEMENT_MAP, HEIGHT_MAP = DISPLACEMENT_MAP, ENVIRONMENT_MAP, SKY_MAP, LIGHT_MAP, ALPHA_MAP, DIRECTIONAL_LIGHT_SHADOW_MAP, DIRECTIONAL_LIGHT_CSM, DIRECTIONAL_LIGHT_CSM_0, DIRECTIONAL_LIGHT_CSM_1 = DIRECTIONAL_LIGHT_CSM_0 + 1, DIRECTIONAL_LIGHT_CSM_2 = DIRECTIONAL_LIGHT_CSM_0 + 2, DIRECTIONAL_LIGHT_CSM_3 = DIRECTIONAL_LIGHT_CSM_0 + 3, DIRECTIONAL_LIGHT_CSM_4 = DIRECTIONAL_LIGHT_CSM_0 + 4, DIRECTIONAL_LIGHT_CSM_5 = DIRECTIONAL_LIGHT_CSM_0 + 5, DIRECTIONAL_LIGHT_CSM_6 = DIRECTIONAL_LIGHT_CSM_0 + 6, DIRECTIONAL_LIGHT_CSM_7 = DIRECTIONAL_LIGHT_CSM_0 + 7, DIRECTIONAL_LIGHT_CSM_ARRAY, POINT_LIGHT_SHADOW_CUBE_MAP, SPOT_LIGHT_SHADOW_MAP, GUI_GLYPH, GUI_IMAGE } |
Public Member Functions | |
TextureUsage () | |
Create a new undefined texture usage. More... | |
TextureUsage (Enum newUsage) | |
Create a new texture usage with the specified texture usage enum value. More... | |
TextureUsage (Enum newUsage, Index newIndex) | |
Create a new texture usage with the specified texture usage enum value and index. More... | |
operator Enum () const | |
Convert this texture usage to an enum value. More... | |
Bool | operator== (const TextureUsage::Enum otherEnum) const |
Return whether or not this texture usage is the same as another. More... | |
Bool | operator== (const TextureUsage &other) const |
Return whether or not this texture usage is the same as another. More... | |
Bool | operator!= (const TextureUsage::Enum otherEnum) const |
Return whether or not this texture usage is different than another. More... | |
Bool | operator!= (const TextureUsage &other) const |
Return whether or not this texture usage is different than another. More... | |
Bool | isValidType (const TextureType &type) const |
Return whether or not the specified texture type is a valid type for this usage. More... | |
Bool | isValidType (const Texture &texture) const |
Return whether or not the specified texture is a valid type for this usage. More... | |
Bool | isShadow () const |
Return whether or not this texture usage represents a shadow map (depth texture) format. More... | |
Index | getIndex () const |
Return an index for the shader attribute usage. More... | |
void | setIndex (Index newIndex) |
Return an index for the shader attribute usage. More... | |
String | toString () const |
Return a string representation of the texture usage. More... | |
operator String () const | |
Convert this texture usage into a string representation. More... | |
Hash | getHashCode () const |
Return a hash code for this texture usage. More... | |
A class that specifies how a texture is semantically used for rendering.
Each instance allows the user to specify an enum value indicating the type of usage and also an integral index for that usage. This allows the user to specify multiple color map usages, for instance.
|
inline |
Create a new undefined texture usage.
|
inline |
Create a new texture usage with the specified texture usage enum value.
Create a new texture usage with the specified texture usage enum value and index.
|
inline |
Convert this texture usage to an enum value.
|
inline |
Return whether or not this texture usage is the same as another.
This operator does not compare any usage index, just the usage type.
|
inline |
Return whether or not this texture usage is the same as another.
|
inline |
Return whether or not this texture usage is different than another.
This operator does not compare any usage index, just the usage type.
|
inline |
Return whether or not this texture usage is different than another.
Bool om::graphics::textures::TextureUsage::isValidType | ( | const TextureType & | type | ) | const |
Return whether or not the specified texture type is a valid type for this usage.
Return whether or not the specified texture is a valid type for this usage.
Bool om::graphics::textures::TextureUsage::isShadow | ( | ) | const |
Return whether or not this texture usage represents a shadow map (depth texture) format.
|
inline |
Return an index for the shader attribute usage.
This value allows the user to keep track of multiple distinct usages separately (i.e. for multiple color maps) that have the same usage type.
|
inline |
Return an index for the shader attribute usage.
This value allows the user to keep track of multiple distinct usages separately (i.e. for multiple color maps) that have the same usage type.
String om::graphics::textures::TextureUsage::toString | ( | ) | const |
Return a string representation of the texture usage.
|
inline |
Convert this texture usage into a string representation.
|
inline |
Return a hash code for this texture usage.