Browse Source

Use Renderer as the event sender for view update begin & end events to not break code relying on that.

Lasse Öörni 11 years ago
parent
commit
86df5e0a96
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Source/Urho3D/Graphics/View.cpp

+ 3 - 3
Source/Urho3D/Graphics/View.cpp

@@ -518,7 +518,7 @@ void View::Update(const FrameInfo& frame)
     eventData[P_TEXTURE] = (renderTarget_ ? renderTarget_->GetParentTexture() : 0);
     eventData[P_TEXTURE] = (renderTarget_ ? renderTarget_->GetParentTexture() : 0);
     eventData[P_SCENE] = scene_;
     eventData[P_SCENE] = scene_;
     eventData[P_CAMERA] = camera_;
     eventData[P_CAMERA] = camera_;
-    SendEvent(E_BEGINVIEWUPDATE, eventData);
+    renderer_->SendEvent(E_BEGINVIEWUPDATE, eventData);
 
 
     int maxSortedInstances = renderer_->GetMaxSortedInstances();
     int maxSortedInstances = renderer_->GetMaxSortedInstances();
     
     
@@ -534,7 +534,7 @@ void View::Update(const FrameInfo& frame)
     
     
     if (hasScenePasses_ && (!camera_ || !octree_))
     if (hasScenePasses_ && (!camera_ || !octree_))
     {
     {
-        SendEvent(E_ENDVIEWUPDATE, eventData);
+        renderer_->SendEvent(E_ENDVIEWUPDATE, eventData);
         return;
         return;
     }
     }
 
 
@@ -545,7 +545,7 @@ void View::Update(const FrameInfo& frame)
     GetDrawables();
     GetDrawables();
     GetBatches();
     GetBatches();
 
 
-    SendEvent(E_ENDVIEWUPDATE, eventData);
+    renderer_->SendEvent(E_ENDVIEWUPDATE, eventData);
 }
 }
 
 
 void View::Render()
 void View::Render()