implement fov

This commit is contained in:
2026-02-25 10:23:19 -08:00
parent 43cc9b6416
commit 48a7b06b71
5 changed files with 31 additions and 9 deletions

View File

@@ -77,7 +77,9 @@ impl<'a> PlayerWorker<'a>{
self.graphics_thread.render(&self.surface,pos,angles);
},
Instruction::Resize(physical_size)=>{
self.graphics_thread.resize(&self.surface,glam::uvec2(physical_size.width,physical_size.height));
let fov_y=self.playback_head.state().get_fov_slope_y();
let fov_x=fov_y*physical_size.width as f64/physical_size.height as f64;
self.graphics_thread.resize(&self.surface,glam::uvec2(physical_size.width,physical_size.height),glam::vec2(fov_x as f32,fov_y as f32));
},
Instruction::ChangeMap(complete_map)=>{
self.graphics_thread.change_map(&complete_map);