Struct vulkano::pipeline::graphics::vertex_input::BuffersDefinition
source · [−]pub struct BuffersDefinition(_);
Expand description
A vertex definition for any number of vertex and instance buffers.
Implementations
sourceimpl BuffersDefinition
impl BuffersDefinition
sourcepub fn vertex<V: Vertex>(self) -> Self
pub fn vertex<V: Vertex>(self) -> Self
Adds a new vertex buffer containing elements of type V
to the definition.
sourcepub fn instance<V: Vertex>(self) -> Self
pub fn instance<V: Vertex>(self) -> Self
Adds a new instance buffer containing elements of type V
to the definition.
sourcepub fn instance_with_divisor<V: Vertex>(self, divisor: u32) -> Self
pub fn instance_with_divisor<V: Vertex>(self, divisor: u32) -> Self
Adds a new instance buffer containing elements of type V
to the definition, with the
specified input rate divisor.
This requires the
vertex_attribute_instance_rate_divisor
feature has been enabled on the device, unless divisor
is 1.
divisor
can be 0 if the
vertex_attribute_instance_rate_zero_divisor
feature is also enabled. This means that every vertex will use the same vertex and instance
data.
Trait Implementations
sourceimpl Clone for BuffersDefinition
impl Clone for BuffersDefinition
sourcefn clone(&self) -> BuffersDefinition
fn clone(&self) -> BuffersDefinition
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 BuffersDefinition
impl Debug for BuffersDefinition
sourceimpl Default for BuffersDefinition
impl Default for BuffersDefinition
sourcefn default() -> BuffersDefinition
fn default() -> BuffersDefinition
Returns the “default value” for a type. Read more
sourceimpl VertexDefinition for BuffersDefinition
impl VertexDefinition for BuffersDefinition
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 BuffersDefinition
impl Send for BuffersDefinition
impl Sync for BuffersDefinition
impl Unpin for BuffersDefinition
impl UnwindSafe for BuffersDefinition
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