OpenCV  2.4.13.4
Open Source Computer Vision
cv::ogl::Texture2D Class Reference

Smart pointer for OpenGL 2D texture memory with reference counting. More...

#include <opengl_interop.hpp>

Public Types

enum  Format { NONE = 0, DEPTH_COMPONENT = 0x1902, RGB = 0x1907, RGBA = 0x1908 }
 

Public Member Functions

 Texture2D ()
 create empty texture More...
 
 Texture2D (int arows, int acols, Format aformat, unsigned int atexId, bool autoRelease=false)
 create texture from existed texture id More...
 
 Texture2D (Size asize, Format aformat, unsigned int atexId, bool autoRelease=false)
 
 Texture2D (int arows, int acols, Format aformat, bool autoRelease=false)
 create texture More...
 
 Texture2D (Size asize, Format aformat, bool autoRelease=false)
 
 Texture2D (InputArray arr, bool autoRelease=false)
 copy from host/device memory More...
 
void create (int arows, int acols, Format aformat, bool autoRelease=false)
 create texture More...
 
void create (Size asize, Format aformat, bool autoRelease=false)
 
void release ()
 release memory and delete texture object More...
 
void setAutoRelease (bool flag)
 set auto release mode (if true, release will be called in object's destructor) More...
 
void copyFrom (InputArray arr, bool autoRelease=false)
 copy from host/device memory More...
 
void copyTo (OutputArray arr, int ddepth=CV_32F, bool autoRelease=false) const
 copy to host/device memory More...
 
void bind () const
 bind texture to current active texture unit for GL_TEXTURE_2D target More...
 
int rows () const
 
int cols () const
 
Size size () const
 
bool empty () const
 
Format format () const
 
unsigned int texId () const
 

Detailed Description

Smart pointer for OpenGL 2D texture memory with reference counting.

Member Enumeration Documentation

§ Format

Enumerator
NONE 
DEPTH_COMPONENT 

Depth.

RGB 

Red, Green, Blue.

RGBA 

Red, Green, Blue, Alpha.

Constructor & Destructor Documentation

§ Texture2D() [1/6]

cv::ogl::Texture2D::Texture2D ( )

create empty texture

§ Texture2D() [2/6]

cv::ogl::Texture2D::Texture2D ( int  arows,
int  acols,
Format  aformat,
unsigned int  atexId,
bool  autoRelease = false 
)

create texture from existed texture id

§ Texture2D() [3/6]

cv::ogl::Texture2D::Texture2D ( Size  asize,
Format  aformat,
unsigned int  atexId,
bool  autoRelease = false 
)

§ Texture2D() [4/6]

cv::ogl::Texture2D::Texture2D ( int  arows,
int  acols,
Format  aformat,
bool  autoRelease = false 
)

create texture

§ Texture2D() [5/6]

cv::ogl::Texture2D::Texture2D ( Size  asize,
Format  aformat,
bool  autoRelease = false 
)

§ Texture2D() [6/6]

cv::ogl::Texture2D::Texture2D ( InputArray  arr,
bool  autoRelease = false 
)
explicit

copy from host/device memory

Member Function Documentation

§ bind()

void cv::ogl::Texture2D::bind ( ) const

bind texture to current active texture unit for GL_TEXTURE_2D target

§ cols()

int cv::ogl::Texture2D::cols ( ) const
inline

§ copyFrom()

void cv::ogl::Texture2D::copyFrom ( InputArray  arr,
bool  autoRelease = false 
)

copy from host/device memory

§ copyTo()

void cv::ogl::Texture2D::copyTo ( OutputArray  arr,
int  ddepth = CV_32F,
bool  autoRelease = false 
) const

copy to host/device memory

§ create() [1/2]

void cv::ogl::Texture2D::create ( int  arows,
int  acols,
Format  aformat,
bool  autoRelease = false 
)

create texture

§ create() [2/2]

void cv::ogl::Texture2D::create ( Size  asize,
Format  aformat,
bool  autoRelease = false 
)
inline

§ empty()

bool cv::ogl::Texture2D::empty ( ) const
inline

§ format()

Format cv::ogl::Texture2D::format ( ) const
inline

§ release()

void cv::ogl::Texture2D::release ( )

release memory and delete texture object

§ rows()

int cv::ogl::Texture2D::rows ( ) const
inline

§ setAutoRelease()

void cv::ogl::Texture2D::setAutoRelease ( bool  flag)

set auto release mode (if true, release will be called in object's destructor)

§ size()

Size cv::ogl::Texture2D::size ( ) const
inline

§ texId()

unsigned int cv::ogl::Texture2D::texId ( ) const

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