From c06879a8b450ba59b8d2b20e6b6d1ec9beb2756d Mon Sep 17 00:00:00 2001 From: vlj Date: Tue, 15 Jul 2014 00:03:33 +0200 Subject: [PATCH] Fix animated transparent texture. --- src/graphics/stkanimatedmesh.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/graphics/stkanimatedmesh.cpp b/src/graphics/stkanimatedmesh.cpp index 69ed87ee4..cb36955f9 100644 --- a/src/graphics/stkanimatedmesh.cpp +++ b/src/graphics/stkanimatedmesh.cpp @@ -117,13 +117,13 @@ 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) - { - glBindVertexArray(0); - glBindBuffer(GL_ARRAY_BUFFER, getVBO(mb->getVertexType())); - glBufferSubData(GL_ARRAY_BUFFER, GLmeshes[i].vaoBaseVertex * GLmeshes[i].Stride, mb->getVertexCount() * GLmeshes[i].Stride, mb->getVertices()); - glBindBuffer(GL_ARRAY_BUFFER, 0); - } + if (irr_driver->getPhase() == SOLID_NORMAL_AND_DEPTH_PASS || irr_driver->getPhase() == TRANSPARENT_PASS) + { + glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, getVBO(mb->getVertexType())); + glBufferSubData(GL_ARRAY_BUFFER, GLmeshes[i].vaoBaseVertex * GLmeshes[i].Stride, mb->getVertexCount() * GLmeshes[i].Stride, mb->getVertices()); + glBindBuffer(GL_ARRAY_BUFFER, 0); + } } if (mb) GLmeshes[i].TextureMatrix = getMaterial(i).getTextureMatrix(0);