summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/draw.cpp2
-rw-r--r--editor/editor.cpp2
-rw-r--r--editor/imgui.cpp8
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();
}