diff --git a/src/main.rs b/src/main.rs index b554710..779b9f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -215,11 +215,14 @@ impl GraphicsData { } //drain the modeldata vec so entities can be /moved/ to models.entities let mut instance_count=0; + let uniform_buffer_binding_size=::required_limits().max_uniform_buffer_binding_size as usize; + let chunk_size=uniform_buffer_binding_size/MODEL_BUFFER_SIZE_BYTES; self.models.reserve(modeldatas.len()); for (i,modeldata) in modeldatas.drain(..).enumerate() { let n_instances=modeldata.instances.len(); - if 0(); +const MODEL_BUFFER_SIZE_BYTES:usize=MODEL_BUFFER_SIZE*4; fn get_instances_buffer_data(instances:&[ModelInstance]) -> Vec { let mut raw = Vec::with_capacity(MODEL_BUFFER_SIZE*instances.len()); for (i,mi) in instances.iter().enumerate(){