pub struct OpenGlBorrowedTextureDescriptor<'a> {
pub logical_size: LogicalSize,
pub physical_width: u32,
pub physical_height: u32,
pub context: OpenGlContextDescriptor<'a>,
pub textures: Vec<OpenGlBorrowedTexture>,
pub target: u32,
}Expand description
A ring of your OpenGL textures, for
MapHandle::attach_open_gl_borrowed_texture().
logical_size sets the map’s size. physical_width and physical_height
give the textures’ size in pixels, which is usually logical_size times the
map’s scale factor. The context must use OpenGlContextOwnership::Shared.
Each texture must be in your context’s share group, with storage of that
size. The ring holds up to TEXTURE_RING_MAX_DEPTH distinct textures.
The session uses the textures until a replacement or release of the target completes, a detach or release of the session completes, or an abandon of it returns.
See mln_open_gl_borrowed_texture_descriptor in the
C API reference.
Fields§
§logical_size: LogicalSize§physical_width: u32§physical_height: u32§context: OpenGlContextDescriptor<'a>§textures: Vec<OpenGlBorrowedTexture>§target: u32The textures’ target. It must be GL_TEXTURE_2D.
Implementations§
Source§impl<'a> OpenGlBorrowedTextureDescriptor<'a>
impl<'a> OpenGlBorrowedTextureDescriptor<'a>
pub fn new( logical_size: LogicalSize, physical_width: u32, physical_height: u32, context: OpenGlContextDescriptor<'a>, textures: Vec<OpenGlBorrowedTexture>, target: u32, ) -> Self
Trait Implementations§
Source§impl<'a> Clone for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> Clone for OpenGlBorrowedTextureDescriptor<'a>
Source§fn clone(&self) -> OpenGlBorrowedTextureDescriptor<'a>
fn clone(&self) -> OpenGlBorrowedTextureDescriptor<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> Debug for OpenGlBorrowedTextureDescriptor<'a>
Source§impl<'a> PartialEq for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> PartialEq for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> StructuralPartialEq for OpenGlBorrowedTextureDescriptor<'a>
Auto Trait Implementations§
impl<'a> !Send for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> !Sync for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> Freeze for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> RefUnwindSafe for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> Unpin for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> UnsafeUnpin for OpenGlBorrowedTextureDescriptor<'a>
impl<'a> UnwindSafe for OpenGlBorrowedTextureDescriptor<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more