Browse Source

Fix the first TextBatch:set call uploading vertices twice.

Sasha Szpakowski 1 year ago
parent
commit
5112345893
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/TextBatch.cpp

+ 1 - 1
src/modules/graphics/TextBatch.cpp

@@ -36,7 +36,7 @@ TextBatch::TextBatch(Font *font, const std::vector<love::font::ColoredString> &t
 	, vertexData(nullptr)
 	, vertexData(nullptr)
 	, modifiedVertices()
 	, modifiedVertices()
 	, vertOffset(0)
 	, vertOffset(0)
-	, textureCacheID((uint32) -1)
+	, textureCacheID(font->getTextureCacheID())
 {
 {
 	set(text);
 	set(text);
 }
 }