Struct luminance_front::vertex::VertexBufferDesc
source · [−]pub struct VertexBufferDesc {
pub index: usize,
pub name: &'static str,
pub instancing: VertexInstancing,
pub attrib_desc: VertexAttribDesc,
}
Expand description
A vertex attribute descriptor in a vertex buffer.
Such a description is used to state what vertex buffers are made of and how they should be aligned / etc.
Fields
index: usize
Internal index of the attribute.
That index is used as a mapping with vertex shaders to know how to fetch vertex attributes.
name: &'static str
The name of the attribute.
Such a name is used in vertex shaders to perform mapping.
instancing: VertexInstancing
Whether vertex instancing should be used with that vertex attribute.
attrib_desc: VertexAttribDesc
Vertex attribute descriptor.
Implementations
sourceimpl VertexBufferDesc
impl VertexBufferDesc
sourcepub fn new<S>(
sem: S,
instancing: VertexInstancing,
attrib_desc: VertexAttribDesc
) -> VertexBufferDesc where
S: Semantics,
pub fn new<S>(
sem: S,
instancing: VertexInstancing,
attrib_desc: VertexAttribDesc
) -> VertexBufferDesc where
S: Semantics,
Create a new VertexBufferDesc
.
Trait Implementations
sourceimpl Clone for VertexBufferDesc
impl Clone for VertexBufferDesc
sourcefn clone(&self) -> VertexBufferDesc
fn clone(&self) -> VertexBufferDesc
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VertexBufferDesc
impl Debug for VertexBufferDesc
sourceimpl Hash for VertexBufferDesc
impl Hash for VertexBufferDesc
sourceimpl PartialEq<VertexBufferDesc> for VertexBufferDesc
impl PartialEq<VertexBufferDesc> for VertexBufferDesc
sourcefn eq(&self, other: &VertexBufferDesc) -> bool
fn eq(&self, other: &VertexBufferDesc) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &VertexBufferDesc) -> bool
fn ne(&self, other: &VertexBufferDesc) -> bool
This method tests for !=
.
impl Copy for VertexBufferDesc
impl Eq for VertexBufferDesc
impl StructuralEq for VertexBufferDesc
impl StructuralPartialEq for VertexBufferDesc
Auto Trait Implementations
impl RefUnwindSafe for VertexBufferDesc
impl Send for VertexBufferDesc
impl Sync for VertexBufferDesc
impl Unpin for VertexBufferDesc
impl UnwindSafe for VertexBufferDesc
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more