Struct vulkano::pipeline::graphics::vertex_input::VertexInputState [−][src]
pub struct VertexInputState {
pub bindings: FnvHashMap<u32, VertexInputBindingDescription>,
pub attributes: FnvHashMap<u32, VertexInputAttributeDescription>,
}
Expand description
The state in a graphics pipeline describing how the vertex input stage should behave.
Fields
bindings: FnvHashMap<u32, VertexInputBindingDescription>
A description of the vertex buffers that the vertex input stage will read from.
attributes: FnvHashMap<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.
Implementations
Constructs a new VertexInputState
with no bindings or attributes.
Adds a single binding.
pub fn bindings(
self,
bindings: impl IntoIterator<Item = (u32, VertexInputBindingDescription)>
) -> Self
pub fn bindings(
self,
bindings: impl IntoIterator<Item = (u32, VertexInputBindingDescription)>
) -> Self
Sets all bindings.
Adds a single attribute.
pub 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
Returns the “default value” for a type. Read more
fn definition(
&self,
interface: &ShaderInterface
) -> Result<VertexInputState, IncompatibleVertexDefinitionError>
fn definition(
&self,
interface: &ShaderInterface
) -> Result<VertexInputState, IncompatibleVertexDefinitionError>
Builds the vertex definition to use to link this definition to a vertex shader’s input interface. Read more
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
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.