diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-03 17:28:19 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-03-03 20:34:02 +0100 |
commit | f947c96ba400784090aa36c5bde469c92843083d (patch) | |
tree | 0784f1062e5bea931dfe757cf7ac74c680e50f55 /main | |
parent | 8b5ad57aefe1d4bdee5334b194f63168fbe8581e (diff) |
editor: add rendering clickables
Diffstat (limited to 'main')
-rw-r--r-- | main/draw.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/draw.cpp b/main/draw.cpp index 2c8ebc7b..57623eef 100644 --- a/main/draw.cpp +++ b/main/draw.cpp @@ -107,7 +107,6 @@ void main_impl::draw_world() noexcept _floor_mesh.draw(_shader, c); } - _clickable_scenery.clear(); GL::Renderer::enable(GL::Renderer::Feature::DepthTest); GL::defaultFramebuffer.clearDepthStencil(0, 0); for (std::int16_t y = miny; y <= maxy; y++) @@ -122,7 +121,10 @@ void main_impl::draw_world() noexcept _wall_mesh.draw(_shader, c); } + _clickable_scenery.clear(); + GL::Renderer::setDepthMask(false); + for (std::int16_t y = miny; y <= maxy; y++) for (std::int16_t x = minx; x <= maxx; x++) { @@ -142,6 +144,7 @@ void main_impl::draw_world() noexcept } } } + GL::Renderer::setDepthMask(true); GL::Renderer::disable(GL::Renderer::Feature::DepthTest); |