X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2Fui.cpp;h=c7d8b2498c97a39e31b1ef75fa32002a96bc227f;hb=4e3afb4c7631591b80cb7740a9b6f46da69b7ae4;hp=4dd9711edac447276bc721235749a6d573b27e67;hpb=c1da86ebab41895bf49ed747c75ecf722e8c5586;p=blank.git diff --git a/src/ui/ui.cpp b/src/ui/ui.cpp index 4dd9711..c7d8b24 100644 --- a/src/ui/ui.cpp +++ b/src/ui/ui.cpp @@ -15,7 +15,7 @@ #include "../graphics/Font.hpp" #include "../graphics/Viewport.hpp" #include "../io/TokenStreamReader.hpp" -#include "../model/shapes.hpp" +#include "../model/bounds.hpp" #include "../world/BlockLookup.hpp" #include "../world/World.hpp" #include "../world/WorldManipulator.hpp" @@ -250,12 +250,12 @@ HUD::HUD(Environment &env, Config &config, const Player &player) messages.Background(glm::vec4(0.5f)); // crosshair - OutlineModel::Buffer buf; + OutlineMesh::Buffer buf; buf.vertices = std::vector({ { -10.0f, 0.0f, 0.0f }, { 10.0f, 0.0f, 0.0f }, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 0.0f }, }); - buf.indices = std::vector({ + buf.indices = std::vector({ 0, 1, 2, 3 }); buf.colors.resize(4, { 10.0f, 10.0f, 10.0f }); @@ -264,7 +264,7 @@ HUD::HUD(Environment &env, Config &config, const Player &player) namespace { -OutlineModel::Buffer outl_buf; +OutlineMesh::Buffer outl_buf; } @@ -272,7 +272,7 @@ void HUD::FocusBlock(const Chunk &chunk, int index) { const Block &block = chunk.BlockAt(index); const BlockType &type = chunk.Type(index); outl_buf.Clear(); - type.FillOutlineModel(outl_buf); + type.FillOutlineMesh(outl_buf); outline.Update(outl_buf); outline_transform = chunk.Transform(player.GetEntity().ChunkCoords()); outline_transform *= chunk.ToTransform(Chunk::ToPos(index), index); @@ -312,7 +312,7 @@ void HUD::DisplayNone() { void HUD::Display(const BlockType &type) { block_buf.Clear(); - type.FillEntityModel(block_buf); + type.FillEntityMesh(block_buf); block.Update(block_buf); block_label.Set(env.assets.small_ui_font, type.label);