mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 08:14:20 +00:00
Implemented dynamic TwoBuffersDefinition decode
This commit is contained in:
parent
4272a9e28c
commit
cd5f97ab2b
@ -100,7 +100,14 @@ unsafe impl<T, U> VertexSource<Vec<Arc<BufferAccess + Send + Sync>>> for TwoBuff
|
||||
#[inline]
|
||||
fn decode(&self, source: Vec<Arc<BufferAccess + Send + Sync>>)
|
||||
-> (Vec<Box<BufferAccess + Send + Sync>>, usize, usize) {
|
||||
unimplemented!() // FIXME: implement
|
||||
// FIXME: safety
|
||||
assert_eq!(source.len(), 2);
|
||||
let vertices = [source[0].size() / mem::size_of::<T>(), source[1].size() / mem::size_of::<U>()]
|
||||
.iter()
|
||||
.cloned()
|
||||
.min()
|
||||
.unwrap();
|
||||
(vec![Box::new(source[0].clone()), Box::new(source[1].clone())], vertices, 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user