|
From: Lasse Kärkkäi. <tr...@us...> - 2011-10-22 18:52:42
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Sat Oct 22 21:52:09 2011 +0300
Fix stereo3d anaglyph modes. Apparently the blend mode is messed up by something, so we now set it later.
---
game/video_driver.cc | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 1e8935a..37b8e56 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -239,15 +239,15 @@ void Window::render(boost::function<void (void)> drawFunc) {
}
}
}
+ // Render FBO with 1:1 pixels, properly filtered/positioned for 3d
+ ColorTrans c(colorMatrix);
+ Dimensions dim = Dimensions(double(w) / h).fixedWidth(1.0);
+ dim.center((num == 0 ? 0.25 : -0.25) * dim.h());
if (num == 1) {
// Right eye blends over the left eye
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
}
- // Render FBO with 1:1 pixels, properly filtered/positioned for 3d
- ColorTrans c(colorMatrix);
- Dimensions dim = Dimensions(double(w) / h).fixedWidth(1.0);
- dim.center((num == 0 ? 0.25 : -0.25) * dim.h());
fbo.getTexture().draw(dim, TexCoords(0.0, h, w, 0));
}
glerror.check("FBO->FB postcondition");
|