Struct vulkano::pipeline::graphics::vertex_input::VertexInputState
source · pub struct VertexInputState {
pub bindings: HashMap<u32, VertexInputBindingDescription>,
pub attributes: HashMap<u32, VertexInputAttributeDescription>,
pub _ne: NonExhaustive,
}
Expand description
The state in a graphics pipeline describing how the vertex input stage should behave.
Fields§
§bindings: HashMap<u32, VertexInputBindingDescription>
A description of the vertex buffers that the vertex input stage will read from.
attributes: HashMap<u32, VertexInputAttributeDescription>
Describes, for each shader input location, the mapping between elements in a vertex buffer and the components of that location in the shader.
_ne: NonExhaustive
Implementations§
source§impl VertexInputState
impl VertexInputState
sourcepub fn new() -> VertexInputState
pub fn new() -> VertexInputState
Constructs a new VertexInputState
with no bindings or attributes.
sourcepub fn binding(
self,
binding: u32,
description: VertexInputBindingDescription
) -> Self
pub fn binding( self, binding: u32, description: VertexInputBindingDescription ) -> Self
Adds a single binding.
sourcepub fn bindings(
self,
bindings: impl IntoIterator<Item = (u32, VertexInputBindingDescription)>
) -> Self
pub fn bindings( self, bindings: impl IntoIterator<Item = (u32, VertexInputBindingDescription)> ) -> Self
Sets all bindings.
sourcepub fn attribute(
self,
location: u32,
description: VertexInputAttributeDescription
) -> Self
pub fn attribute( self, location: u32, description: VertexInputAttributeDescription ) -> Self
Adds a single attribute.
sourcepub fn attributes(
self,
attributes: impl IntoIterator<Item = (u32, VertexInputAttributeDescription)>
) -> Self
pub fn attributes( self, attributes: impl IntoIterator<Item = (u32, VertexInputAttributeDescription)> ) -> Self
Sets all attributes.
Trait Implementations§
source§impl Clone for VertexInputState
impl Clone for VertexInputState
source§fn clone(&self) -> VertexInputState
fn clone(&self) -> VertexInputState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VertexInputState
impl Debug for VertexInputState
Auto Trait Implementations§
impl RefUnwindSafe for VertexInputState
impl Send for VertexInputState
impl Sync for VertexInputState
impl Unpin for VertexInputState
impl UnwindSafe for VertexInputState
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