Set texture matrix in updateNoGL and not in updateGL

This commit is contained in:
Vincent Lejeune 2014-09-15 00:16:50 +02:00
parent 476f95a6c9
commit 866cd2b979

View File

@ -105,6 +105,15 @@ void STKAnimatedMesh::updateNoGL()
}
isMaterialInitialized = true;
}
for (u32 i = 0; i < m->getMeshBufferCount(); ++i)
{
scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i);
if (!mb)
continue;
if (mb)
GLmeshes[i].TextureMatrix = getMaterial(i).getTextureMatrix(0);
}
}
void STKAnimatedMesh::updateGL()
@ -177,8 +186,6 @@ void STKAnimatedMesh::updateGL()
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
}
if (mb)
GLmeshes[i].TextureMatrix = getMaterial(i).getTextureMatrix(0);
}
}