From 6dd40e744d05d13d55e2907660ac4a1716eba551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 13 Dec 2013 15:21:47 +0100 Subject: [PATCH] Text: it's totally fine to have 256 vertices indexed with UnsignedByte. --- src/Text/Renderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Text/Renderer.cpp b/src/Text/Renderer.cpp index 09f98c970..9b112e40e 100644 --- a/src/Text/Renderer.cpp +++ b/src/Text/Renderer.cpp @@ -176,11 +176,11 @@ std::pair, Mesh::IndexType> renderIndicesIntern Containers::Array indices; Mesh::IndexType indexType; - if(vertexCount < 255) { + if(vertexCount <= 256) { indexType = Mesh::IndexType::UnsignedByte; indices = Containers::Array(indexCount*sizeof(UnsignedByte)); createIndices(indices, glyphCount); - } else if(vertexCount < 65535) { + } else if(vertexCount <= 65536) { indexType = Mesh::IndexType::UnsignedShort; indices = Containers::Array(indexCount*sizeof(UnsignedShort)); createIndices(indices, glyphCount);