diff options
Diffstat (limited to 'src/mesh.cpp')
-rw-r--r-- | src/mesh.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesh.cpp b/src/mesh.cpp index 218e2d0b2..7fc7531f2 100644 --- a/src/mesh.cpp +++ b/src/mesh.cpp @@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <iostream> #include <IAnimatedMesh.h> #include <SAnimatedMesh.h> +#include <IAnimatedMeshSceneNode.h> // In Irrlicht 1.8 the signature of ITexture::lock was changed from // (bool, u32) to (E_TEXTURE_LOCK_MODE, u32). @@ -184,6 +185,13 @@ void setMeshBufferColor(scene::IMeshBuffer *buf, const video::SColor &color) ((video::S3DVertex *) (vertices + i * stride))->Color = color; } +void setAnimatedMeshColor(scene::IAnimatedMeshSceneNode *node, const video::SColor &color) +{ + for (u32 i = 0; i < node->getMaterialCount(); ++i) { + node->getMaterial(i).EmissiveColor = color; + } +} + void setMeshColor(scene::IMesh *mesh, const video::SColor &color) { if (mesh == NULL) |