Inherits opentl::core::cvdata::TimedData.
Public Member Functions | |
virtual TextureGpu * | clone () 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 TextureGpu & | operator= (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. |
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.
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.
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.
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] |
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] |
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] |
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.
img | Source image. |
int opentl::core::cvdata::TextureGpu::width | ( | ) | const [inline] |
Return the width of the texture.
int opentl::core::cvdata::TextureGpu::mHeight [protected] |
height of the stored texture in pixel.
GLenum opentl::core::cvdata::TextureGpu::mTexChanSeq [protected] |
GLenum opentl::core::cvdata::TextureGpu::mTexDataType [protected] |
GLuint opentl::core::cvdata::TextureGpu::mTexId [protected] |
GL context related unique texture Id.
GLenum opentl::core::cvdata::TextureGpu::mTexInternalDataType [protected] |
GLenum opentl::core::cvdata::TextureGpu::mTexTargetType [protected] |
int opentl::core::cvdata::TextureGpu::mWidth [protected] |
width of the stored texture in pixel.