diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-06 02:33:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-06 02:34:09 +0300 |
commit | 8996e26116f063ce28a9784899fc36d87f31dabe (patch) | |
tree | 5085a8fdfec51ef1c807142859393d963efe10d3 /source/blender/gpu/intern/gpu_batch.c | |
parent | dbd7f36da8ec3ac1c2898aee346beecb86aac8a2 (diff) |
Fix T61196: Mesh select ignores clipping
Select clipping now works when x-ray is disabled.
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c index 66b17fa9704..a095f85d883 100644 --- a/source/blender/gpu/intern/gpu_batch.c +++ b/source/blender/gpu/intern/gpu_batch.c @@ -664,12 +664,23 @@ void GPU_draw_primitive(GPUPrimType prim_type, int v_count) /** \name Utilities * \{ */ -void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id) +void GPU_batch_program_set_shader(GPUBatch *batch, GPUShader *shader) +{ + GPU_batch_program_set(batch, shader->program, shader->interface); +} + +void GPU_batch_program_set_builtin_with_config( + GPUBatch *batch, eGPUBuiltinShader shader_id, eGPUShaderConfig shader_cfg) { - GPUShader *shader = GPU_shader_get_builtin_shader(shader_id); + GPUShader *shader = GPU_shader_get_builtin_shader_with_config(shader_id, shader_cfg); GPU_batch_program_set(batch, shader->program, shader->interface); } +void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id) +{ + GPU_batch_program_set_builtin_with_config(batch, shader_id, GPU_SHADER_CFG_DEFAULT); +} + /** \} */ /* -------------------------------------------------------------------- */ |