opentl::core::cvdata::TextureGpu Class Reference

Class for storing GPU texture related management information. More...

Inherits opentl::core::cvdata::TimedData.

List of all members.

Public Member Functions

virtual TextureGpuclone () const
 Creates a new TextureGpu class instance.
virtual void copyToImage (opentl::core::cvdata::Image &img, int &upperLeftX, int &upperLeftY, int &width, int &height) const
 Copy texture to image in a sub-region.
virtual void copyToImage (opentl::core::cvdata::Image &img) const
 Copy texture to image.
GLenum getTexChanSeq () const
 Return texture channel sequence (e.g. GL_RGB).
GLenum getTexDataType () const
 Return texture data type (e.g. GL_UNSIGNED_BYTE).
GLuint getTexId () const
 Return GL context specific texture Id.
GLenum getTexInternalDataType () const
 Return texture internal data type (e.g. GL_RGBA32F_ARB).
GLenum getTexTargetType () const
 Return texture target type (e.g. GL_TEXTURE_RECTANGLE_ARB).
int height () const
 Return the height of the texture.
virtual TextureGpuoperator= (const TextureGpu &shape)
 Assign operator.
 TextureGpu (const opentl::core::cvdata::Image &srcImg, GLenum texInternalDataType=GL_RGB8, GLenum texTargetType=GL_TEXTURE_RECTANGLE_ARB)
 Constructor for a 2D texture from Image.
 TextureGpu (int width, int height, GLenum texDataType=GL_UNSIGNED_BYTE, GLenum texChanSeq=GL_RGB, GLenum texInternalDataType=GL_RGB8, GLenum texTargetType=GL_TEXTURE_RECTANGLE_ARB)
 Constructor for a 1D or 2D texture.
virtual void updateFromImage (const opentl::core::cvdata::Image &img)
 Update whole texture area from image.
int width () const
 Return the width of the texture.
virtual ~TextureGpu ()
 Destructor.

Static Public Member Functions

static std::string getImageDataTypeString (const opentl::core::cvdata::Image &img)
 Return estimated image data type as string for given image.
static GLenum getTexChannelSeqByGivenImage (const opentl::core::cvdata::Image &img)
 Return estimated texture channel sequence for given image (e.g. GL_RGB).
static GLenum getTexDataTypeByGivenImage (const opentl::core::cvdata::Image &img)
 Return estimated texture data type for given image (e.g. GL_UNSIGNED_BYTE).

Protected Member Functions

virtual void setTextureGenerationParameters ()
 Sets texture generation parameters. HINT: Derive this class and change this function to set different texture generation parameters.

Protected Attributes

int mHeight
 height of the stored texture in pixel.
GLenum mTexChanSeq
GLenum mTexDataType
GLuint mTexId
 GL context related unique texture Id.
GLenum mTexInternalDataType
GLenum mTexTargetType
int mWidth
 width of the stored texture in pixel.


Detailed Description

Class for storing GPU texture related management information.

Author:
Erwin Roth <eroth@mytum.de>

Constructor & Destructor Documentation

opentl::core::cvdata::TextureGpu::TextureGpu ( int  width,
int  height,
GLenum  texDataType = GL_UNSIGNED_BYTE,
GLenum  texChanSeq = GL_RGB,
GLenum  texInternalDataType = GL_RGB8,
GLenum  texTargetType = GL_TEXTURE_RECTANGLE_ARB 
)

Constructor for a 1D or 2D texture.

opentl::core::cvdata::TextureGpu::TextureGpu ( const opentl::core::cvdata::Image srcImg,
GLenum  texInternalDataType = GL_RGB8,
GLenum  texTargetType = GL_TEXTURE_RECTANGLE_ARB 
)

Constructor for a 2D texture from Image.

virtual opentl::core::cvdata::TextureGpu::~TextureGpu (  )  [virtual]

Destructor.


Member Function Documentation

virtual TextureGpu* opentl::core::cvdata::TextureGpu::clone (  )  const [virtual]

Creates a new TextureGpu class instance.

virtual void opentl::core::cvdata::TextureGpu::copyToImage ( opentl::core::cvdata::Image img,
int &  upperLeftX,
int &  upperLeftY,
int &  width,
int &  height 
) const [virtual]

Copy texture to image in a sub-region.

Parameters:
img Destination image. Must be allocated with right size/channels already.
upperLeftX,upperLeftY,width,height Region of interest (the same in both images)

virtual void opentl::core::cvdata::TextureGpu::copyToImage ( opentl::core::cvdata::Image img  )  const [virtual]

Copy texture to image.

Parameters:
img Destination image. Must be allocated with right size/channels already.

static std::string opentl::core::cvdata::TextureGpu::getImageDataTypeString ( const opentl::core::cvdata::Image img  )  [static]

Return estimated image data type as string for given image.

Parameters:
img Image

static GLenum opentl::core::cvdata::TextureGpu::getTexChannelSeqByGivenImage ( const opentl::core::cvdata::Image img  )  [static]

Return estimated texture channel sequence for given image (e.g. GL_RGB).

GLenum opentl::core::cvdata::TextureGpu::getTexChanSeq (  )  const [inline]

Return texture channel sequence (e.g. GL_RGB).

GLenum opentl::core::cvdata::TextureGpu::getTexDataType (  )  const [inline]

Return texture data type (e.g. GL_UNSIGNED_BYTE).

static GLenum opentl::core::cvdata::TextureGpu::getTexDataTypeByGivenImage ( const opentl::core::cvdata::Image img  )  [static]

Return estimated texture data type for given image (e.g. GL_UNSIGNED_BYTE).

Parameters:
img Image

GLuint opentl::core::cvdata::TextureGpu::getTexId (  )  const [inline]

Return GL context specific texture Id.

GLenum opentl::core::cvdata::TextureGpu::getTexInternalDataType (  )  const [inline]

Return texture internal data type (e.g. GL_RGBA32F_ARB).

GLenum opentl::core::cvdata::TextureGpu::getTexTargetType (  )  const [inline]

Return texture target type (e.g. GL_TEXTURE_RECTANGLE_ARB).

Parameters:
img Image

int opentl::core::cvdata::TextureGpu::height (  )  const [inline]

Return the height of the texture.

virtual TextureGpu& opentl::core::cvdata::TextureGpu::operator= ( const TextureGpu shape  )  [virtual]

Assign operator.

virtual void opentl::core::cvdata::TextureGpu::setTextureGenerationParameters (  )  [protected, virtual]

Sets texture generation parameters. HINT: Derive this class and change this function to set different texture generation parameters.

virtual void opentl::core::cvdata::TextureGpu::updateFromImage ( const opentl::core::cvdata::Image img  )  [virtual]

Update whole texture area from image.

Parameters:
img Source image.

int opentl::core::cvdata::TextureGpu::width (  )  const [inline]

Return the width of the texture.


Member Data Documentation

height of the stored texture in pixel.

GL context related unique texture Id.

width of the stored texture in pixel.


Generated on Thu Jun 10 21:08:09 2010 for OpenTL by  doxygen 1.5.8