diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index b555452c63..9795fccc71 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -596,7 +596,7 @@ void RageDisplay::PopMatrix() * When finished, the current position will be the "viewpoint" (at 0,0). negative * Z goes into the screen, positive X and Y is right and down. */ -void RageDisplay::EnterPerspective(float fov, bool preserve_loc) +void RageDisplay::EnterPerspective(float fov, bool preserve_loc, float near_clip, float far_clip) { g_PerspectiveMode++; if(g_PerspectiveMode > 1) { @@ -612,7 +612,7 @@ void RageDisplay::EnterPerspective(float fov, bool preserve_loc) glPushMatrix(); glLoadIdentity(); float aspect = SCREEN_WIDTH/(float)SCREEN_HEIGHT; - gluPerspective(fov, aspect, 1.000f, 1000.0f); // This far clipping this might cause Z-fighting if we ever turn the z-buffer on + gluPerspective(fov, aspect, near_clip, far_clip); /* Flip the Y coordinate, so positive numbers go down. */ glScalef(1, -1, 1); diff --git a/stepmania/src/RageDisplay.h b/stepmania/src/RageDisplay.h index f7f5c7df70..7662489a1f 100644 --- a/stepmania/src/RageDisplay.h +++ b/stepmania/src/RageDisplay.h @@ -79,7 +79,8 @@ public: int GetMaxTextureSize() const; - void EnterPerspective(float fov, bool preserve_loc = true); + // This far clipping this might cause Z-fighting if we ever turn the z-buffer on + void EnterPerspective(float fov, bool preserve_loc = true, float near = 1, float far = 1000); void ExitPerspective(); void LookAt(const RageVector3 &Eye, const RageVector3 &At, const RageVector3 &Up);