|
From: Lasse Kärkkäi. <tr...@us...> - 2011-01-24 02:33:42
|
Module: performous
Branch: stereo3d
Commit: c18e8012f5c2f51334e1f7c99bbc1138ccc3743c
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jan 21 23:55:57 2011 +0100
Revert "Lyric text rendering in 3D instead of zoom (BUGGY HACK)"
This reverts commit 733eb048a4cd472d2d60a687c0f4bcf2b7893773.
---
game/opengl_text.cc | 7 +------
game/video_driver.cc | 2 +-
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/game/opengl_text.cc b/game/opengl_text.cc
index f2c95d0..098f022 100644
--- a/game/opengl_text.cc
+++ b/game/opengl_text.cc
@@ -244,17 +244,12 @@ void SvgTxtTheme::draw(std::vector<TZoomText> const& _text, float alpha) {
TexCoords tex;
double factor = _text[i].factor;
Color color;
- glutil::PushMatrix pm;
if (factor == 1.0) color = Color(1.0f, 1.0f, 1.0f, alpha);
else {
color = Color(m_text_highlight.fill_col.r, m_text_highlight.fill_col.g, m_text_highlight.fill_col.b, alpha);
- glTranslatef(0.0f, 0.0f, factor - 1.0f);
+ dim.fixedWidth(dim.w() * factor);
}
{
- glutil::PushMatrixMode ppm(GL_PROJECTION);
- glTranslatef(2.0f * dim.xc(), -4.0f * dim.yc(), 0.0f);
- dim.middle(0.0f).center(0.0f);
- glutil::PushMatrixMode(GL_MODELVIEW);
glutil::Color c(color);
m_opengl_text[i].draw(dim, tex);
}
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 187e405..c501639 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -147,7 +147,7 @@ void Window::resize() {
// Set model-view matrix
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- const float f = 0.8f; // Add some margin in front of nearplane (needed for 3D effects and OSX to avoid clipping)
+ const float f = 0.9f; // Avoid texture surface being exactly at the near plane (MacOSX fix)
glFrustum(-0.5f * f, 0.5f * f, 0.5f * h * f, -0.5f * h * f, f * near_, far_);
glTranslatef(0.0f, 0.0f, -near_); // So that z = 0.0f is still on monitor surface
// Check for OpenGL errors
|