Smart pointer for OpenGL buffer memory with reference counting. More...
#include <opengl_interop.hpp>
Public Types | |
| enum | Target { ARRAY_BUFFER = 0x8892, ELEMENT_ARRAY_BUFFER = 0x8893, PIXEL_PACK_BUFFER = 0x88EB, PIXEL_UNPACK_BUFFER = 0x88EC } |
| enum | Access { READ_ONLY = 0x88B8, WRITE_ONLY = 0x88B9, READ_WRITE = 0x88BA } |
Public Member Functions | |
| Buffer () | |
| create empty buffer More... | |
| Buffer (int arows, int acols, int atype, unsigned int abufId, bool autoRelease=false) | |
| create buffer from existed buffer id More... | |
| Buffer (Size asize, int atype, unsigned int abufId, bool autoRelease=false) | |
| Buffer (int arows, int acols, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false) | |
| create buffer More... | |
| Buffer (Size asize, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false) | |
| Buffer (InputArray arr, Target target=ARRAY_BUFFER, bool autoRelease=false) | |
| copy from host/device memory More... | |
| void | create (int arows, int acols, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false) |
| create buffer More... | |
| void | create (Size asize, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false) |
| void | release () |
| release memory and delete buffer 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, Target target=ARRAY_BUFFER, bool autoRelease=false) |
| copy from host/device memory More... | |
| void | copyTo (OutputArray arr, Target target=ARRAY_BUFFER, bool autoRelease=false) const |
| copy to host/device memory More... | |
| Buffer | clone (Target target=ARRAY_BUFFER, bool autoRelease=false) const |
| create copy of current buffer More... | |
| void | bind (Target target) const |
| bind buffer for specified target More... | |
| Mat | mapHost (Access access) |
| map to host memory More... | |
| void | unmapHost () |
| gpu::GpuMat | mapDevice () |
| map to device memory More... | |
| void | unmapDevice () |
| int | rows () const |
| int | cols () const |
| Size | size () const |
| bool | empty () const |
| int | type () const |
| int | depth () const |
| int | channels () const |
| int | elemSize () const |
| int | elemSize1 () const |
| unsigned int | bufId () const |
Static Public Member Functions | |
| static void | unbind (Target target) |
| unbind any buffers from specified target More... | |
Smart pointer for OpenGL buffer memory with reference counting.
| cv::ogl::Buffer::Buffer | ( | ) |
create empty buffer
| cv::ogl::Buffer::Buffer | ( | int | arows, |
| int | acols, | ||
| int | atype, | ||
| unsigned int | abufId, | ||
| bool | autoRelease = false |
||
| ) |
create buffer from existed buffer id
| cv::ogl::Buffer::Buffer | ( | int | arows, |
| int | acols, | ||
| int | atype, | ||
| Target | target = ARRAY_BUFFER, |
||
| bool | autoRelease = false |
||
| ) |
create buffer
| cv::ogl::Buffer::Buffer | ( | Size | asize, |
| int | atype, | ||
| Target | target = ARRAY_BUFFER, |
||
| bool | autoRelease = false |
||
| ) |
|
explicit |
copy from host/device memory
| unsigned int cv::ogl::Buffer::bufId | ( | ) | const |
|
inline |
| Buffer cv::ogl::Buffer::clone | ( | Target | target = ARRAY_BUFFER, |
| bool | autoRelease = false |
||
| ) | const |
create copy of current buffer
|
inline |
| void cv::ogl::Buffer::copyFrom | ( | InputArray | arr, |
| Target | target = ARRAY_BUFFER, |
||
| bool | autoRelease = false |
||
| ) |
copy from host/device memory
| void cv::ogl::Buffer::copyTo | ( | OutputArray | arr, |
| Target | target = ARRAY_BUFFER, |
||
| bool | autoRelease = false |
||
| ) | const |
copy to host/device memory
| void cv::ogl::Buffer::create | ( | int | arows, |
| int | acols, | ||
| int | atype, | ||
| Target | target = ARRAY_BUFFER, |
||
| bool | autoRelease = false |
||
| ) |
create buffer
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| gpu::GpuMat cv::ogl::Buffer::mapDevice | ( | ) |
map to device memory
| void cv::ogl::Buffer::release | ( | ) |
release memory and delete buffer object
|
inline |
| void cv::ogl::Buffer::setAutoRelease | ( | bool | flag | ) |
set auto release mode (if true, release will be called in object's destructor)
|
inline |
|
inline |
unbind any buffers from specified target
| void cv::ogl::Buffer::unmapDevice | ( | ) |
| void cv::ogl::Buffer::unmapHost | ( | ) |