diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-16 16:53:39 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-05-16 16:53:39 +0400 |
commit | 0a27ae972e791590e19b3330ebbb487f35f50b84 (patch) | |
tree | 568ffd85553fe9ace5225388effb9bfee6291db6 /source | |
parent | d162882e3af5fbf53ef90138d2c3521fa0d1a140 (diff) |
Don't overwrite camera's projection matrix every frame.
Diffstat (limited to 'source')
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index bb17e3e7916..91e81f77904 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -746,7 +746,11 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene) if (m_overrideCam && (scene->GetName() == m_overrideSceneName) && m_overrideCamUseOrtho) { MT_CmMatrix4x4 projmat = m_overrideCamProjMat; m_rasterizer->SetProjectionMatrix(projmat); - } else { + } else if (cam->hasValidProjectionMatrix()) + { + m_rasterizer->SetProjectionMatrix(cam->GetProjectionMatrix()); + } else + { RAS_FrameFrustum frustum; RAS_FramingManager::ComputeFrustum( @@ -836,7 +840,7 @@ void KX_KetsjiEngine::PostProcessScene(KX_Scene* scene) KX_Camera* activecam = NULL; RAS_CameraData camdata = RAS_CameraData(); - activecam = new KX_Camera(scene,KX_Scene::m_callbacks,camdata); + activecam = new KX_Camera(scene,KX_Scene::m_callbacks,camdata, false); activecam->SetName("__default__cam__"); // set transformation |