make sure zFar is at least 64 units to avoid feeding a bogus value to glFrustum
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 2 Sep 2002 06:46:43 +0000 (06:46 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 2 Sep 2002 06:46:43 +0000 (06:46 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2326 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c

index dec7eeb..05ebc12 100644 (file)
@@ -308,6 +308,8 @@ static void GL_SetupFrame (void)
        // depth range
        zNear = 1.0;
        zFar = r_mesh_farclip;
+       if (zFar < 64)
+               zFar = 64;
 
        // fov angles
        fovx = r_refdef.fov_x;