浏览代码

Fix Renderer2D.

PrimitiveWaste 11 年之前
父节点
当前提交
28eea597dd
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Source/Engine/Urho2D/Renderer2D.cpp

+ 2 - 0
Source/Engine/Urho2D/Renderer2D.cpp

@@ -69,12 +69,14 @@ void Renderer2D::RegisterObject(Context* context)
 void Renderer2D::UpdateBatches(const FrameInfo& frame)
 {
     unsigned count = batches_.Size();
+    bool hasShaderParameters = HasShaderParameters();
 
     // Update non-thread critical parts of the source batches
     for (unsigned i = 0; i < count; ++i)
     {
         batches_[i].distance_ = 10.0f + (count - i) * 0.001f;
         batches_[i].worldTransform_ = &Matrix3x4::IDENTITY;
+        batches_[i].shaderParameters_ = hasShaderParameters ? &shaderParameters_ : 0;
     }
 }