Struct vulkano::pipeline::graphics::vertex_input::VertexInputState
source · [−]pub struct VertexInputState {
pub bindings: HashMap<u32, VertexInputBindingDescription>,
pub attributes: HashMap<u32, VertexInputAttributeDescription>,
}
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.
Implementations
sourceimpl 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
sourceimpl Clone for VertexInputState
impl Clone for VertexInputState
sourcefn clone(&self) -> VertexInputState
fn clone(&self) -> VertexInputState
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 moresourceimpl Debug for VertexInputState
impl Debug for VertexInputState
sourceimpl Default for VertexInputState
impl Default for VertexInputState
sourcefn default() -> VertexInputState
fn default() -> VertexInputState
Returns the “default value” for a type. Read more
sourceimpl VertexDefinition for VertexInputState
impl VertexDefinition for VertexInputState
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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