Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2019-05-26 21:36:24 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-27 13:58:14 +0300
commit577d3498b4d4d3b747e184550378bc7d77e72b60 (patch)
treed3949589a95436afc9bf99d8d1d953dd3e6cdcad /source/blender/draw/engines/basic/basic_engine.c
parentba75e93c8882df10d2027aa1ffa0347337b54160 (diff)
Cleanup: DRW: Move WorldClipPlanes to builtin uniform
Diffstat (limited to 'source/blender/draw/engines/basic/basic_engine.c')
-rw-r--r--source/blender/draw/engines/basic/basic_engine.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/draw/engines/basic/basic_engine.c b/source/blender/draw/engines/basic/basic_engine.c
index d6902dddc61..a274eda84fe 100644
--- a/source/blender/draw/engines/basic/basic_engine.c
+++ b/source/blender/draw/engines/basic/basic_engine.c
@@ -94,7 +94,6 @@ static void basic_cache_init(void *vedata)
const DRWContextState *draw_ctx = DRW_context_state_get();
BASIC_Shaders *sh_data = &e_data.sh_data[draw_ctx->sh_cfg];
- const RegionView3D *rv3d = draw_ctx->rv3d;
if (!stl->g_data) {
/* Alloc transient pointers */
@@ -106,7 +105,7 @@ static void basic_cache_init(void *vedata)
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL);
stl->g_data->depth_shgrp = DRW_shgroup_create(sh_data->depth, psl->depth_pass);
if (draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) {
- DRW_shgroup_world_clip_planes_from_rv3d(stl->g_data->depth_shgrp, rv3d);
+ DRW_shgroup_state_enable(stl->g_data->depth_shgrp, DRW_STATE_CLIP_PLANES);
}
psl->depth_pass_cull = DRW_pass_create("Depth Pass Cull",
@@ -114,7 +113,7 @@ static void basic_cache_init(void *vedata)
DRW_STATE_CULL_BACK);
stl->g_data->depth_shgrp_cull = DRW_shgroup_create(sh_data->depth, psl->depth_pass_cull);
if (draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) {
- DRW_shgroup_world_clip_planes_from_rv3d(stl->g_data->depth_shgrp_cull, rv3d);
+ DRW_shgroup_state_enable(stl->g_data->depth_shgrp_cull, DRW_STATE_CLIP_PLANES);
}
}
}