pub struct Vertices<G>where
G: Gl,{ /* private fields */ }Expand description
This is a set of OpenGL vertices with crate::GlBuffer for all of its contents
This is part of the [RenderContext], and so has a different lifetime to the model3d objects and vertices. It is created by invoking create_client on a [mod3d_rs::Object]
Implementations§
Source§impl<G> Vertices<G>where
G: Gl,
impl<G> Vertices<G>where
G: Gl,
Sourcepub fn create(vertices: &Vertices<'_, G>, _renderer: &mut G) -> Self
pub fn create(vertices: &Vertices<'_, G>, _renderer: &mut G) -> Self
Create based on [mod3d_rs::Vertices]
Todo: remove unwrap() in position; make it do nothing if there is no position attr
Todo: support indics being an option
Sourcepub fn borrow(
&self,
) -> (&IndexBuffer<G>, &VertexBuffer<G>, &Vec<(VertexAttr, VertexBuffer<G>)>)
pub fn borrow( &self, ) -> (&IndexBuffer<G>, &VertexBuffer<G>, &Vec<(VertexAttr, VertexBuffer<G>)>)
Borrow the indices, positions, and the array of other attributes
Trait Implementations§
impl<G> VerticesClient for Vertices<G>where
G: Gl,
Auto Trait Implementations§
impl<G> Freeze for Vertices<G>
impl<G> RefUnwindSafe for Vertices<G>
impl<G> !Send for Vertices<G>
impl<G> !Sync for Vertices<G>
impl<G> Unpin for Vertices<G>
impl<G> UnwindSafe for Vertices<G>
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