opencv on mbed
Buffer Class Reference
[OpenGL interoperability]
Smart pointer for OpenGL buffer object with reference counting. More...
#include <opengl.hpp>
Public Types | |
enum | Target { ARRAY_BUFFER = 0x8892, ELEMENT_ARRAY_BUFFER = 0x8893, PIXEL_PACK_BUFFER = 0x88EB, PIXEL_UNPACK_BUFFER = 0x88EC } |
The target defines how you intend to use the buffer object. More... | |
Public Member Functions | |
Buffer () | |
The constructors. | |
Buffer (int arows, int acols, int atype, unsigned int abufId, bool autoRelease=false) | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Buffer (Size asize, int atype, unsigned int abufId, bool autoRelease=false) | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Buffer (int arows, int acols, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false) | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Buffer (Size asize, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false) | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Buffer (InputArray arr, Target target=ARRAY_BUFFER, bool autoRelease=false) | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | create (int arows, int acols, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false) |
Allocates memory for ogl::Buffer object. | |
void | create (Size asize, int atype, Target target=ARRAY_BUFFER, bool autoRelease=false) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
void | release () |
Decrements the reference counter and destroys the buffer object if needed. | |
void | setAutoRelease (bool flag) |
Sets auto release mode. | |
void | copyFrom (InputArray arr, Target target=ARRAY_BUFFER, bool autoRelease=false) |
Copies from host/device memory to OpenGL buffer. | |
void | copyFrom (InputArray arr, cuda::Stream &stream, Target target=ARRAY_BUFFER, bool autoRelease=false) |
void | copyTo (OutputArray arr) const |
Copies from OpenGL buffer to host/device memory or another OpenGL buffer object. | |
void | copyTo (OutputArray arr, cuda::Stream &stream) const |
Buffer | clone (Target target=ARRAY_BUFFER, bool autoRelease=false) const |
Creates a full copy of the buffer object and the underlying data. | |
void | bind (Target target) const |
Binds OpenGL buffer to the specified buffer binding point. | |
Mat | mapHost (Access access) |
Maps OpenGL buffer to host memory. | |
void | unmapHost () |
Unmaps OpenGL buffer. | |
cuda::GpuMat | mapDevice () |
map to device memory (blocking) | |
cuda::GpuMat | mapDevice (cuda::Stream &stream) |
Maps OpenGL buffer to CUDA device memory. | |
void | unmapDevice (cuda::Stream &stream) |
Unmaps OpenGL buffer. | |
unsigned int | bufId () const |
get OpenGL opject id | |
Static Public Member Functions | |
static void | unbind (Target target) |
Unbind any buffers from the specified binding point. |
Detailed Description
Smart pointer for OpenGL buffer object with reference counting.
Buffer Objects are OpenGL objects that store an array of unformatted memory allocated by the OpenGL context. These can be used to store vertex data, pixel data retrieved from images or the framebuffer, and a variety of other things.
ogl::Buffer has interface similar with Mat interface and represents 2D array memory.
ogl::Buffer supports memory transfers between host and device and also can be mapped to CUDA memory.
Definition at line 79 of file opengl.hpp.
Member Enumeration Documentation
enum Target |
The target defines how you intend to use the buffer object.
- Enumerator:
Definition at line 84 of file opengl.hpp.
Generated on Tue Jul 12 2022 16:42:45 by 1.7.2