diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-10 03:02:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-10 03:02:06 +0300 |
commit | 16d7967c2b404cbe6719192e073c7685376f6ab1 (patch) | |
tree | 67cce46fa7b7fafccf7a7ddc9ed450f0afd18e2e /source/blender/editors/space_view3d/drawobject.c | |
parent | 66c23ea2b4a4eb66490a8b9b6c57ed60ec934a42 (diff) |
Cleanup: use shorter name for shader config
The struct name is descriptive,
this isn't going to be confused with other variables.
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 2ece5358bc0..f48eefdc399 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -193,8 +193,8 @@ static void bbs_mesh_verts(GPUBatch *batch, int offset, const float world_clip_p { GPU_point_size(UI_GetThemeValuef(TH_VERTEX_SIZE)); - const eGPUShaderConfig shader_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; - GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_FLAT_SELECT_ID, shader_cfg); + const eGPUShaderConfig sh_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; + GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_FLAT_SELECT_ID, sh_cfg); GPU_batch_uniform_1ui(batch, "offset", offset); if (world_clip_planes != NULL) { bbs_world_clip_planes_from_rv3d(batch, world_clip_planes); @@ -207,8 +207,8 @@ static void bbs_mesh_wire(GPUBatch *batch, int offset, const float world_clip_pl GPU_line_width(1.0f); glProvokingVertex(GL_FIRST_VERTEX_CONVENTION); - const eGPUShaderConfig shader_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; - GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_FLAT_SELECT_ID, shader_cfg); + const eGPUShaderConfig sh_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; + GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_FLAT_SELECT_ID, sh_cfg); GPU_batch_uniform_1ui(batch, "offset", offset); if (world_clip_planes != NULL) { bbs_world_clip_planes_from_rv3d(batch, world_clip_planes); @@ -222,8 +222,8 @@ static void bbs_mesh_wire(GPUBatch *batch, int offset, const float world_clip_pl static void bbs_mesh_face(GPUBatch *batch, const bool use_select, const float world_clip_planes[6][4]) { if (use_select) { - const eGPUShaderConfig shader_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; - GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_FLAT_SELECT_ID, shader_cfg); + const eGPUShaderConfig sh_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; + GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_FLAT_SELECT_ID, sh_cfg); GPU_batch_uniform_1ui(batch, "offset", 1); if (world_clip_planes != NULL) { bbs_world_clip_planes_from_rv3d(batch, world_clip_planes); @@ -231,8 +231,8 @@ static void bbs_mesh_face(GPUBatch *batch, const bool use_select, const float wo GPU_batch_draw(batch); } else { - const eGPUShaderConfig shader_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; - GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_UNIFORM_SELECT_ID, shader_cfg); + const eGPUShaderConfig sh_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; + GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_UNIFORM_SELECT_ID, sh_cfg); GPU_batch_uniform_1ui(batch, "id", 0); if (world_clip_planes != NULL) { bbs_world_clip_planes_from_rv3d(batch, world_clip_planes); @@ -243,8 +243,8 @@ static void bbs_mesh_face(GPUBatch *batch, const bool use_select, const float wo static void bbs_mesh_face_dot(GPUBatch *batch, const float world_clip_planes[6][4]) { - const eGPUShaderConfig shader_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; - GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_FLAT_SELECT_ID, shader_cfg); + const eGPUShaderConfig sh_cfg = world_clip_planes ? GPU_SHADER_CFG_CLIPPED : GPU_SHADER_CFG_DEFAULT; + GPU_batch_program_set_builtin_with_config(batch, GPU_SHADER_3D_FLAT_SELECT_ID, sh_cfg); GPU_batch_uniform_1ui(batch, "offset", 1); if (world_clip_planes != NULL) { bbs_world_clip_planes_from_rv3d(batch, world_clip_planes); |