diff --git a/source/client/graphics/CelestialObject.cpp b/source/client/graphics/CelestialObject.cpp index abd62b62..24034822 100644 --- a/source/client/graphics/CelestialObject.cpp +++ b/source/client/graphics/CelestialObject.cpp @@ -34,13 +34,6 @@ CelestialObject::CelestialObject() { m_vbo.setupDefaultLayout(); - - static const u16 indices[] = { - 0, 1, 3, - 3, 1, 2 - }; - - m_ibo.init(indices, sizeof(indices)); } void CelestialObject::setTexture(const std::string &textureName) { @@ -172,5 +165,5 @@ void CelestialObject::draw(RenderTarget &target, RenderStates states) const { if (m_texture) states.texture = m_texture; - target.drawElements(m_vbo, m_ibo, 0, 0, states); + target.drawElements(m_vbo, target.defaultIndexBuffer(), 0, 6, states); } diff --git a/source/client/graphics/CelestialObject.hpp b/source/client/graphics/CelestialObject.hpp index e93b27ba..5eca42e1 100644 --- a/source/client/graphics/CelestialObject.hpp +++ b/source/client/graphics/CelestialObject.hpp @@ -31,7 +31,6 @@ #include #include "Drawable.hpp" -#include "IndexBuffer.hpp" #include "VertexBuffer.hpp" class CelestialObject : public Drawable, public gk::Transformable { @@ -57,7 +56,6 @@ class CelestialObject : public Drawable, public gk::Transformable { void draw(RenderTarget &target, RenderStates states) const override; mutable VertexBuffer m_vbo; - IndexBuffer m_ibo; gk::Color m_color = gk::Color::White;