Do not update mesh in shadow pass.

It may introduce some 1 frame latency between shadows and geometry but
in practice it's not noticeable.
This commit is contained in:
vlj
2014-08-14 18:55:21 +02:00
parent 33e3b43346
commit 49779d36bf

View File

@@ -114,7 +114,7 @@ void STKAnimatedMesh::render()
const video::SMaterial& material = ReadOnlyMaterials ? mb->getMaterial() : Materials[i];
if (isObject(material.MaterialType))
{
if (irr_driver->getPhase() == SOLID_NORMAL_AND_DEPTH_PASS || irr_driver->getPhase() == TRANSPARENT_PASS || irr_driver->getPhase() == SHADOW_PASS)
if (irr_driver->getPhase() == SOLID_NORMAL_AND_DEPTH_PASS || irr_driver->getPhase() == TRANSPARENT_PASS)
{
glBindVertexArray(0);
size_t size = mb->getVertexCount() * GLmeshes[i].Stride;