diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-29 18:21:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-29 18:21:25 +0200 |
commit | d309ed0b2ac06d7ba48322303d56bf39c8b57fe4 (patch) | |
tree | 0b4444b6a3789c61e5fdd7a27af2519b22f7dac7 /editor | |
parent | d36ca021562c7a5d9d012cfdcb6e3260e9acdae5 (diff) |
add wall outline wireframes
Diffstat (limited to 'editor')
-rw-r--r-- | editor/app.hpp | 8 | ||||
-rw-r--r-- | editor/draw.cpp | 2 |
2 files changed, 8 insertions, 2 deletions
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<floormat_main> M; ImGuiIntegration::Context _imgui{NoCreate}; std::shared_ptr<tile_atlas> _floor1, _floor2, _wall1, _wall2; - wireframe_mesh<wireframe::quad> _wireframe_quad; + wireframe_mesh<wireframe::quad_floor> _wireframe_quad; + wireframe_mesh<wireframe::quad_wall_n> _wireframe_wall_n; + wireframe_mesh<wireframe::quad_wall_w> _wireframe_wall_w; wireframe_mesh<wireframe::box> _wireframe_box; editor _editor; enum_bitset<key> 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}); } } |