浏览代码

Revert OpenGL-incompatible change in Batch::Prepare().

Lasse Öörni 10 年之前
父节点
当前提交
c8e406489d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/Urho3D/Graphics/Batch.cpp

+ 2 - 2
Source/Urho3D/Graphics/Batch.cpp

@@ -327,7 +327,7 @@ void Batch::Prepare(View* view, bool setModelTransform, bool allowDepthWrite) co
                     Matrix4 shadowMatrices[2];
 
                     CalculateSpotMatrix(shadowMatrices[0], light, Vector3::ZERO);
-                    bool isShadowed = shadowMap && pixelShader_->HasTextureUnit(TU_SHADOWMAP);
+                    bool isShadowed = shadowMap && graphics->HasTextureUnit(TU_SHADOWMAP);
                     if (isShadowed)
                         CalculateShadowMatrix(shadowMatrices[1], lightQueue_, 0, renderer, Vector3::ZERO);
 
@@ -554,7 +554,7 @@ void Batch::Prepare(View* view, bool setModelTransform, bool allowDepthWrite) co
         const HashMap<TextureUnit, SharedPtr<Texture> >& textures = material_->GetTextures();
         for (HashMap<TextureUnit, SharedPtr<Texture> >::ConstIterator i = textures.Begin(); i != textures.End(); ++i)
         {
-            if (pixelShader_->HasTextureUnit(i->first_))
+            if (graphics->HasTextureUnit(i->first_))
                 graphics->SetTexture(i->first_, i->second_.Get());
         }
     }