Browse Source

Text: it's totally fine to have 256 vertices indexed with UnsignedByte.

pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
6dd40e744d
  1. 4
      src/Text/Renderer.cpp

4
src/Text/Renderer.cpp

@ -176,11 +176,11 @@ std::pair<Containers::Array<unsigned char>, Mesh::IndexType> renderIndicesIntern
Containers::Array<unsigned char> indices;
Mesh::IndexType indexType;
if(vertexCount < 255) {
if(vertexCount <= 256) {
indexType = Mesh::IndexType::UnsignedByte;
indices = Containers::Array<unsigned char>(indexCount*sizeof(UnsignedByte));
createIndices<UnsignedByte>(indices, glyphCount);
} else if(vertexCount < 65535) {
} else if(vertexCount <= 65536) {
indexType = Mesh::IndexType::UnsignedShort;
indices = Containers::Array<unsigned char>(indexCount*sizeof(UnsignedShort));
createIndices<UnsignedShort>(indices, glyphCount);

Loading…
Cancel
Save