Struct luminance_front::vertex::VertexBufferDesc [−][src]
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
pub 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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more