This commit is contained in:
Quaternions 2024-02-06 22:42:23 -08:00
parent 50eeeb003a
commit 96e163643b
2 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ pub fn new<'a>(
crate::compat_worker::INWorker::new(move |ins:Instruction|{
match ins{
Instruction::GenerateModels(indexed_model_instances)=>{
graphics.generate_models(&device,&queue,indexed_model_instances);
graphics.generate_models(&device,&queue,&indexed_model_instances);
},
Instruction::ClearModels=>{
graphics.clear();

View File

@ -943,11 +943,11 @@ impl PhysicsContext{
});
}
pub fn generate_models(&mut self,map:map::Map){
pub fn generate_models(&mut self,map:&map::Map){
let mut starts=Vec::new();
let mut spawns=Vec::new();
let mut attr_hash=HashMap::new();
for (model_id,model) in map.models{
for (&model_id,model) in &map.models{
let mesh_id=self.data.models.meshes.len();
let mut make_mesh=false;
for model_instance in &model.instances{