Skip to content

Commit

Permalink
UPBGE: Fix projection matrix update in ImageMirror.
Browse files Browse the repository at this point in the history
Fix issue #394.
  • Loading branch information
panzergame committed Feb 21, 2017
1 parent acdbcc2 commit 80fde92
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/gameengine/VideoTexture/ImageRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,7 @@ bool ImageRender::Render()

m_camera->SetProjectionMatrix(projmat);
}
else if (m_camera->hasValidProjectionMatrix()) {
m_rasterizer->SetProjectionMatrix(m_camera->GetProjectionMatrix());
}
else {
else if (!m_camera->hasValidProjectionMatrix()) {
float lens = m_camera->GetLens();
float sensor_x = m_camera->GetSensorWidth();
float sensor_y = m_camera->GetSensorHeight();
Expand Down Expand Up @@ -386,6 +383,8 @@ bool ImageRender::Render()
m_camera->SetProjectionMatrix(projmat);
}

m_rasterizer->SetProjectionMatrix(m_camera->GetProjectionMatrix());

MT_Transform camtrans(m_camera->GetWorldToCamera());
MT_Matrix4x4 viewmat(camtrans);

Expand Down

0 comments on commit 80fde92

Please sign in to comment.