Browse Source

OpenGL fix - fixed a crash when you activate Alpha Threshold checkbox without a diffuse map

Anis 10 years ago
parent
commit
c9116dd4a4
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp

+ 1 - 3
Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp

@@ -986,11 +986,9 @@ void DiffuseMapFeatGLSL::setTexData(   Material::StageData &stageDat,
                                        U32 &texIndex )
 {
    GFXTextureObject *tex = stageDat.getTex( MFT_DiffuseMap );
+   passData.mSamplerNames[ texIndex ] = "diffuseMap";
    if ( tex )
-   {
-      passData.mSamplerNames[ texIndex ] = "diffuseMap";
       passData.mTexSlot[ texIndex++ ].texObject = tex;
-   }
 }