Om  1.0.0
A universal framework for multimedia simulation
Public Types | Public Member Functions | List of all members
om::graphics::textures::TextureFormat Class Reference

A class that represents the internal format for a texture. More...

#include <omGraphicsTextureFormat.h>

Public Types

enum  Enum {
  DEPTH, ALPHA, GRAYSCALE, GRAYSCALE_ALPHA,
  INTENSITY, RGB, RGBA, ALPHA_16F,
  GRAYSCALE_16F, GRAYSCALE_ALPHA_16F, INTENSITY_16F, RGB_16F,
  RGBA_16F, ALPHA_32F, GRAYSCALE_32F, GRAYSCALE_ALPHA_32F,
  INTENSITY_32F, RGB_32F, RGBA_32F, COMPRESSED_ALPHA,
  COMPRESSED_GRAYSCALE, COMPRESSED_GRAYSCALE_ALPHA, COMPRESSED_INTENSITY, COMPRESSED_RGB,
  COMPRESSED_RGBA, UNDEFINED
}
 

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...
 

Detailed Description

A class that represents the internal format for a texture.

This is the GPU-side semantic representation of the texture's type and usage.

Member Enumeration Documentation

Enumerator
DEPTH 

A depth texture in the GPU's native depth format.

ALPHA 

An 8-bits-per-pixel alpha-channel texture.

GRAYSCALE 

An 8-bits-per-pixel grayscale (lightmap) texture.

GRAYSCALE_ALPHA 

An 8-bit grayscale (lightmap) texture with an 8-bit alpha channel.

INTENSITY 

An 8-bits-per-pixel intensity texture.

This is like a lightmap but it affects the alpha channel as well.

RGB 

An 8-bits-per-channel RGB texture.

RGBA 

An 8-bits-per-channel RGB texture with an alpha channel.

ALPHA_16F 

A 16-bit floating-point alpha-channel texture.

GRAYSCALE_16F 

A 16-bit floating-point grayscale (lightmap) texture.

GRAYSCALE_ALPHA_16F 

A 16-bit floating-point (lightmap) texture with a 16-bit floating-point alpha channel.

INTENSITY_16F 

A 16-bit floating-point intensity texture.

This is like a lightmap but it affects the alpha channel as well.

RGB_16F 

A 16-bits-per-channel floating-point RGB texture.

RGBA_16F 

A 16-bits-per-channel floating-point RGB texture with an alpha channel.

ALPHA_32F 

A 32-bit floating-point alpha-channel texture.

GRAYSCALE_32F 

A 32-bit floating-point grayscale (lightmap) texture.

GRAYSCALE_ALPHA_32F 

A 32-bit floating-point (lightmap) texture with a 16-bit floating-point alpha channel.

INTENSITY_32F 

A 32-bit floating-point intensity texture.

This is like a lightmap but it affects the alpha channel as well.

RGB_32F 

A 32-bits-per-channel floating-point RGB texture.

RGBA_32F 

A 32-bits-per-channel floating-point RGB texture with an alpha channel.

COMPRESSED_ALPHA 

An 8-bits-per-pixel compressed alpha-channel texture.

COMPRESSED_GRAYSCALE 

An 8-bits-per-pixel compressed grayscale (lightmap) texture.

COMPRESSED_GRAYSCALE_ALPHA 

An 8-bit compressed grayscale (lightmap) texture with an 8-bit alpha channel.

COMPRESSED_INTENSITY 

An 8-bits-per-pixel compressed intensity texture.

This is like a lightmap but it affects the alpha channel as well.

COMPRESSED_RGB 

An 8-bits-per-channel compressed RGB texture.

COMPRESSED_RGBA 

An 8-bits-per-channel compressed RGB texture with an alpha channel.

UNDEFINED 

An undefined texture format.

Constructor & Destructor Documentation

om::graphics::textures::TextureFormat::TextureFormat ( )
inline

Create an undefined texture format.

om::graphics::textures::TextureFormat::TextureFormat ( Enum  newFormat)
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.

Member Function Documentation

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.

Bool om::graphics::textures::TextureFormat::supportsPixelFormat ( const PixelFormat &  pixelType) const
inline

Return whether or not the specified pixel type is compatible with this texture format.

om::graphics::textures::TextureFormat::operator Enum ( ) const
inline

Convert this texture format to an enum value.

String om::graphics::textures::TextureFormat::toString ( ) const

Return a string representation of the texture format.

om::graphics::textures::TextureFormat::operator String ( ) const
inline

Convert this texture format into a string representation.


The documentation for this class was generated from the following file: