aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-01-30 21:14:24 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-01-30 21:14:24 +0100
commitf24c2bba8159e5a42397ecfc82a669a94f5ad4b3 (patch)
treeb6c12bad0fb1e6b168e1a35fb7e5d83dd4b1a4ac /src/main.cpp
parentc5ac7ee3f91efc60d87a59706c9ce2970116b865 (diff)
Fix api bugs
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 390df41..37ebddb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -44,8 +44,8 @@ int main() {
// Image dimensions
const float aspect_ratio = 16.0 / 9.0;
- const uint32_t width = 400;
- const uint32_t height = width / aspect_ratio;
+ uint32_t width = 400;
+ uint32_t height = width / aspect_ratio;
window wnd { width , height };
@@ -68,8 +68,10 @@ int main() {
for (auto event: wnd.events) {
switch(event.type) {
case EVENT_TYPES::RESIZE: {
- ((input_data*) renderer.compute_shader_buffer.mapped_ptr)->width = event.width;
- ((input_data*) renderer.compute_shader_buffer.mapped_ptr)->height = event.height;
+ width = event.width;
+ height = event.height;
+ ((input_data*) renderer.compute_shader_buffer.mapped_ptr)->width = width;
+ ((input_data*) renderer.compute_shader_buffer.mapped_ptr)->height = height;
if (event.width == 0 && event.height == 0) {
canRender = false;