Fixed picking event

This commit is contained in:
2015-12-14 14:19:45 +01:00
parent 3a9577c9fb
commit 797036c204
2 changed files with 7 additions and 2 deletions
+4 -1
View File
@@ -93,12 +93,15 @@ void PickingPass::Draw(RenderQueueCollection& rq)
GLERROR("PickingPass Error");
//Publish pick event every frame with the pick data that can be picked by the event
int fbWidth;
int fbHeight;
glfwGetFramebufferSize(m_Renderer->Window(), &fbWidth, &fbHeight);
Events::Picking pickEvent = Events::Picking(
&m_PickingBuffer,
&m_DepthBuffer,
m_Renderer->Camera()->ProjectionMatrix(),
m_Renderer->Camera()->ViewMatrix(),
m_Renderer->Resolution(),
Rectangle(fbWidth, fbHeight),
&m_PickingColorsToEntity);
m_EventBroker->Publish(pickEvent);