Struct vulkano::pipeline::vertex::SingleBufferDefinition
[−]
[src]
pub struct SingleBufferDefinition<T>(pub PhantomData<T>);
Implementation of VertexDefinition
for a single vertex buffer.
Methods
impl<T> SingleBufferDefinition<T>
[src]
fn new() -> SingleBufferDefinition<T>
Trait Implementations
impl<T, I> VertexDefinition<I> for SingleBufferDefinition<T> where
T: Vertex,
I: ShaderInterfaceDef,
[src]
T: Vertex,
I: ShaderInterfaceDef,
type BuffersIter = OptionIntoIter<(u32, usize, InputRate)>
Iterator that returns the offset, the stride (in bytes) and input rate of each buffer.
type AttribsIter = VecIntoIter<(u32, u32, AttributeInfo)>
Iterator that returns the attribute location, buffer id, and infos.
fn definition(
&self,
interface: &I
) -> Result<(Self::BuffersIter, Self::AttribsIter), IncompatibleVertexDefinitionError>
&self,
interface: &I
) -> Result<(Self::BuffersIter, Self::AttribsIter), IncompatibleVertexDefinitionError>
Builds the vertex definition to use to link this definition to a vertex shader's input interface. Read more
impl<V> VertexSource<Vec<Arc<BufferAccess + Send + Sync>>> for SingleBufferDefinition<V> where
V: Vertex,
[src]
V: Vertex,
fn decode(
&self,
source: Vec<Arc<BufferAccess + Send + Sync>>
) -> (Vec<Box<BufferAccess + Send + Sync>>, usize, usize)
&self,
source: Vec<Arc<BufferAccess + Send + Sync>>
) -> (Vec<Box<BufferAccess + Send + Sync>>, usize, usize)
Checks and returns the list of buffers with offsets, number of vertices and number of instances.
impl<'a, B, V> VertexSource<B> for SingleBufferDefinition<V> where
B: TypedBufferAccess<Content = [V]> + Send + Sync + 'static,
V: Vertex,
[src]
B: TypedBufferAccess<Content = [V]> + Send + Sync + 'static,
V: Vertex,