diff options
| author | KotzaBoss <[email protected]> | 2024-04-23 14:24:37 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-23 14:24:37 +0200 |
| commit | 4b0e25d3af79ce4c5cd94e8279473764d969cca3 (patch) | |
| tree | dc577f402c9f8bd04f201d47243ea6794cf2dd71 /examples | |
| parent | d80febde7de940d74a37a47729a15ad29b40cafb (diff) | |
| download | raylib-4b0e25d3af79ce4c5cd94e8279473764d969cca3.tar.gz raylib-4b0e25d3af79ce4c5cd94e8279473764d969cca3.zip | |
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 <raylib.h>
#include <rlgl.h>
rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, MY_CULL_DISTANCE_FAR);
if (must_reset_clip_planes)
rlSetClipPlanes(RL_CULL_DISTANCE_NEAR, RL_CULL_DISTANCE_FAR);
```
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/models/models_skybox.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
