|
|
|
@ -16,13 +16,13 @@ pub struct RuntimeVertexDef {
|
|
|
|
|
impl RuntimeVertexDef {
|
|
|
|
|
|
|
|
|
|
/// primitive is an input value or struct which can then describe
|
|
|
|
|
///
|
|
|
|
|
/// these damn values that are required for inputting them into vulkan
|
|
|
|
|
pub fn from_primitive(primitive: u32) -> RuntimeVertexDef {
|
|
|
|
|
|
|
|
|
|
// Literally every value in this class
|
|
|
|
|
let mut buffers = Vec::new();
|
|
|
|
|
let mut vertex_buffer_ids = Vec::new();
|
|
|
|
|
let mut attributes = Vec::new();
|
|
|
|
|
|
|
|
|
|
let mut num_vertices = u32::max_value();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -125,6 +125,7 @@ unsafe impl<I> VertexDefinition<I> for RuntimeVertexDef
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// I don't know what the fuck is going on here... It just repackages the buffs
|
|
|
|
|
/// Needs the num vertices
|
|
|
|
|
unsafe impl VertexSource<Vec<Arc<dyn BufferAccess + Send + Sync>>> for RuntimeVertexDef {
|
|
|
|
|
fn decode(&self, bufs: Vec<Arc<dyn BufferAccess + Send + Sync>>)
|
|
|
|
|
-> (Vec<Box<dyn BufferAccess + Send + Sync>>, usize, usize)
|
|
|
|
|