Trait opencv::prelude::Texture2DTraitConst
source · pub trait Texture2DTraitConst {
// Required method
fn as_raw_Texture2D(&self) -> *const c_void;
// Provided methods
fn copy_to(
&self,
arr: &mut impl ToOutputArray,
ddepth: i32,
auto_release: bool
) -> Result<()> { ... }
fn copy_to_def(&self, arr: &mut impl ToOutputArray) -> Result<()> { ... }
fn bind(&self) -> Result<()> { ... }
fn rows(&self) -> Result<i32> { ... }
fn cols(&self) -> Result<i32> { ... }
fn size(&self) -> Result<Size> { ... }
fn empty(&self) -> Result<bool> { ... }
fn format(&self) -> Result<Texture2D_Format> { ... }
fn tex_id(&self) -> Result<u32> { ... }
}
Expand description
Constant methods for core::Texture2D
Required Methods§
fn as_raw_Texture2D(&self) -> *const c_void
Provided Methods§
sourcefn copy_to(
&self,
arr: &mut impl ToOutputArray,
ddepth: i32,
auto_release: bool
) -> Result<()>
fn copy_to( &self, arr: &mut impl ToOutputArray, ddepth: i32, auto_release: bool ) -> Result<()>
Copies from OpenGL texture to host/device memory or another OpenGL texture object.
§Parameters
- arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , ogl::Buffer or ogl::Texture2D ).
- ddepth: Destination depth.
- autoRelease: Auto release mode for destination buffer (if arr is OpenGL buffer or texture).
§C++ default parameters
- ddepth: CV_32F
- auto_release: false
sourcefn copy_to_def(&self, arr: &mut impl ToOutputArray) -> Result<()>
fn copy_to_def(&self, arr: &mut impl ToOutputArray) -> Result<()>
Copies from OpenGL texture to host/device memory or another OpenGL texture object.
§Parameters
- arr: Destination array (host or device memory, can be Mat , cuda::GpuMat , ogl::Buffer or ogl::Texture2D ).
- ddepth: Destination depth.
- autoRelease: Auto release mode for destination buffer (if arr is OpenGL buffer or texture).
§Note
This alternative version of Texture2DTraitConst::copy_to function uses the following default values for its arguments:
- ddepth: CV_32F
- auto_release: false
sourcefn bind(&self) -> Result<()>
fn bind(&self) -> Result<()>
Binds texture to current active texture unit for GL_TEXTURE_2D target.
fn rows(&self) -> Result<i32>
fn cols(&self) -> Result<i32>
fn size(&self) -> Result<Size>
fn empty(&self) -> Result<bool>
fn format(&self) -> Result<Texture2D_Format>
Object Safety§
This trait is not object safe.