Trait opencv::core::BufferTraitConst
source · pub trait BufferTraitConst {
Show 15 methods
fn as_raw_Buffer(&self) -> *const c_void;
fn copy_to(&self, arr: &mut dyn ToOutputArray) -> Result<()> { ... }
fn copy_to_1(
&self,
arr: &mut dyn ToOutputArray,
stream: &mut Stream
) -> Result<()> { ... }
fn clone(&self, target: Buffer_Target, auto_release: bool) -> Result<Buffer> { ... }
fn bind(&self, target: Buffer_Target) -> Result<()> { ... }
fn rows(&self) -> Result<i32> { ... }
fn cols(&self) -> Result<i32> { ... }
fn size(&self) -> Result<Size> { ... }
fn empty(&self) -> Result<bool> { ... }
fn typ(&self) -> Result<i32> { ... }
fn depth(&self) -> Result<i32> { ... }
fn channels(&self) -> Result<i32> { ... }
fn elem_size(&self) -> Result<i32> { ... }
fn elem_size1(&self) -> Result<i32> { ... }
fn buf_id(&self) -> Result<u32> { ... }
}
Expand 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.
Required Methods§
fn as_raw_Buffer(&self) -> *const c_void
Provided Methods§
sourcefn copy_to(&self, arr: &mut dyn ToOutputArray) -> Result<()>
fn copy_to(&self, arr: &mut dyn ToOutputArray) -> Result<()>
Copies from OpenGL buffer to host/device memory or another OpenGL buffer object.
Parameters
- arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , std::vector or ogl::Buffer ).
sourcefn copy_to_1(
&self,
arr: &mut dyn ToOutputArray,
stream: &mut Stream
) -> Result<()>
fn copy_to_1(
&self,
arr: &mut dyn ToOutputArray,
stream: &mut Stream
) -> Result<()>
Copies from OpenGL buffer to host/device memory or another OpenGL buffer object.
Parameters
- arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , std::vector or ogl::Buffer ).
Overloaded parameters
sourcefn clone(&self, target: Buffer_Target, auto_release: bool) -> Result<Buffer>
fn clone(&self, target: Buffer_Target, auto_release: bool) -> Result<Buffer>
Creates a full copy of the buffer object and the underlying data.
Parameters
- target: Buffer usage for destination buffer.
- autoRelease: Auto release mode for destination buffer.
C++ default parameters
- target: ARRAY_BUFFER
- auto_release: false
sourcefn bind(&self, target: Buffer_Target) -> Result<()>
fn bind(&self, target: Buffer_Target) -> Result<()>
Binds OpenGL buffer to the specified buffer binding point.
Parameters
- target: Binding point. See cv::ogl::Buffer::Target .