diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-03-02 00:45:42 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-03-02 00:45:42 +0400 |
commit | 2822a14e5d5dac398d8e1563e9b9ec6c183540bd (patch) | |
tree | a8571bdbe86e868ef2afae9edf3cdfac20b0ee92 /source/gameengine/Ketsji | |
parent | 70fba545457dd2ae8b36a367280ea6bd0c2c5e40 (diff) |
Fix #34483: game engine multi UV glsl materials not working correct after changes
to support more than 2 UV maps. This code indirectly depended on the order of
OpenGL attribute ID's assigned by the OpenGL driver being the same as the
attributes being declared in the GLSL shader code, which is not always the case.
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/BL_BlenderShader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp index 64e191fe960..f5f9b344b87 100644 --- a/source/gameengine/Ketsji/BL_BlenderShader.cpp +++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp @@ -80,7 +80,7 @@ void BL_BlenderShader::SetAttribs(RAS_IRasterizer* ras, const BL_Material *mat) { GPUVertexAttribs attribs; GPUMaterial *gpumat; - int i, attrib_num; + int i, attrib_num, uv = 0; ras->SetAttribNum(0); @@ -103,7 +103,7 @@ void BL_BlenderShader::SetAttribs(RAS_IRasterizer* ras, const BL_Material *mat) continue; if (attribs.layer[i].type == CD_MTFACE) - ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV, attribs.layer[i].glindex); + ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV, attribs.layer[i].glindex, uv++); else if (attribs.layer[i].type == CD_TANGENT) ras->SetAttrib(RAS_IRasterizer::RAS_TEXTANGENT, attribs.layer[i].glindex); else if (attribs.layer[i].type == CD_ORCO) |