Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Protected Member Functions | Protected Attributes
render::Texture Class Reference

#include <Texture.h>

Inheritance diagram for render::Texture:
resource::Resource engine::Object

List of all members.

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

u8mBuffer
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

Detailed Description

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


Constructor & Destructor Documentation

render::Texture::Texture ( const std::string &  name,
resource::Serializer serializer 
)
render::Texture::~Texture ( ) [virtual]

Member Function Documentation

u32 render::Texture::getDepth ( )

Returns the depth of the texture.

References mDepth.

s32 render::Texture::getFlags ( )

Returns the flags of the texture.

References mFlags.

u32 render::Texture::getHeight ( )

Returns the height of the texture.

References mHeight.

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.

u32 render::Texture::getWidth ( )

Returns the width of the texture.

References mWidth.

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]
void render::Texture::setBuffer ( u8 buffer,
u32  size 
)

Sets the buffer of the texture.

References mBuffer, and mSize.

void render::Texture::setDepth ( u32  depth)

Sets the depth of the texture.

References mDepth.

void render::Texture::setFlags ( s32  flags)

Sets the flags of the texture.

References mFlags.

void render::Texture::setHeight ( u32  height)

Sets the height of the texture.

References mHeight.

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::setWidth ( u32  width)

Sets the width of the texture.

References mWidth.

void render::Texture::unloadImpl ( ) [protected, virtual]

Member Data Documentation

bool render::Texture::mHasAlpha [protected]

The number of bytes per pixel.

Referenced by getNumMipMaps(), initProperties(), setNumMipMaps(), and unloadImpl().

Image specific flags.

Referenced by getPixelSize(), initProperties(), setPixelSize(), and unloadImpl().

Reimplemented from resource::Resource.

Referenced by initProperties(), setBuffer(), and unloadImpl().


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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:09 by Doxygen (1.7.4)