From 71ad4b4ab73a84cbe2eb70487cca3404621e30a3 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 9 Mar 2022 18:05:04 +0100 Subject: [PATCH] fixed large memory consumption Reducing MAX_QUADS to 1,000 reduced memory consumption to 43MB --- examples/gui/platform/src/graphics/lowlevel/buffer.rs | 2 +- examples/gui/platform/src/gui.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/gui/platform/src/graphics/lowlevel/buffer.rs b/examples/gui/platform/src/graphics/lowlevel/buffer.rs index dbe0270e57..210e57d92b 100644 --- a/examples/gui/platform/src/graphics/lowlevel/buffer.rs +++ b/examples/gui/platform/src/graphics/lowlevel/buffer.rs @@ -39,7 +39,7 @@ const QUAD_VERTS: [Vertex; 4] = [ }, ]; -pub const MAX_QUADS: usize = 100_000; +pub const MAX_QUADS: usize = 1_000; pub fn create_rect_buffers( gpu_device: &wgpu::Device, diff --git a/examples/gui/platform/src/gui.rs b/examples/gui/platform/src/gui.rs index 0e6bc8b24b..29caa01404 100644 --- a/examples/gui/platform/src/gui.rs +++ b/examples/gui/platform/src/gui.rs @@ -178,7 +178,7 @@ fn run_event_loop(title: &str, root: RocElem) -> Result<(), Box> { // } // } // } - todo!("TODO handle keyboard input"); + // TODO todo!("TODO handle keyboard input"); } //Modifiers Changed Event::WindowEvent {