Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
#include <Texture.h>
Public Member Functions | |
u32 | getDepth () |
Returns the depth of the texture. | |
s32 | getFlags () |
Returns the flags of the texture. | |
u32 | getHeight () |
Returns the height of the texture. | |
u32 | getNumMipMaps () |
Gets the number of mipmaps to be used for this texture. | |
resource::PixelFormat | getPixelFormat () const |
Returns the pixel format for the texture surface. | |
u8 | getPixelSize () |
Returns the pixel size of the texture. | |
TextureType | getTextureType () |
Gets the type of texture. | |
u32 | getWidth () |
Returns the width of the texture. | |
void | hasAlpha (bool alpha) |
Sets if the texture has an alpha layer. | |
bool | hasAlpha () |
Returns true if the texture has an alpha layer. | |
void | setBuffer (u8 *buffer, u32 size) |
Sets the buffer of the texture. | |
void | setDepth (u32 depth) |
Sets the depth of the texture. | |
void | setFlags (s32 flags) |
Sets the flags of the texture. | |
void | setHeight (u32 height) |
Sets the height of the texture. | |
void | setNumMipMaps (u32 num) |
Sets the number of mipmaps to be used for this texture. | |
void | setPixelFormat (const resource::PixelFormat &format) |
Sets the pixel format for the texture surface. | |
void | setPixelSize (u8 size) |
Sets the pixel size of the texture. | |
void | setTextureType (const TextureType &type) |
Sets the type of texture,. | |
void | setWidth (u32 width) |
Sets the width of the texture. | |
Texture (const std::string &name, resource::Serializer *serializer) | |
virtual | ~Texture () |
Protected Member Functions | |
void | initProperties () |
virtual void | unloadImpl () |
Protected Attributes | |
u8 * | mBuffer |
u32 | mDepth |
s32 | mFlags |
bool | mHasAlpha |
u32 | mHeight |
u32 | mNumMipmaps |
The number of bytes per pixel. | |
resource::PixelFormat | mPixelFormat |
u8 | mPixelSize |
Image specific flags. | |
u32 | mSize |
TextureType | mTextureType |
u32 | mWidth |
Abstract class representing a Texture resource.
The actual concrete subclass which will exist for a texture is dependent on the rendering system in use (Direct3D, OpenGL etc).
render::Texture::Texture | ( | const std::string & | name, |
resource::Serializer * | serializer | ||
) |
References initProperties(), resource::Resource::mResourceType, and resource::RT_RESOURCE_TEXTURE.
render::Texture::~Texture | ( | ) | [virtual] |
u32 render::Texture::getNumMipMaps | ( | ) |
Gets the number of mipmaps to be used for this texture.
References mNumMipmaps.
resource::PixelFormat render::Texture::getPixelFormat | ( | ) | const |
Returns the pixel format for the texture surface.
References mPixelFormat.
u8 render::Texture::getPixelSize | ( | ) |
Returns the pixel size of the texture.
References mPixelSize.
TextureType render::Texture::getTextureType | ( | ) |
Gets the type of texture.
References mTextureType.
void render::Texture::hasAlpha | ( | bool | alpha | ) |
Sets if the texture has an alpha layer.
References mHasAlpha.
bool render::Texture::hasAlpha | ( | ) |
Returns true if the texture has an alpha layer.
References mHasAlpha.
void render::Texture::initProperties | ( | ) | [protected] |
Reimplemented from resource::Resource.
References mBuffer, mDepth, mFlags, mHasAlpha, mHeight, mNumMipmaps, mPixelFormat, mPixelSize, mSize, mTextureType, mWidth, resource::PF_UNKNOWN, and render::TEX_TYPE_2D.
Referenced by Texture().
void render::Texture::setNumMipMaps | ( | u32 | num | ) |
Sets the number of mipmaps to be used for this texture.
References mNumMipmaps.
void render::Texture::setPixelFormat | ( | const resource::PixelFormat & | format | ) |
Sets the pixel format for the texture surface.
References mPixelFormat.
void render::Texture::setPixelSize | ( | u8 | size | ) |
Sets the pixel size of the texture.
References mPixelSize.
void render::Texture::setTextureType | ( | const TextureType & | type | ) |
Sets the type of texture,.
References mTextureType.
void render::Texture::unloadImpl | ( | ) | [protected, virtual] |
Reimplemented from resource::Resource.
References mBuffer, mDepth, mFlags, mHasAlpha, mHeight, mNumMipmaps, mPixelFormat, mPixelSize, mSize, mWidth, and resource::PF_UNKNOWN.
u8* render::Texture::mBuffer [protected] |
Referenced by initProperties(), setBuffer(), and unloadImpl().
u32 render::Texture::mDepth [protected] |
Referenced by getDepth(), initProperties(), setDepth(), and unloadImpl().
s32 render::Texture::mFlags [protected] |
Referenced by getFlags(), initProperties(), setFlags(), and unloadImpl().
bool render::Texture::mHasAlpha [protected] |
Referenced by hasAlpha(), initProperties(), and unloadImpl().
u32 render::Texture::mHeight [protected] |
Referenced by getHeight(), initProperties(), setHeight(), and unloadImpl().
u32 render::Texture::mNumMipmaps [protected] |
The number of bytes per pixel.
Referenced by getNumMipMaps(), initProperties(), setNumMipMaps(), and unloadImpl().
resource::PixelFormat render::Texture::mPixelFormat [protected] |
Referenced by getPixelFormat(), initProperties(), setPixelFormat(), and unloadImpl().
u8 render::Texture::mPixelSize [protected] |
Image specific flags.
Referenced by getPixelSize(), initProperties(), setPixelSize(), and unloadImpl().
u32 render::Texture::mSize [protected] |
Reimplemented from resource::Resource.
Referenced by initProperties(), setBuffer(), and unloadImpl().
TextureType render::Texture::mTextureType [protected] |
Referenced by getTextureType(), initProperties(), and setTextureType().
u32 render::Texture::mWidth [protected] |
Referenced by getWidth(), initProperties(), setWidth(), and unloadImpl().
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:09 by
Doxygen
(1.7.4)
|