Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents the internal format for a texture. More...
#include <omGraphicsTextureFormat.h>
Public Member Functions | |
TextureFormat () | |
Create an undefined texture format. More... | |
TextureFormat (Enum newFormat) | |
Create a texture format object from an enum specifying the type of format. More... | |
TextureFormat (const PixelFormat &newPixelFormat) | |
Create a texture format which can represent an image with the specified pixel type. More... | |
Size | getChannelCount () const |
Get the number of color channels that this texture format has. More... | |
Bool | isCompressed () const |
Get whether or not this texture format is compressed. More... | |
Bool | isFloatingPoint () const |
Get whether or not this texture format uses floating point pixel data. More... | |
Bool | isTransparent () const |
Return whether or not this texture format can be transparent. More... | |
const PixelFormat & | getPixelFormat () const |
Return an object that represents a pixel type compatible with this texture format. More... | |
Bool | supportsPixelFormat (const PixelFormat &pixelType) const |
Return whether or not the specified pixel type is compatible with this texture format. More... | |
operator Enum () const | |
Convert this texture format to an enum value. More... | |
String | toString () const |
Return a string representation of the texture format. More... | |
operator String () const | |
Convert this texture format into a string representation. More... | |
A class that represents the internal format for a texture.
This is the GPU-side semantic representation of the texture's type and usage.
|
inline |
Create an undefined texture format.
|
inline |
Create a texture format object from an enum specifying the type of format.
om::graphics::textures::TextureFormat::TextureFormat | ( | const PixelFormat & | newPixelFormat | ) |
Create a texture format which can represent an image with the specified pixel type.
Size om::graphics::textures::TextureFormat::getChannelCount | ( | ) | const |
Get the number of color channels that this texture format has.
Bool om::graphics::textures::TextureFormat::isCompressed | ( | ) | const |
Get whether or not this texture format is compressed.
Bool om::graphics::textures::TextureFormat::isFloatingPoint | ( | ) | const |
Get whether or not this texture format uses floating point pixel data.
Bool om::graphics::textures::TextureFormat::isTransparent | ( | ) | const |
Return whether or not this texture format can be transparent.
const PixelFormat& om::graphics::textures::TextureFormat::getPixelFormat | ( | ) | const |
Return an object that represents a pixel type compatible with this texture format.
The returned pixel type should have enough precision and the correct number of channels to be able to store an image with this texture format.
If there is no compatible pixel type, the PixelFormat::UNDEFINED value is returned.
|
inline |
Return whether or not the specified pixel type is compatible with this texture format.
|
inline |
Convert this texture format to an enum value.
String om::graphics::textures::TextureFormat::toString | ( | ) | const |
Return a string representation of the texture format.
|
inline |
Convert this texture format into a string representation.