#[non_exhaustive]#[repr(C)]pub struct BorrowedOpenGLTexture {
pub texture_id: NonZeroU32,
pub size: IntSize,
pub origin: BorrowedOpenGLTextureOrigin,
}
Expand description
This structure contains fields to identify and render an OpenGL texture that Slint borrows from the application code. Use this to embed a native OpenGL texture into a Slint scene.
The ownership of the texture remains with the application. It is the application’s responsibility to delete the texture when it is not used anymore.
Note that only 2D RGBA textures are supported.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.texture_id: NonZeroU32
The id or name of the texture, as created by glGenTextures
.
size: IntSize
The size of the texture in pixels.
origin: BorrowedOpenGLTextureOrigin
Origin of the texture when rendering.
Trait Implementations§
Source§impl Clone for BorrowedOpenGLTexture
impl Clone for BorrowedOpenGLTexture
Source§fn clone(&self) -> BorrowedOpenGLTexture
fn clone(&self) -> BorrowedOpenGLTexture
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BorrowedOpenGLTexture
impl Debug for BorrowedOpenGLTexture
Source§impl PartialEq for BorrowedOpenGLTexture
impl PartialEq for BorrowedOpenGLTexture
impl StructuralPartialEq for BorrowedOpenGLTexture
Auto Trait Implementations§
impl Freeze for BorrowedOpenGLTexture
impl RefUnwindSafe for BorrowedOpenGLTexture
impl Send for BorrowedOpenGLTexture
impl Sync for BorrowedOpenGLTexture
impl Unpin for BorrowedOpenGLTexture
impl UnwindSafe for BorrowedOpenGLTexture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more