pub struct Layer<'l, V> { /* private fields */ }
Expand description
The frame layer. Can be created from a Frame
instance.
Implementations
sourceimpl<'l, V> Layer<'l, V>
impl<'l, V> Layer<'l, V>
sourcepub fn bind_instance(&mut self, handle: InstanceHandle) -> Result<(), Error>
pub fn bind_instance(&mut self, handle: InstanceHandle) -> Result<(), Error>
sourcepub fn draw(&mut self, handle: MeshHandle<V>) -> Result<(), Error>
pub fn draw(&mut self, handle: MeshHandle<V>) -> Result<(), Error>
Draws a mesh.
Errors
Returns Error::ResourceNotFound
if given mesh handler was deleted.
Returns Error::InstanceNotSet
if no any instance is set.
Call bind_instance
to set an instance.
sourceimpl Layer<'_, TextureVertex>
impl Layer<'_, TextureVertex>
sourcepub fn bind_texture(&mut self, handle: TextureHandle) -> Result<(), Error>
pub fn bind_texture(&mut self, handle: TextureHandle) -> Result<(), Error>
Auto Trait Implementations
impl<'l, V> !RefUnwindSafe for Layer<'l, V>
impl<'l, V> !Send for Layer<'l, V>
impl<'l, V> !Sync for Layer<'l, V>
impl<'l, V> Unpin for Layer<'l, V>where
V: Unpin,
impl<'l, V> !UnwindSafe for Layer<'l, V>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more