Skip to main content

Mesh

Struct Mesh 

Source
pub struct Mesh { /* private fields */ }
Expand description

Owned GPU mesh handle.

Implementations§

Source§

impl Mesh

Source

pub fn seq(&self) -> i64

Monotonic sequence number suitable for DrawOptions::order.

Source

pub fn set_texture( &self, res: &mut Resources<'_>, slot: u32, texture: Option<&Texture>, ) -> Result<()>

Binds or clears a texture at slot on this mesh.

Source

pub fn set_sampler( &self, res: &mut Resources<'_>, slot: u32, sampler: SamplerState, ) -> Result<()>

Overrides the sampler state at slot on this mesh.

Source

pub fn set_paint( &self, res: &mut Resources<'_>, paint: &PaintAttributes, ) -> Result<()>

Updates paint attributes on this mesh after paint property changes.

Source

pub fn bind_vertices( &self, res: &mut Resources<'_>, binding: &VertexBinding<'_>, ) -> Result<()>

Rebinds a vertex stream on this mesh.

Trait Implementations§

Source§

impl Debug for Mesh

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Mesh

§

impl !Send for Mesh

§

impl !Sync for Mesh

§

impl !UnwindSafe for Mesh

§

impl Forget for Mesh

§

impl Freeze for Mesh
where *const dyn MeshHandle is !null: Freeze, PhantomData<dyn MeshHandle>: Freeze,

§

impl Move for Mesh

§

impl Unpin for Mesh
where Box<dyn MeshHandle>: Unpin,

§

impl UnsafeUnpin for Mesh
where *const dyn MeshHandle is !null: UnsafeUnpin, PhantomData<dyn MeshHandle>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.