State diff for Mesh:setTexture;
@@ -247,6 +247,7 @@ Texture* lovrMeshGetTexture(Mesh* mesh) {
}
void lovrMeshSetTexture(Mesh* mesh, Texture* texture) {
+ if (mesh->texture != texture) {
if (mesh->texture) {
lovrRelease(&mesh->texture->ref);
}
@@ -257,6 +258,7 @@ void lovrMeshSetTexture(Mesh* mesh, Texture* texture) {
lovrRetain(&mesh->texture->ref);
}
}
+}
void* lovrMeshMap(Mesh* mesh, int start, int count) {
#ifdef EMSCRIPTEN
