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 |
Smart pointer for OpenGL 2D texture memory with reference counting.
cv::ogl::Texture2D::Texture2D | ( | ) |
create empty texture
cv::ogl::Texture2D::Texture2D | ( | int | arows, |
int | acols, | ||
Format | aformat, | ||
unsigned int | atexId, | ||
bool | autoRelease = false |
||
) |
create texture from existed texture id
cv::ogl::Texture2D::Texture2D | ( | Size | asize, |
Format | aformat, | ||
unsigned int | atexId, | ||
bool | autoRelease = false |
||
) |
create texture
|
explicit |
copy from host/device memory
void cv::ogl::Texture2D::bind | ( | ) | const |
bind texture to current active texture unit for GL_TEXTURE_2D target
|
inline |
void cv::ogl::Texture2D::copyFrom | ( | InputArray | arr, |
bool | autoRelease = false |
||
) |
copy from host/device memory
void cv::ogl::Texture2D::copyTo | ( | OutputArray | arr, |
int | ddepth = CV_32F , |
||
bool | autoRelease = false |
||
) | const |
copy to host/device memory
create texture
|
inline |
|
inline |
void cv::ogl::Texture2D::release | ( | ) |
release memory and delete texture object
|
inline |
void cv::ogl::Texture2D::setAutoRelease | ( | bool | flag | ) |
set auto release mode (if true, release will be called in object's destructor)
|
inline |
unsigned int cv::ogl::Texture2D::texId | ( | ) | const |