diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-04-15 07:07:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-04-15 07:07:57 +0300 |
commit | 608b711beb3cd094987e7ba9da3a06a7ba086030 (patch) | |
tree | a81e48db15e0b5bc93ad573d439a804378e77870 /source/blender/draw/modes | |
parent | 49fc9cff3b90f993122e778bec24763679ffb1d8 (diff) |
Cleanup: explicit names for return arguments and position last
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index b75dd5ae96d..5289d61661e 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -227,9 +227,9 @@ static void EDIT_MESH_engine_init(void *vedata) } static DRWPass *edit_mesh_create_overlay_pass( - DRWShadingGroup **face_shgrp, DRWShadingGroup **ledges_shgrp, - DRWShadingGroup **lverts_shgrp, DRWShadingGroup **facedot_shgrp, - float *faceAlpha, DRWState statemod) + float *faceAlpha, DRWState statemod, + DRWShadingGroup **r_face_shgrp, DRWShadingGroup **r_ledges_shgrp, + DRWShadingGroup **r_lverts_shgrp, DRWShadingGroup **r_facedot_shgrp) { static struct GPUShader *tri_sh, *ledge_sh; const struct bContext *C = DRW_get_context(); @@ -258,21 +258,21 @@ static DRWPass *edit_mesh_create_overlay_pass( "Edit Mesh Face Overlay Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_POINT | statemod); - *face_shgrp = DRW_shgroup_create(tri_sh, pass); - DRW_shgroup_uniform_block(*face_shgrp, "globalsBlock", globals_ubo, 0); - DRW_shgroup_uniform_vec2(*face_shgrp, "viewportSize", DRW_viewport_size_get(), 1); - DRW_shgroup_uniform_float(*face_shgrp, "faceAlphaMod", faceAlpha, 1); + *r_face_shgrp = DRW_shgroup_create(tri_sh, pass); + DRW_shgroup_uniform_block(*r_face_shgrp, "globalsBlock", globals_ubo, 0); + DRW_shgroup_uniform_vec2(*r_face_shgrp, "viewportSize", DRW_viewport_size_get(), 1); + DRW_shgroup_uniform_float(*r_face_shgrp, "faceAlphaMod", faceAlpha, 1); - *ledges_shgrp = DRW_shgroup_create(ledge_sh, pass); - DRW_shgroup_uniform_vec2(*ledges_shgrp, "viewportSize", DRW_viewport_size_get(), 1); + *r_ledges_shgrp = DRW_shgroup_create(ledge_sh, pass); + DRW_shgroup_uniform_vec2(*r_ledges_shgrp, "viewportSize", DRW_viewport_size_get(), 1); if ((tsettings->selectmode & (SCE_SELECT_VERTEX)) != 0) { - *lverts_shgrp = DRW_shgroup_create(e_data.overlay_vert_sh, pass); - DRW_shgroup_uniform_vec2(*lverts_shgrp, "viewportSize", DRW_viewport_size_get(), 1); + *r_lverts_shgrp = DRW_shgroup_create(e_data.overlay_vert_sh, pass); + DRW_shgroup_uniform_vec2(*r_lverts_shgrp, "viewportSize", DRW_viewport_size_get(), 1); } if ((tsettings->selectmode & (SCE_SELECT_FACE)) != 0) { - *facedot_shgrp = DRW_shgroup_create(e_data.overlay_facedot_sh, pass); + *r_facedot_shgrp = DRW_shgroup_create(e_data.overlay_facedot_sh, pass); } return pass; @@ -330,16 +330,16 @@ static void EDIT_MESH_cache_init(void *vedata) if (!do_zbufclip) { psl->edit_face_overlay = edit_mesh_create_overlay_pass( + &face_mod, DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_DEPTH | DRW_STATE_BLEND, &stl->g_data->face_overlay_shgrp, &stl->g_data->ledges_overlay_shgrp, - &stl->g_data->lverts_overlay_shgrp, &stl->g_data->facedot_overlay_shgrp, &face_mod, - DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_DEPTH | DRW_STATE_BLEND); + &stl->g_data->lverts_overlay_shgrp, &stl->g_data->facedot_overlay_shgrp); } else { /* We render all wires with depth and opaque to a new fbo and blend the result based on depth values */ psl->edit_face_occluded = edit_mesh_create_overlay_pass( + &zero, DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_DEPTH, &stl->g_data->face_occluded_shgrp, &stl->g_data->ledges_occluded_shgrp, - &stl->g_data->lverts_occluded_shgrp, &stl->g_data->facedot_occluded_shgrp, &zero, - DRW_STATE_DEPTH_LESS | DRW_STATE_WRITE_DEPTH); + &stl->g_data->lverts_occluded_shgrp, &stl->g_data->facedot_occluded_shgrp); /* however we loose the front faces value (because we need the depth of occluded wires and * faces are alpha blended ) so we recover them in a new pass. */ |