Divide render texture size by scale

This commit is contained in:
crumblingstatue 2023-04-06 23:04:34 +02:00
parent e2a38e80d7
commit 85ebea1fca

View file

@ -78,7 +78,9 @@ impl App {
match ev {
Event::Closed => self.should_quit = true,
Event::Resized { width, height } => {
self.rt = RenderTexture::new(width, height).unwrap();
self.rt =
RenderTexture::new(width / self.scale as u32, height / self.scale as u32)
.unwrap();
let view = View::from_rect(Rect::new(0., 0., width as f32, height as f32));
self.rw.set_view(&view);
}