nux-0.9.46
|
General Texture. More...
#include <NuxGraphics/GLTextureResourceManager.h>
Public Member Functions | |
Texture2D (NUX_FILE_LINE_PROTO) | |
Texture2D (const Texture2D &texture, NUX_FILE_LINE_PROTO) | |
Texture2D (const NTextureData &BaseTexture, NUX_FILE_LINE_PROTO) | |
Texture2D & | operator= (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 BaseTexture * | Clone () const |
General Texture.
The class of texture that cover power-of-two and non-power-of-two dimensions.
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 | ( | ) |
virtual BaseTexture* nux::Texture2D::Clone | ( | ) | const [virtual] |
void nux::Texture2D::GetData | ( | void * | Buffer, |
int | MipIndex, | ||
int | StrideY, | ||
int | face = 0 |
||
) | [virtual] |
Implements nux::BaseTexture.
BitmapFormat nux::Texture2D::GetFormat | ( | ) | const [inline, virtual] |
Implements nux::BaseTexture.
References nux::NTextureData::GetFormat().
int nux::Texture2D::GetHeight | ( | ) | const [inline, virtual] |
int nux::Texture2D::GetNumMipLevel | ( | ) | const [inline, virtual] |
Implements nux::BaseTexture.
References nux::NTextureData::GetNumMipmap().
int nux::Texture2D::GetWidth | ( | ) | const [inline, virtual] |
virtual bool nux::Texture2D::IsNull | ( | ) | const [inline, virtual] |
Implements nux::BaseTexture.
References nux::NTextureData::IsNull().
bool nux::Texture2D::IsPowerOfTwo | ( | ) | const [inline, virtual] |
Implements nux::BaseTexture.
References nux::NTextureData::GetHeight(), nux::NTextureData::GetWidth(), and nux::IsPowerOf2().
virtual bool nux::Texture2D::Update | ( | const NBitmapData * | BitmapData, |
bool | UpdateAndCacheResource = true |
||
) | [virtual] |
Update the hardware resources associated to this with the provided texture data.
BitmapData | The texture data to update into the hardware resource. |
UpdateAndCacheResource | if 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); |
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.
Filename | File name of texture data to update into the hardware resource. |
UpdateAndCacheResource | if 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); |
Implements nux::BaseTexture.