iso::gl::Texture Class Reference

#include <iso_gl_texture.h>

Inherited by iso::gl::BufferedTexture< DataType >.

Inheritance diagram for iso::gl::Texture:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 Texture (const math::Vector< unsigned int > &pSize, GLenum pTarget, GLint pLevel, GLint pInternalFormat, GLenum pFormat, GLenum pType) throw (GLException)
 create texture
virtual ~Texture ()
 destructor
bool created () const
 returns true if texture has been created, false otherwise
virtual void create () throw (GLException)
 create texture
template<typename DataType>
void create (DataType *pData) throw (GLException)
 create texture from data
virtual void update () throw (GLException)
 update texture based on internally stored buffered
template<typename DataType>
void update (DataType *pData) throw (GLException)
 update texture from data
int id () const
 return texture id
GLenum target () const
 return target
const math::Vector< int > & size () const
 return texture size
int channelCount () const
 return number of color channels
GLint internalFormat () const
 return internal format
GLenum format () const
 return pixel data format return pixel data format
GLenum type () const
 return pixel data type return pixel data type
void bind ()
 bind texture
void release ()
 release texture
void destroyTexture ()
 destroy texture
virtual base::String info () const
 obtain textual texture information

Protected Member Functions

 Texture ()
 default constructor

Protected Attributes

GLuint mId
math::Vector< int > mSize
 texture id
GLenum mTarget
 texture size
GLint mLevel
 texture target
GLint mInternalFormat
 mid mapping level
GLenum mFormat
 internal texture format
GLenum mType
 pixel data format
bool mCreated
 pixel data type

Friends

std::ostream & operator<< (std::ostream &pOstream, const Texture &pTexture)
 print texture information

Detailed Description

Created by Daniel Bisig on 12/4/07.


Constructor & Destructor Documentation

iso::gl::Texture::Texture ( const math::Vector< unsigned int > &  pSize,
GLenum  pTarget,
GLint  pLevel,
GLint  pInternalFormat,
GLenum  pFormat,
GLenum  pType 
) throw (GLException)

create texture

Parameters:
pSize texture size
pTarget texture target
pLevel mid mapping level
pInternalFormat internal texture format
pFormat pixel data format
pType pixel data type

iso::gl::Texture::~Texture (  )  [virtual]

destructor

iso::gl::Texture::Texture (  )  [protected]

default constructor


Member Function Documentation

bool iso::gl::Texture::created (  )  const [inline]

returns true if texture has been created, false otherwise

void iso::gl::Texture::create (  )  throw (GLException) [virtual]

create texture

Reimplemented in iso::gl::BufferedTexture< DataType >.

template<typename DataType>
void iso::gl::Texture::create ( DataType pData  )  throw (GLException)

create texture from data

Parameters:
pData texture data
Remarks:
fails if texture data has wrong format

void iso::gl::Texture::update (  )  throw (GLException) [virtual]

update texture based on internally stored buffered

has no meaning in this base class

Reimplemented in iso::gl::BufferedTexture< DataType >.

template<typename DataType>
void iso::gl::Texture::update ( DataType pData  )  throw (GLException)

update texture from data

Parameters:
pData texture data
Remarks:
fails if texture data has wrong format

int iso::gl::Texture::id (  )  const

return texture id

Returns:
texture id

GLenum iso::gl::Texture::target (  )  const

return target

Returns:
target

const math::Vector< int > & iso::gl::Texture::size (  )  const

return texture size

Returns:
texture size

int iso::gl::Texture::channelCount (  )  const

return number of color channels

Returns:
number of color channels

GLint iso::gl::Texture::internalFormat (  )  const

return internal format

Returns:
internal format

GLenum iso::gl::Texture::format (  )  const

return pixel data format return pixel data format

GLenum iso::gl::Texture::type (  )  const

return pixel data type return pixel data type

void iso::gl::Texture::bind (  ) 

bind texture

void iso::gl::Texture::release (  ) 

release texture

void iso::gl::Texture::destroyTexture (  ) 

destroy texture

base::String iso::gl::Texture::info (  )  const [virtual]

obtain textual texture information

Returns:
String containing texture information


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const Texture pTexture 
) [friend]

print texture information


Member Data Documentation

GLuint iso::gl::Texture::mId [protected]

math::Vector<int> iso::gl::Texture::mSize [protected]

texture id

GLenum iso::gl::Texture::mTarget [protected]

texture size

GLint iso::gl::Texture::mLevel [protected]

texture target

GLint iso::gl::Texture::mInternalFormat [protected]

mid mapping level

GLenum iso::gl::Texture::mFormat [protected]

internal texture format

GLenum iso::gl::Texture::mType [protected]

pixel data format

bool iso::gl::Texture::mCreated [protected]

pixel data type


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:01:56 2011 for iso_gl by  doxygen 1.5.1