From d309ed0b2ac06d7ba48322303d56bf39c8b57fe4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 29 Oct 2022 18:21:25 +0200 Subject: add wall outline wireframes --- editor/app.hpp | 8 ++++++-- editor/draw.cpp | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/app.hpp b/editor/app.hpp index f63f7014..de7ffc14 100644 --- a/editor/app.hpp +++ b/editor/app.hpp @@ -4,7 +4,9 @@ #include "editor.hpp" #include "src/global-coords.hpp" #include "draw/wireframe.hpp" -#include "draw/quad.hpp" +#include "draw/quad-floor.hpp" +#include "draw/quad-wall-n.hpp" +#include "draw/quad-wall-w.hpp" #include "draw/box.hpp" #include "floormat/app.hpp" @@ -97,7 +99,9 @@ struct app final : floormat_app Containers::Pointer M; ImGuiIntegration::Context _imgui{NoCreate}; std::shared_ptr _floor1, _floor2, _wall1, _wall2; - wireframe_mesh _wireframe_quad; + wireframe_mesh _wireframe_quad; + wireframe_mesh _wireframe_wall_n; + wireframe_mesh _wireframe_wall_w; wireframe_mesh _wireframe_box; editor _editor; enum_bitset keys, keys_repeat; diff --git a/editor/draw.cpp b/editor/draw.cpp index 0c356268..535d95da 100644 --- a/editor/draw.cpp +++ b/editor/draw.cpp @@ -16,6 +16,8 @@ void app::draw_wireframe_quad(global_coords pos) const Vector3 center{pt[0]*TILE_SIZE[0], pt[1]*TILE_SIZE[1], 0}; shader.set_tint({1, 0, 0, 1}); _wireframe_quad.draw(shader, {center, {TILE_SIZE[0], TILE_SIZE[1]}, LINE_WIDTH}); + //_wireframe_wall_n.draw(shader, {center, {TILE_SIZE[0], TILE_SIZE[1], TILE_SIZE[2]}, LINE_WIDTH}); + //_wireframe_wall_w.draw(shader, {center, {TILE_SIZE[0], TILE_SIZE[1], TILE_SIZE[2]}, LINE_WIDTH}); } } -- cgit v1.2.3