mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-15 12:15:01 +01:00
Divide render texture size by scale
This commit is contained in:
parent
e2a38e80d7
commit
85ebea1fca
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue