diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-09 16:17:23 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-09 16:17:23 +0100 |
commit | 1febb02d958fa4cf8c15e3ca18f9d644f9fc80fb (patch) | |
tree | d9b389f6c2ff8e031bd70d503c289bcfddf2f048 /editor | |
parent | 09605450ecc99ad1f4d50e9c143fda6c7762e702 (diff) |
depth buffer works!
Diffstat (limited to 'editor')
-rw-r--r-- | editor/draw.cpp | 2 | ||||
-rw-r--r-- | editor/editor.cpp | 2 | ||||
-rw-r--r-- | editor/imgui.cpp | 8 |
3 files changed, 1 insertions, 11 deletions
diff --git a/editor/draw.cpp b/editor/draw.cpp index 89613d37..ad634815 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -9,8 +9,6 @@ namespace floormat { void app::draw_cursor() { - GL::Renderer::disable(GL::Renderer::Feature::DepthTest); - constexpr float LINE_WIDTH = 2; if (cursor.tile && !cursor.in_imgui) diff --git a/editor/editor.cpp b/editor/editor.cpp index 9676a22d..1bba44d6 100644 --- a/editor/editor.cpp +++ b/editor/editor.cpp @@ -82,7 +82,7 @@ void editor::on_mouse_move(world& world, global_coords& pos, int mods) void editor::on_click_(world& world, global_coords pos, button b) { if (auto* mode = current_tile_editor(); mode != nullptr) - if (auto opt = mode->get_selected(); opt) + if (auto opt = mode->get_selected(); opt || b == button::remove) { switch (b) { diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 5df5df64..84827ba3 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -19,14 +19,6 @@ void app::init_imgui(Vector2i size) void app::render_menu() { - GL::Renderer::setBlendEquation(GL::Renderer::BlendEquation::Add, GL::Renderer::BlendEquation::Add); - GL::Renderer::setBlendFunction(GL::Renderer::BlendFunction::SourceAlpha, GL::Renderer::BlendFunction::OneMinusSourceAlpha); - GL::Renderer::enable(GL::Renderer::Feature::Blending); - - GL::Renderer::enable(GL::Renderer::Feature::ScissorTest); - GL::Renderer::disable(GL::Renderer::Feature::FaceCulling); - GL::Renderer::disable(GL::Renderer::Feature::DepthTest); - _imgui.drawFrame(); } |