Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2012-05-29 11:12:12 +0400
committerMitchell Stokes <mogurijin@gmail.com>2012-05-29 11:12:12 +0400
commit0e98380bf45253a74fbd70c421105ce486acf58d (patch)
tree666a272594f7cf8bf39c0e4d74b313c3ed7300a1 /source/gameengine/Ketsji/BL_BlenderShader.cpp
parentb5b7455bad02064b2c19aa85222804184b236521 (diff)
Committing the VBO/Multi-UV patch from Cucumber. I'm putting this here since it still requires a little bit more work before going into trunk (according to Kupoman). However, I'd like to get the major Rasterizer restructuring for storage modes into this branch before people get too crazy with OpenGL refactoring. Also, I'll be making some changes to the converter soon that I hope to use the Multi-UV part of the patch to build from.
Diffstat (limited to 'source/gameengine/Ketsji/BL_BlenderShader.cpp')
-rw-r--r--source/gameengine/Ketsji/BL_BlenderShader.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp
index 122d692b599..a1f3ea64e1a 100644
--- a/source/gameengine/Ketsji/BL_BlenderShader.cpp
+++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp
@@ -93,21 +93,15 @@ void BL_BlenderShader::SetAttribs(RAS_IRasterizer* ras, const BL_Material *mat)
ras->SetTexCoordNum(0);
ras->SetAttribNum(attrib_num);
- for (i=0; i<attrib_num; i++)
+ for (i = 0; i < attrib_num; i++)
ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_DISABLE, i);
for (i = 0; i < attribs.totlayer; i++) {
if (attribs.layer[i].glindex > attrib_num)
continue;
- if (attribs.layer[i].type == CD_MTFACE) {
- if (!mat->uvName.IsEmpty() && strcmp(mat->uvName.ReadPtr(), attribs.layer[i].name) == 0)
- ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex);
- else if (!mat->uv2Name.IsEmpty() && strcmp(mat->uv2Name.ReadPtr(), attribs.layer[i].name) == 0)
- ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV2, attribs.layer[i].glindex);
- else
- ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV1, attribs.layer[i].glindex);
- }
+ if (attribs.layer[i].type == CD_MTFACE)
+ ras->SetAttrib(RAS_IRasterizer::RAS_TEXCO_UV, attribs.layer[i].glindex);
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)