This commit is contained in:
Quaternions 2023-10-25 15:56:36 -07:00
parent 5fd6ca219b
commit 41dd155c50
2 changed files with 3 additions and 3 deletions

View File

@ -875,8 +875,8 @@ impl GraphicsState{
config:&wgpu::SurfaceConfiguration, config:&wgpu::SurfaceConfiguration,
user_settings:&crate::settings::UserSettings, user_settings:&crate::settings::UserSettings,
) { ) {
self.depth_view = Self::create_depth_texture(config,device); self.depth_view=Self::create_depth_texture(config,device);
self.camera.screen_size=glam::uvec2(config.width, config.height); self.camera.screen_size=glam::uvec2(config.width,config.height);
self.load_user_settings(user_settings); self.load_user_settings(user_settings);
} }
pub fn render( pub fn render(

View File

@ -21,7 +21,7 @@ struct WindowContext<'a>{
impl WindowContext<'_>{ impl WindowContext<'_>{
fn get_middle_of_screen(&self)->winit::dpi::PhysicalPosition<f32>{ fn get_middle_of_screen(&self)->winit::dpi::PhysicalPosition<f32>{
winit::dpi::PhysicalPosition::new(self.screen_size.x as f32/2.0, self.screen_size.y as f32/2.0) winit::dpi::PhysicalPosition::new(self.screen_size.x as f32/2.0,self.screen_size.y as f32/2.0)
} }
fn window_event(&mut self,time:crate::integer::Time,event: winit::event::WindowEvent) { fn window_event(&mut self,time:crate::integer::Time,event: winit::event::WindowEvent) {
match event { match event {