diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2013-03-22 03:20:46 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2013-03-22 03:20:46 +0400 |
commit | 5ef9a20671e80d88528ac8fefa471855a2db1f9f (patch) | |
tree | 16f9a15253f5b2279aa28e177cce43ab011c7d66 /source/gameengine/Converter | |
parent | f254ba77fd8b820b892298009634c5cc8ca32a76 (diff) |
BGE bugfix for [#34505] Vertex Colors not working in the BGE (for custom GLSL shaders) when multitexture and no material
Bug introduced on rev.36723
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 6481983e8bc..a833885bc9b 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -429,8 +429,9 @@ static void SetDefaultLightMode(Scene* scene) static bool GetMaterialUseVColor(Material *ma, const bool glslmat) { if (ma) { - /* glsl uses vertex colors, otherwise use material setting */ - return (glslmat || (ma->mode & MA_VERTEXCOLP) != 0); + /* glsl uses vertex colors, otherwise use material setting + * defmaterial doesn't have VERTEXCOLP as default [#34505] */ + return (glslmat || ma == &defmaterial || (ma->mode & MA_VERTEXCOLP) != 0); } else { /* no material, use vertex colors */ |