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:
authorDalai Felinto <dfelinto@gmail.com>2010-09-15 11:05:55 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-09-15 11:05:55 +0400
commitee7a2ccb22f4518bd2f6d3d2ae355ff01f917686 (patch)
tree0018569dc82e88f3f68d52395ee16b4bb0bc885f /source/gameengine/Ketsji/KX_Dome.cpp
parent9234f29e673632d15f6a19cf5eda675cde392e44 (diff)
BGE Dome: fix for "objects parented to the camera will be rendered multiple times in Dome mode"
The funny thing is: I only spotted this bug in March of this year. Almost one year after the original release. I think I don't parent objects to the camera often. In terms of code I think that I can even think in a more elegant solution. I don't really need to rotate the camera, but simply to calculate its Modelview Matrix. """ m_rasterizer->SetViewMatrix(viewmat, cam->NodeGetWorldOrientation(), cam->NodeGetWorldPosition(), 1.0); cam->SetModelviewMatrix(viewmat); """ The reason why I originally was rotating the camera was to make sure the frustum calculation was using the right camera frustum. For the frustum it takes the camera modelviewmatrix so the rotation really shouldn't be necessary. Leaving as it's for the time being. * Note: the bug was never officially reported
Diffstat (limited to 'source/gameengine/Ketsji/KX_Dome.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index 94258088e9f..44d7827db6a 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -2049,11 +2049,11 @@ void KX_Dome::RenderDomeFrame(KX_Scene* scene, KX_Camera* cam, int i)
m_rasterizer->SetViewMatrix(viewmat, cam->NodeGetWorldOrientation(), cam->NodeGetWorldPosition(), 1.0);
cam->SetModelviewMatrix(viewmat);
- scene->CalculateVisibleMeshes(m_rasterizer,cam);
- scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools);
-
// restore the original orientation
cam->NodeSetLocalOrientation(camori);
cam->NodeUpdateGS(0.f);
+
+ scene->CalculateVisibleMeshes(m_rasterizer,cam);
+ scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools);
}