diff --git a/src/Text/Renderer.cpp b/src/Text/Renderer.cpp index 36d25aa09..09f98c970 100644 --- a/src/Text/Renderer.cpp +++ b/src/Text/Renderer.cpp @@ -201,7 +201,6 @@ std::tuple renderInternal(AbstractFont& font, const GlyphCache& c vertexBuffer.setData(vertices, usage); const UnsignedInt glyphCount = vertices.size()/4; - const UnsignedInt vertexCount = glyphCount*4; const UnsignedInt indexCount = glyphCount*6; /* Render indices and upload them */ @@ -215,7 +214,7 @@ std::tuple renderInternal(AbstractFont& font, const GlyphCache& c Mesh mesh; mesh.setPrimitive(MeshPrimitive::Triangles) .setIndexCount(indexCount) - .setIndexBuffer(indexBuffer, 0, indexType, 0, vertexCount); + .setIndexBuffer(indexBuffer, 0, indexType, 0, vertices.size()); return std::make_tuple(std::move(mesh), rectangle); }