Trait 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§

Provided Methods§

Source

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
Source

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
Source

fn bind(&self) -> Result<()>

Binds texture to current active texture unit for GL_TEXTURE_2D target.

Source

fn rows(&self) -> Result<i32>

Source

fn cols(&self) -> Result<i32>

Source

fn size(&self) -> Result<Size>

Source

fn empty(&self) -> Result<bool>

Source

fn format(&self) -> Result<Texture2D_Format>

Source

fn tex_id(&self) -> Result<u32>

get OpenGL opject id

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§