]> git.localhorst.tv Git - blank.git/blobdiff - src/hud.cpp
use indices for model rendering
[blank.git] / src / hud.cpp
index ed5767dfeac9216f995c28351755ca94397dce5a..d60401199e10f453096534c9f9685fef8c47fab5 100644 (file)
@@ -27,6 +27,9 @@ HUD::HUD()
                { -10.0f,   0.0f, 0.0f }, { 10.0f,  0.0f, 0.0f },
                {   0.0f, -10.0f, 0.0f }, {  0.0f, 10.0f, 0.0f },
        });
+       crosshair.indices = std::vector<OutlineModel::Index>({
+               0, 1, 2, 3
+       });
        crosshair.colors.resize(4, { 10.0f, 10.0f, 10.0f });
        crosshair.Invalidate();
 }
@@ -44,7 +47,7 @@ void HUD::Viewport(float x, float y, float width, float height) {
 
 void HUD::Display(const BlockType &type) {
        block.Clear();
-       type.FillModel({ 0.0f, 0.0f, 0.0f }, block);
+       type.FillModel(block);
        block_visible = type.visible;
 }