medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5fc6d316a41d1e1070214ababbc6ba6be556a582
parent aeeb02e1911ba2b1ac3b97d60eccd628576a5b3e
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Sat Aug 20 20:54:31 +0100

Rename NEAR/FAR to NEAR/FAR_PLANE_DEPTH so we can build on win32

Diffstat:
btt.cc | 2+-
game.h | 4++--
shadow_map.cc | 2+-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/btt.cc b/btt.cc @@ -216,7 +216,7 @@ BTTs btt_from_heightmap( const Heightmap * const hm, MemoryArena * const arena ) return roots; } -static const glm::mat4 P( glm::perspective( glm::radians( 120.0f ), ( float ) WIDTH / ( float ) HEIGHT, NEAR, FAR ) ); +static const glm::mat4 P( glm::perspective( glm::radians( 120.0f ), ( float ) WIDTH / ( float ) HEIGHT, NEAR_PLANE_DEPTH, FAR_PLANE_DEPTH ) ); extern "C" GAME_INIT( game_init ) { if( ogl_LoadFunctions() != ogl_LOAD_SUCCEEDED ) { diff --git a/game.h b/game.h @@ -96,8 +96,8 @@ const int WIDTH = 640; const int HEIGHT = 480; -const float NEAR = 0.1f; -const float FAR = 10000.0f; +const float NEAR_PLANE_DEPTH = 0.1f; +const float FAR_PLANE_DEPTH = 10000.0f; struct GameState { glm::vec3 pos; diff --git a/shadow_map.cc b/shadow_map.cc @@ -94,7 +94,7 @@ static void update_camera( } static void camera_to_vp( glm::vec3 position, glm::vec3 angles, glm::mat4 * out_vp ) { - const glm::mat4 P( glm::perspective( glm::radians( 120.0f ), ( float ) WIDTH / ( float ) HEIGHT, NEAR, 100.0f ) ); + const glm::mat4 P( glm::perspective( glm::radians( 120.0f ), ( float ) WIDTH / ( float ) HEIGHT, NEAR_PLANE_DEPTH, 100.0f ) ); *out_vp = glm::translate( glm::rotate(