Trait opencv::hub_prelude::Texture2DTraitConst [−][src]
pub trait Texture2DTraitConst {
fn as_raw_Texture2D(&self) -> *const c_void;
fn copy_to(
&self,
arr: &mut dyn ToOutputArray,
ddepth: i32,
auto_release: bool
) -> 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
Smart pointer for OpenGL 2D texture memory with reference counting.
Required methods
fn as_raw_Texture2D(&self) -> *const c_void
Provided methods
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
Binds texture to current active texture unit for GL_TEXTURE_2D target.