summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-10 11:38:04 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-10 11:38:04 +0100
commit86c1bc8b9b5d8ad5fbfef85f34658c1da73baa1f (patch)
tree52a3fcdc8388f8b86bd444bca2dd0bea232ca77a
parent3fddffee5f08e97d6b9509196d9800888b098bcf (diff)
run draw first, then update
-rw-r--r--editor/draw.cpp2
-rw-r--r--editor/update.cpp1
-rw-r--r--main/draw.cpp3
3 files changed, 2 insertions, 4 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp
index ad634815..72919794 100644
--- a/editor/draw.cpp
+++ b/editor/draw.cpp
@@ -2,7 +2,6 @@
#include "floormat/main.hpp"
#include "floormat/settings.hpp"
#include "shaders/tile.hpp"
-#include <Magnum/GL/DebugOutput.h>
#include <Magnum/Math/Vector3.h>
namespace floormat {
@@ -41,6 +40,7 @@ void app::draw_msaa()
void app::draw()
{
+ draw_ui();
render_menu();
}
diff --git a/editor/update.cpp b/editor/update.cpp
index 53915908..506022d5 100644
--- a/editor/update.cpp
+++ b/editor/update.cpp
@@ -100,7 +100,6 @@ void app::apply_commands(const key_set& keys)
void app::update(float dt)
{
- draw_ui();
apply_commands(keys);
do_camera(dt, keys, get_key_modifiers());
clear_non_repeated_keys();
diff --git a/main/draw.cpp b/main/draw.cpp
index 2249d703..386ea960 100644
--- a/main/draw.cpp
+++ b/main/draw.cpp
@@ -159,8 +159,6 @@ void main_impl::do_update()
void main_impl::drawEvent()
{
- do_update();
-
_shader.set_tint({1, 1, 1, 1});
{
@@ -183,6 +181,7 @@ void main_impl::drawEvent()
}
app.draw();
+ do_update();
swapBuffers();
redraw();