X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fgraphics%2Fmesh.cpp;h=906b20f3e0732d802e61c740380259f0d63fdc34;hb=ef2427f841a434f93805321f8bbac44be2dd4555;hp=9cb8c92ae9736a0337a1c7f681e1a2fe1115f5c1;hpb=2ad195d00eea2c4d48f3f1a3ccc60a8176e7da20;p=blank.git diff --git a/src/graphics/mesh.cpp b/src/graphics/mesh.cpp index 9cb8c92..906b20f 100644 --- a/src/graphics/mesh.cpp +++ b/src/graphics/mesh.cpp @@ -18,10 +18,10 @@ void EntityMesh::Update(const Buffer &buf) noexcept { std::cerr << "EntityMesh: not enough tex coords!" << std::endl; } if (buf.hsl_mods.size() < buf.vertices.size()) { - std::cerr << "BlockMesh: not enough HSL modifiers!" << std::endl; + std::cerr << "EntityMesh: not enough HSL modifiers!" << std::endl; } if (buf.rgb_mods.size() < buf.vertices.size()) { - std::cerr << "BlockMesh: not enough RGB modifiers!" << std::endl; + std::cerr << "EntityMesh: not enough RGB modifiers!" << std::endl; } if (buf.normals.size() < buf.vertices.size()) { std::cerr << "EntityMesh: not enough normals!" << std::endl; @@ -38,11 +38,6 @@ void EntityMesh::Update(const Buffer &buf) noexcept { } -void EntityMesh::Draw() const noexcept { - vao.DrawTriangleElements(); -} - - void BlockMesh::Update(const Buffer &buf) noexcept { #ifndef NDEBUG if (buf.tex_coords.size() < buf.vertices.size()) { @@ -69,11 +64,6 @@ void BlockMesh::Update(const Buffer &buf) noexcept { } -void BlockMesh::Draw() const noexcept { - vao.DrawTriangleElements(); -} - - void PrimitiveMesh::Buffer::FillRect( float w, float h, const Color &color, @@ -129,16 +119,12 @@ void PrimitiveMesh::Update(const Buffer &buf) noexcept { } -void PrimitiveMesh::DrawLines() noexcept { +void PrimitiveMesh::DrawLines() const noexcept { glEnable(GL_LINE_SMOOTH); glLineWidth(2.0f); vao.DrawLineElements(); } -void PrimitiveMesh::DrawTriangles() noexcept { - vao.DrawTriangleElements(); -} - void SkyBoxMesh::LoadUnitBox() { Buffer buffer; @@ -169,10 +155,6 @@ void SkyBoxMesh::Update(const Buffer &buf) noexcept { vao.PushIndices(ATTRIB_INDEX, buf.indices); } -void SkyBoxMesh::Draw() const noexcept { - vao.DrawTriangleElements(); -} - void SpriteMesh::Buffer::LoadRect( float w, float h, @@ -210,9 +192,4 @@ void SpriteMesh::Update(const Buffer &buf) noexcept { vao.PushIndices(ATTRIB_INDEX, buf.indices); } - -void SpriteMesh::Draw() noexcept { - vao.DrawTriangleElements(); -} - }