@@ -992,18 +992,18 @@ void BeginMode3D(Camera camera)
992
992
if (camera .projection == CAMERA_PERSPECTIVE )
993
993
{
994
994
// Setup perspective projection
995
- double top = RL_CULL_DISTANCE_NEAR * tan (camera .fovy * 0.5 * DEG2RAD );
995
+ double top = rlGetCullDistanceNear () * tan (camera .fovy * 0.5 * DEG2RAD );
996
996
double right = top * aspect ;
997
997
998
- rlFrustum (- right , right , - top , top , RL_CULL_DISTANCE_NEAR , RL_CULL_DISTANCE_FAR );
998
+ rlFrustum (- right , right , - top , top , rlGetCullDistanceNear (), rlGetCullDistanceFar () );
999
999
}
1000
1000
else if (camera .projection == CAMERA_ORTHOGRAPHIC )
1001
1001
{
1002
1002
// Setup orthographic projection
1003
1003
double top = camera .fovy /2.0 ;
1004
1004
double right = top * aspect ;
1005
1005
1006
- rlOrtho (- right , right , - top ,top , RL_CULL_DISTANCE_NEAR , RL_CULL_DISTANCE_FAR );
1006
+ rlOrtho (- right , right , - top ,top , rlGetCullDistanceNear (), rlGetCullDistanceFar () );
1007
1007
}
1008
1008
1009
1009
rlMatrixMode (RL_MODELVIEW ); // Switch back to modelview matrix
@@ -1207,7 +1207,7 @@ VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device)
1207
1207
1208
1208
// Compute camera projection matrices
1209
1209
float projOffset = 4.0f * lensShift ; // Scaled to projection space coordinates [-1..1]
1210
- Matrix proj = MatrixPerspective (fovy , aspect , RL_CULL_DISTANCE_NEAR , RL_CULL_DISTANCE_FAR );
1210
+ Matrix proj = MatrixPerspective (fovy , aspect , rlGetCullDistanceNear (), rlGetCullDistanceFar () );
1211
1211
1212
1212
config .projection [0 ] = MatrixMultiply (proj , MatrixTranslate (projOffset , 0.0f , 0.0f ));
1213
1213
config .projection [1 ] = MatrixMultiply (proj , MatrixTranslate (- projOffset , 0.0f , 0.0f ));
@@ -1446,7 +1446,7 @@ Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height
1446
1446
if (camera .projection == CAMERA_PERSPECTIVE )
1447
1447
{
1448
1448
// Calculate projection matrix from perspective
1449
- matProj = MatrixPerspective (camera .fovy * DEG2RAD , ((double )width /(double )height ), RL_CULL_DISTANCE_NEAR , RL_CULL_DISTANCE_FAR );
1449
+ matProj = MatrixPerspective (camera .fovy * DEG2RAD , ((double )width /(double )height ), rlGetCullDistanceNear (), rlGetCullDistanceFar () );
1450
1450
}
1451
1451
else if (camera .projection == CAMERA_ORTHOGRAPHIC )
1452
1452
{
@@ -1533,7 +1533,7 @@ Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int heigh
1533
1533
if (camera .projection == CAMERA_PERSPECTIVE )
1534
1534
{
1535
1535
// Calculate projection matrix from perspective
1536
- matProj = MatrixPerspective (camera .fovy * DEG2RAD , ((double )width /(double )height ), RL_CULL_DISTANCE_NEAR , RL_CULL_DISTANCE_FAR );
1536
+ matProj = MatrixPerspective (camera .fovy * DEG2RAD , ((double )width /(double )height ), rlGetCullDistanceNear (), rlGetCullDistanceFar () );
1537
1537
}
1538
1538
else if (camera .projection == CAMERA_ORTHOGRAPHIC )
1539
1539
{
@@ -1542,7 +1542,7 @@ Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int heigh
1542
1542
double right = top * aspect ;
1543
1543
1544
1544
// Calculate projection matrix from orthographic
1545
- matProj = MatrixOrtho (- right , right , - top , top , RL_CULL_DISTANCE_NEAR , RL_CULL_DISTANCE_FAR );
1545
+ matProj = MatrixOrtho (- right , right , - top , top , rlGetCullDistanceNear (), rlGetCullDistanceFar () );
1546
1546
}
1547
1547
1548
1548
// Calculate view matrix from camera look at (and transpose it)
0 commit comments