Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-09-18 05:46:28 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-09-18 05:46:28 +0400
commit0a7767d597dc92727a64fae676cbf03c9ef17915 (patch)
tree32aa2443298aad6bfd40640b8e35d44218d80bac /source/gameengine/Ketsji/KX_KetsjiEngine.cpp
parent3bf0a6fed88e43605fa82acbd1dbad7e64bed93d (diff)
Fix for bug #3858: the game engine mouse focus sensor did not work
correct if there was more than one camera. It shoots rays from the active camera, but used the viewport from whichever camera was drawn last, now it uses the correct vieport.
Diffstat (limited to 'source/gameengine/Ketsji/KX_KetsjiEngine.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index 888dcf3d01f..c7b0d7b3ea3 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -299,7 +299,7 @@ void KX_KetsjiEngine::ClearFrame()
list<KX_Camera*>::iterator it;
for(it = cameras->begin(); it != cameras->end(); it++)
{
- SetupViewport(scene, (*it), area, viewport);
+ GetSceneViewport(scene, (*it), area, viewport);
if(!doclear) {
clearvp = viewport;
@@ -894,7 +894,7 @@ void KX_KetsjiEngine::SetCameraOverrideClipping(float near, float far)
m_overrideCamFar = far;
}
-void KX_KetsjiEngine::SetupViewport(KX_Scene *scene, KX_Camera* cam, RAS_Rect& area, RAS_Rect& viewport)
+void KX_KetsjiEngine::GetSceneViewport(KX_Scene *scene, KX_Camera* cam, RAS_Rect& area, RAS_Rect& viewport)
{
// In this function we make sure the rasterizer settings are upto
// date. We compute the viewport so that logic
@@ -1001,7 +1001,7 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, KX_Camera* cam)
if (!cam)
return;
- SetupViewport(scene, cam, area, viewport);
+ GetSceneViewport(scene, cam, area, viewport);
// store the computed viewport in the scene
scene->SetSceneViewport(viewport);