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); ```
This commit is contained in:
parent
d80febde7d
commit
4b0e25d3af
3 changed files with 32 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue