pub struct Texture2D { /* private fields */ }
Expand description
Smart pointer for OpenGL 2D texture memory with reference counting.
Implementations
sourceimpl Texture2D
impl Texture2D
sourcepub fn default() -> Result<Texture2D>
pub fn default() -> Result<Texture2D>
The constructors.
Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from host/device memory.
sourcepub fn new(
arows: i32,
acols: i32,
aformat: Texture2D_Format,
atex_id: u32,
auto_release: bool
) -> Result<Texture2D>
pub fn new(
arows: i32,
acols: i32,
aformat: Texture2D_Format,
atex_id: u32,
auto_release: bool
) -> Result<Texture2D>
The constructors.
Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from host/device memory.
Overloaded parameters
C++ default parameters
- auto_release: false
sourcepub fn new_1(
asize: Size,
aformat: Texture2D_Format,
atex_id: u32,
auto_release: bool
) -> Result<Texture2D>
pub fn new_1(
asize: Size,
aformat: Texture2D_Format,
atex_id: u32,
auto_release: bool
) -> Result<Texture2D>
The constructors.
Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from host/device memory.
Overloaded parameters
C++ default parameters
- auto_release: false
sourcepub fn new_2(
arows: i32,
acols: i32,
aformat: Texture2D_Format,
auto_release: bool
) -> Result<Texture2D>
pub fn new_2(
arows: i32,
acols: i32,
aformat: Texture2D_Format,
auto_release: bool
) -> Result<Texture2D>
The constructors.
Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from host/device memory.
Overloaded parameters
Parameters
- arows: Number of rows.
- acols: Number of columns.
- aformat: Image format. See cv::ogl::Texture2D::Format .
- autoRelease: Auto release mode (if true, release will be called in object’s destructor).
C++ default parameters
- auto_release: false
sourcepub fn new_3(
asize: Size,
aformat: Texture2D_Format,
auto_release: bool
) -> Result<Texture2D>
pub fn new_3(
asize: Size,
aformat: Texture2D_Format,
auto_release: bool
) -> Result<Texture2D>
The constructors.
Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from host/device memory.
Overloaded parameters
Parameters
- asize: 2D array size.
- aformat: Image format. See cv::ogl::Texture2D::Format .
- autoRelease: Auto release mode (if true, release will be called in object’s destructor).
C++ default parameters
- auto_release: false
sourcepub fn new_4(arr: &dyn ToInputArray, auto_release: bool) -> Result<Texture2D>
pub fn new_4(arr: &dyn ToInputArray, auto_release: bool) -> Result<Texture2D>
The constructors.
Creates empty ogl::Texture2D object, allocates memory for ogl::Texture2D object or copies from host/device memory.
Overloaded parameters
Parameters
- arr: Input array (host or device memory, it can be Mat , cuda::GpuMat or ogl::Buffer ).
- autoRelease: Auto release mode (if true, release will be called in object’s destructor).
C++ default parameters
- auto_release: false