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:
authorCampbell Barton <ideasman42@gmail.com>2019-01-24 09:12:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-24 09:12:06 +0300
commit11428e0b7f7aafd3c6fa6b0cd0a77f4c1ff8e48c (patch)
tree95ac27ca3b90c0297296f7251948efbc72af1f71 /source/blender/draw/modes
parent4d29312c66dd56498fbab35e2892944d33484461 (diff)
DRW: use clipping for depth buffer
Object selection now supports clipping.
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r--source/blender/draw/modes/edit_mesh_mode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c
index fcc841f2ff5..7f9e0cb9afc 100644
--- a/source/blender/draw/modes/edit_mesh_mode.c
+++ b/source/blender/draw/modes/edit_mesh_mode.c
@@ -334,7 +334,7 @@ static void EDIT_MESH_engine_init(void *vedata)
.defs = (const char *[]){world_clip_def_or_empty, NULL}});
}
if (!sh_data->depth) {
- sh_data->depth = DRW_shader_create_3D_depth_only();
+ sh_data->depth = DRW_shader_create_3D_depth_only(draw_ctx->shader_slot);
}
if (!sh_data->ghost_clear_depth) {
sh_data->ghost_clear_depth = DRW_shader_create_fullscreen(datatoc_gpu_shader_depth_only_frag_glsl, NULL);
@@ -525,6 +525,9 @@ static void EDIT_MESH_cache_init(void *vedata)
"Depth Pass Hidden Wire",
DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK);
stl->g_data->depth_shgrp_hidden_wire = DRW_shgroup_create(sh_data->depth, psl->depth_hidden_wire);
+ if (rv3d->rflag & RV3D_CLIPPING) {
+ DRW_shgroup_world_clip_planes_from_rv3d(stl->g_data->fweights_shgrp, rv3d);
+ }
}
{