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>2009-05-10 01:54:22 +0400
committerDalai Felinto <dfelinto@gmail.com>2009-05-10 01:54:22 +0400
commitf155da0039104af88379bb354674e32ef2595960 (patch)
tree7090d9a48b10376d9d11b6879a49d5cd5f275f1c /source/gameengine/Ketsji
parent4a2341fe9a53839c4be685070c41f7b0ea980017 (diff)
BGE Dome: Reducing FBO size to warped meshes.
Commit 20099 started using a FBO way too big. According to Paul Bourke this is how it's done in other Engines: Projectors HD: 1920x1050 - buffersize = 1024; FBO size = 2048 1400x1050 - buffersize = 1024; FBO size = 2048 Projectors XGA: 1024x768 - buffersize = 512; FBO size = 1024 Now in Blender Game Engine we are using: Projectors HD: 1920x1050 - buffersize = 1050; FBO size = 2048 1400x1050 - buffersize = 1050; FBO size = 2048 Projectors XGA: 1024x768 - buffersize = 768; FBO size = 1024 (I guess I should be committing code to the ge_dome branch instead of the trunk. I feel bad doing all those adjustments in a hurry to 2.49 final release in the trunk. That is ok, right?)
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index 429c1b84918..25efe0a59c9 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -251,15 +251,10 @@ http://projects.blender.org/tracker/?func=detail&aid=18655&group_id=9&atid=125
m_imagesize = (1 << i);
if (warp.usemesh){
- // trying to use twice the size of the cube faces
- GLint glMaxTexDim;
- glGetIntegerv(GL_MAX_TEXTURE_SIZE, &glMaxTexDim);
-
- if (2 * m_imagesize > glMaxTexDim)
- warp.imagesize = m_imagesize;
-
- else
- warp.imagesize = 2 * m_imagesize;
+ // warp FBO needs to be up to twice as big as m_buffersize to get more resolution
+ warp.imagesize = m_imagesize;
+ if (m_buffersize == m_imagesize)
+ warp.imagesize *= 2;
//if FBO is not working/supported, we use the canvas dimension as buffer
warp.bufferwidth = canvaswidth;