From 4b0e25d3af79ce4c5cd94e8279473764d969cca3 Mon Sep 17 00:00:00 2001 From: KotzaBoss Date: Tue, 23 Apr 2024 14:24:37 +0200 Subject: Add rlCullDistance variables/getters and rlSetClipPlanes function (#3912) The `RL_CULL_DISTANCE_` definition remains as the initial value of the variables. Basic usage can be: ```c #include #include rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, MY_CULL_DISTANCE_FAR); if (must_reset_clip_planes) rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR); ``` --- examples/models/models_skybox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c index 1b8aad9a..e0e08f3a 100644 --- a/examples/models/models_skybox.c +++ b/examples/models/models_skybox.c @@ -208,7 +208,7 @@ static TextureCubemap GenTextureCubemap(Shader shader, Texture2D panorama, int s rlEnableShader(shader.id); // Define projection matrix and send it to shader - Matrix matFboProjection = MatrixPerspective(90.0*DEG2RAD, 1.0, RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR); + Matrix matFboProjection = MatrixPerspective(90.0*DEG2RAD, 1.0, rlGetCullDistanceNear(), rlGetCullDistanceFar()); rlSetUniformMatrix(shader.locs[SHADER_LOC_MATRIX_PROJECTION], matFboProjection); // Define view matrix for every side of the cubemap -- cgit v1.2.3