|
From: Tapio V. <aa...@us...> - 2009-11-08 08:30:28
|
Module: performous
Branch: dance
Commit: 0fc816ebb2f2907d4262396e8b4c6c3734cce61f
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Oct 29 14:20:54 2009 +0100
Removed Boost "type qualifiers ignored on function return type" warnings
---
game/CMakeLists.txt | 2 +-
game/video_driver.cc | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 20b0f94..a64bcf6 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -30,7 +30,7 @@ endif(PortMidi_FOUND)
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "GCC detected, adding compile flags")
# -pedantic cannot be used because ffmpeg headers are b0rked
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++98 -Wall -Wextra")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++98 -Wall -Wextra -Wno-ignored-qualifiers")
# Needed for ffmpeg.cc to compile cleanly on OSX (it's a (unsigned long) long story)
add_definitions("-D__STDC_CONSTANT_MACROS")
endif(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/game/video_driver.cc b/game/video_driver.cc
index 3f53f5a..dcb0f5a 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -96,7 +96,8 @@ void Window::resize() {
// Set model-view matrix
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- glFrustum(-0.5f, 0.5f, 0.5f * h, -0.5f * h, near, far);
+ 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
}
|