nux-0.9.48

nux::Texture2D Class Reference

General Texture. More...

#include <NuxGraphics/GLTextureResourceManager.h>

Inheritance diagram for nux::Texture2D:
nux::BaseTexture nux::ResourceData nux::Object nux::Trackable

Public Member Functions

 Texture2D (NUX_FILE_LINE_PROTO)
 Texture2D (const Texture2D &texture, NUX_FILE_LINE_PROTO)
 Texture2D (const NTextureData &BaseTexture, NUX_FILE_LINE_PROTO)
Texture2Doperator= (const Texture2D &texture)
 ~Texture2D ()
virtual bool Update (const NBitmapData *BitmapData, bool UpdateAndCacheResource=true)
virtual bool Update (const TCHAR *Filename, bool UpdateAndCacheResource=true)
virtual bool IsNull () const
void GetData (void *Buffer, int MipIndex, int StrideY, int face=0)
int GetNumMipLevel () const
int GetWidth () const
int GetHeight () const
BitmapFormat GetFormat () const
bool IsPowerOfTwo () const
virtual BaseTextureClone () const

Detailed Description

General Texture.

The class of texture that cover power-of-two and non-power-of-two dimensions.


Constructor & Destructor Documentation

nux::Texture2D::Texture2D ( NUX_FILE_LINE_PROTO  )
nux::Texture2D::Texture2D ( const Texture2D texture,
NUX_FILE_LINE_PROTO   
)
nux::Texture2D::Texture2D ( const NTextureData BaseTexture,
NUX_FILE_LINE_PROTO   
)
nux::Texture2D::~Texture2D ( )

Member Function Documentation

virtual BaseTexture* nux::Texture2D::Clone ( ) const [virtual]

Clone the texture.

Returns:
A cloned version of this texture.

Implements nux::BaseTexture.

void nux::Texture2D::GetData ( void *  Buffer,
int  MipIndex,
int  StrideY,
int  face = 0 
) [virtual]

Implements nux::BaseTexture.

BitmapFormat nux::Texture2D::GetFormat ( ) const [inline, virtual]
Returns:
The texture data format.

Implements nux::BaseTexture.

References nux::NTextureData::GetFormat().

int nux::Texture2D::GetHeight ( ) const [inline, virtual]
Returns:
The texture height.

Implements nux::BaseTexture.

References nux::NTextureData::GetHeight().

int nux::Texture2D::GetNumMipLevel ( ) const [inline, virtual]
Returns:
The number of mip maps in the texture.

Implements nux::BaseTexture.

References nux::NTextureData::GetNumMipmap().

int nux::Texture2D::GetWidth ( ) const [inline, virtual]
Returns:
The texture width.

Implements nux::BaseTexture.

References nux::NTextureData::GetWidth().

virtual bool nux::Texture2D::IsNull ( ) const [inline, virtual]
Returns:
True if the texture storage contains valid bitmap data.

Implements nux::BaseTexture.

References nux::NTextureData::IsNull().

bool nux::Texture2D::IsPowerOfTwo ( ) const [inline, virtual]
Returns:
True if the width and height of the texture are powers of two.

Implements nux::BaseTexture.

References nux::NTextureData::GetHeight(), nux::NTextureData::GetWidth(), and nux::IsPowerOf2().

Texture2D& nux::Texture2D::operator= ( const Texture2D texture)
virtual bool nux::Texture2D::Update ( const NBitmapData BitmapData,
bool  UpdateAndCacheResource = true 
) [virtual]

Update the hardware resources associated to this with the provided texture data.

Parameters:
BitmapDataThe texture data to update into the hardware resource.
UpdateAndCacheResourceif True, then the texture data is loaded into this object, and the caching into hardware data is done right away. If false, the caching is done latter by calling GetThreadGraphicsContext()->CacheResource(this);
Returns:
True is there was not error.

Implements nux::BaseTexture.

virtual bool nux::Texture2D::Update ( const TCHAR Filename,
bool  UpdateAndCacheResource = true 
) [virtual]

Update the hardware resources associated to this object with the data associated to the file name.

Parameters:
FilenameFile name of texture data to update into the hardware resource.
UpdateAndCacheResourceif True, then the texture data is loaded into this object, and the caching into hardware data is done right away. If false, the caching is done latter by calling GetThreadGraphicsContext()->CacheResource(this);
Returns:
True is there was not error.

Implements nux::BaseTexture.


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