TextureData Class Reference

The underlying data of a texture. More...

#include <TextureData.h>

Public Member Functions

 TextureData ()
 Constructor. More...
 
 TextureData (const std::string &fileName)
 Constructor. More...
 
 TextureData (GLsizei width, GLsizei height, GLenum format=GL_RGBA, ImageDataPtr imageData=nullptr)
 Constructor. More...
 
virtual ~TextureData ()
 Virtual destructor. More...
 
virtual TextureDataload (const std::string &fileName)
 Loads the texture from an image. More...
 
virtual TextureDatacreate (GLsizei width, GLsizei height, GLenum format=GL_RGBA, ImageDataPtr imageData=nullptr)
 Creates a texture. More...
 
GLsizei getWidth () const
 Gets the width of the texture. More...
 
GLsizei getHeight () const
 Gets the height of the texture. More...
 
GLenum getFormat () const
 Gets the format of the texture. More...
 
ImageDataPtr getImageData () const
 Gets the image data of the texture. More...
 

Detailed Description

The underlying data of a texture.

Author
David Steiner

Constructor & Destructor Documentation

TextureData::TextureData ( )
inline

Constructor.

TextureData::TextureData ( const std::string &  fileName)

Constructor.

Parameters
[in]fileNameThe name of the texture file
TextureData::TextureData ( GLsizei  width,
GLsizei  height,
GLenum  format = GL_RGBA,
ImageDataPtr  imageData = nullptr 
)

Constructor.

Parameters
[in]width
[in]height
[in]format
[in]imageData
virtual TextureData::~TextureData ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

TextureData & TextureData::create ( GLsizei  width,
GLsizei  height,
GLenum  format = GL_RGBA,
ImageDataPtr  imageData = nullptr 
)
virtual

Creates a texture.

Parameters
[in]width
[in]height
[in]format
[in]imageData
GLenum TextureData::getFormat ( ) const
inline

Gets the format of the texture.

GLsizei TextureData::getHeight ( ) const
inline

Gets the height of the texture.

ImageDataPtr TextureData::getImageData ( ) const
inline

Gets the image data of the texture.

GLsizei TextureData::getWidth ( ) const
inline

Gets the width of the texture.

virtual TextureData& TextureData::load ( const std::string &  fileName)
virtual

Loads the texture from an image.

Parameters
[in]fileNameThe name of the texture file