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?)
This commit is contained in:
Dalai Felinto
2009-05-09 21:54:22 +00:00
parent 4a2341fe9a
commit f155da0039

View File

@@ -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;