diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-19 13:18:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-19 13:18:04 +0300 |
commit | b4d053efc75424fca4b413ac1bc7a7e826fac629 (patch) | |
tree | 80647d9ca9109e997fce9911f202f98d7f8577d4 /source/blender/draw/modes | |
parent | 349946bd010b1112b13c8594aabfb318c330bc0d (diff) |
Gawain API naming refactor
Use consistent prefix for gawain API names as well as
some abbreviations to avoid over-long names, see: D2678
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/edit_curve_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_lattice_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode.c | 8 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_metaball_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_surface_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_text_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 26 | ||||
-rw-r--r-- | source/blender/draw/modes/paint_texture_mode.c | 10 | ||||
-rw-r--r-- | source/blender/draw/modes/paint_vertex_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/paint_weight_mode.c | 2 | ||||
-rw-r--r-- | source/blender/draw/modes/particle_mode.c | 2 |
11 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/draw/modes/edit_curve_mode.c b/source/blender/draw/modes/edit_curve_mode.c index ae3201fa297..dc81725d19a 100644 --- a/source/blender/draw/modes/edit_curve_mode.c +++ b/source/blender/draw/modes/edit_curve_mode.c @@ -222,7 +222,7 @@ static void EDIT_CURVE_cache_populate(void *vedata, Object *ob) if (ob == obedit) { Curve *cu = ob->data; /* Get geometry cache */ - struct Batch *geom; + struct Gwn_Batch *geom; geom = DRW_cache_curve_edge_wire_get(ob); DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); diff --git a/source/blender/draw/modes/edit_lattice_mode.c b/source/blender/draw/modes/edit_lattice_mode.c index 2993719ee1c..b3a20075f0e 100644 --- a/source/blender/draw/modes/edit_lattice_mode.c +++ b/source/blender/draw/modes/edit_lattice_mode.c @@ -194,7 +194,7 @@ static void EDIT_LATTICE_cache_populate(void *vedata, Object *ob) if (ob->type == OB_LATTICE) { if (ob == obedit) { /* Get geometry cache */ - struct Batch *geom; + struct Gwn_Batch *geom; geom = DRW_cache_lattice_wire_get(ob); DRW_shgroup_call_add(stl->g_data->wire_shgrp, geom, ob->obmat); diff --git a/source/blender/draw/modes/edit_mesh_mode.c b/source/blender/draw/modes/edit_mesh_mode.c index 286d277f0e3..c06a2976ac7 100644 --- a/source/blender/draw/modes/edit_mesh_mode.c +++ b/source/blender/draw/modes/edit_mesh_mode.c @@ -381,7 +381,7 @@ static void EDIT_MESH_cache_init(void *vedata) DRW_shgroup_uniform_block(stl->g_data->facefill_occluded_shgrp, "globalsBlock", globals_ubo); /* we need a full screen pass to combine the result */ - struct Batch *quad = DRW_cache_fullscreen_quad_get(); + struct Gwn_Batch *quad = DRW_cache_fullscreen_quad_get(); psl->mix_occlude = DRW_pass_create( "Mix Occluded Wires", @@ -399,7 +399,7 @@ static void edit_mesh_add_ob_to_pass( Scene *scene, Object *ob, DRWShadingGroup *face_shgrp, DRWShadingGroup *ledges_shgrp, DRWShadingGroup *lverts_shgrp, DRWShadingGroup *facedot_shgrp, DRWShadingGroup *facefill_shgrp) { - struct Batch *geo_ovl_tris, *geo_ovl_ledges, *geo_ovl_lverts, *geo_ovl_fcenter; + struct Gwn_Batch *geo_ovl_tris, *geo_ovl_ledges, *geo_ovl_lverts, *geo_ovl_fcenter; ToolSettings *tsettings = scene->toolsettings; DRW_cache_mesh_wire_overlay_get(ob, &geo_ovl_tris, &geo_ovl_ledges, &geo_ovl_lverts); @@ -427,7 +427,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob) View3D *v3d = draw_ctx->v3d; Scene *scene = draw_ctx->scene; Object *obedit = scene->obedit; - struct Batch *geom; + struct Gwn_Batch *geom; if (ob->type == OB_MESH) { if (ob == obedit) { @@ -462,7 +462,7 @@ static void EDIT_MESH_cache_populate(void *vedata, Object *ob) } if (vnormals_do || lnormals_do) { - struct Batch *geo_ovl_tris, *geo_ovl_ledges, *geo_ovl_lverts; + struct Gwn_Batch *geo_ovl_tris, *geo_ovl_ledges, *geo_ovl_lverts; DRW_cache_mesh_normals_overlay_get(ob, &geo_ovl_tris, &geo_ovl_ledges, &geo_ovl_lverts); if (vnormals_do) { diff --git a/source/blender/draw/modes/edit_metaball_mode.c b/source/blender/draw/modes/edit_metaball_mode.c index a5857ba362a..4e9e1cb5b56 100644 --- a/source/blender/draw/modes/edit_metaball_mode.c +++ b/source/blender/draw/modes/edit_metaball_mode.c @@ -178,7 +178,7 @@ static void EDIT_METABALL_cache_populate(void *vedata, Object *ob) if (ob->type == OB_MESH) { /* Get geometry cache */ - struct Batch *geom = DRW_cache_mesh_surface_get(ob); + struct Gwn_Batch *geom = DRW_cache_mesh_surface_get(ob); /* Add geom to a shading group */ DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat); diff --git a/source/blender/draw/modes/edit_surface_mode.c b/source/blender/draw/modes/edit_surface_mode.c index 577b84e38c6..c8dbbd90754 100644 --- a/source/blender/draw/modes/edit_surface_mode.c +++ b/source/blender/draw/modes/edit_surface_mode.c @@ -178,7 +178,7 @@ static void EDIT_SURFACE_cache_populate(void *vedata, Object *ob) if (ob->type == OB_MESH) { /* Get geometry cache */ - struct Batch *geom = DRW_cache_mesh_surface_get(ob); + struct Gwn_Batch *geom = DRW_cache_mesh_surface_get(ob); /* Add geom to a shading group */ DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat); diff --git a/source/blender/draw/modes/edit_text_mode.c b/source/blender/draw/modes/edit_text_mode.c index 13c8015e628..938ab2f3fbc 100644 --- a/source/blender/draw/modes/edit_text_mode.c +++ b/source/blender/draw/modes/edit_text_mode.c @@ -199,7 +199,7 @@ static void EDIT_TEXT_cache_populate(void *vedata, Object *ob) if (ob == obedit) { const Curve *cu = ob->data; /* Get geometry cache */ - struct Batch *geom; + struct Gwn_Batch *geom; if (cu->flag & CU_FAST) { geom = DRW_cache_text_edge_wire_get(ob); diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 3262e863106..f6220a70f9c 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -626,7 +626,7 @@ static void DRW_shgroup_empty_image( image_calc_aspect(ob->data, ob->iuser, empty_image_data->image_aspect); if (tex) { - struct Batch *geom = DRW_cache_image_plane_get(); + struct Gwn_Batch *geom = DRW_cache_image_plane_get(); DRWShadingGroup *grp = DRW_shgroup_instance_create( e_data.object_empty_image_sh, psl->non_meshes, geom); DRW_shgroup_attrib_float(grp, "objectColor", 4); @@ -644,7 +644,7 @@ static void DRW_shgroup_empty_image( } { - struct Batch *geom = DRW_cache_image_plane_wire_get(); + struct Gwn_Batch *geom = DRW_cache_image_plane_wire_get(); DRWShadingGroup *grp = DRW_shgroup_instance_create( e_data.object_empty_image_wire_sh, psl->non_meshes, geom); DRW_shgroup_attrib_float(grp, "color", 3); @@ -708,7 +708,7 @@ static void OBJECT_cache_init(void *vedata) { DRWState state = DRW_STATE_WRITE_COLOR; - struct Batch *quad = DRW_cache_fullscreen_quad_get(); + struct Gwn_Batch *quad = DRW_cache_fullscreen_quad_get(); static float alphaOcclu = 0.35f; static float one = 1.0f; static float alpha1 = 5.0f / 6.0f; @@ -787,7 +787,7 @@ static void OBJECT_cache_init(void *vedata) DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND; psl->outlines_resolve = DRW_pass_create("Outlines Resolve Pass", state); - struct Batch *quad = DRW_cache_fullscreen_quad_get(); + struct Gwn_Batch *quad = DRW_cache_fullscreen_quad_get(); DRWShadingGroup *grp = DRW_shgroup_create(e_data.outline_resolve_sh, psl->outlines_resolve); DRW_shgroup_uniform_buffer(grp, "outlineBluredColor", &e_data.outlines_blur_tx); @@ -799,7 +799,7 @@ static void OBJECT_cache_init(void *vedata) DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_LESS | DRW_STATE_BLEND; psl->grid = DRW_pass_create("Infinite Grid Pass", state); - struct Batch *quad = DRW_cache_fullscreen_quad_get(); + struct Gwn_Batch *quad = DRW_cache_fullscreen_quad_get(); static float mat[4][4]; unit_m4(mat); @@ -850,7 +850,7 @@ static void OBJECT_cache_init(void *vedata) { /* Non Meshes Pass (Camera, empties, lamps ...) */ - struct Batch *geom; + struct Gwn_Batch *geom; DRWState state = DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | @@ -954,7 +954,7 @@ static void OBJECT_cache_init(void *vedata) /* TODO * for now we create multiple times the same VBO with only lamp center coordinates * but ideally we would only create it once */ - struct Batch *geom; + struct Gwn_Batch *geom; /* start with buflimit because we don't want stipples */ geom = DRW_cache_single_line_get(); @@ -1001,7 +1001,7 @@ static void OBJECT_cache_init(void *vedata) { /* -------- STIPPLES ------- */ /* TODO port to shader stipple */ - struct Batch *geom; + struct Gwn_Batch *geom; /* Relationship Lines */ stl->g_data->relationship_lines = shgroup_dynlines_uniform_color(psl->non_meshes, ts.colorWire); @@ -1587,7 +1587,7 @@ static void OBJECT_cache_populate_particles(Object *ob, unit_m4(mat); if (draw_as != PART_DRAW_PATH) { - struct Batch *geom = DRW_cache_particles_get_dots(psys); + struct Gwn_Batch *geom = DRW_cache_particles_get_dots(psys); DRWShadingGroup *shgrp = NULL; static int screen_space[2] = {0, 1}; static float def_prim_col[3] = {0.5f, 0.5f, 0.5f}; @@ -1654,7 +1654,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) if (do_outlines) { Object *obedit = scene->obedit; if (ob != obedit && !((ob == draw_ctx->obact) && (ob->mode & OB_MODE_ALL_PAINT))) { - struct Batch *geom = DRW_cache_object_surface_get(ob); + struct Gwn_Batch *geom = DRW_cache_object_surface_get(ob); if (geom) { theme_id = DRW_object_wire_theme_get(ob, sl, NULL); DRWShadingGroup *shgroup = shgroup_theme_id_to_outline_or(stl, theme_id, NULL); @@ -1672,7 +1672,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) if (me->totpoly == 0) { Object *obedit = scene->obedit; if (ob != obedit) { - struct Batch *geom = DRW_cache_mesh_edges_get(ob); + struct Gwn_Batch *geom = DRW_cache_mesh_edges_get(ob); if (geom) { if (theme_id == TH_UNDEFINED) { theme_id = DRW_object_wire_theme_get(ob, sl, NULL); @@ -1693,7 +1693,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) { Object *obedit = scene->obedit; if (ob != obedit) { - struct Batch *geom = DRW_cache_lattice_wire_get(ob); + struct Gwn_Batch *geom = DRW_cache_lattice_wire_get(ob); if (theme_id == TH_UNDEFINED) { theme_id = DRW_object_wire_theme_get(ob, sl, NULL); } @@ -1708,7 +1708,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob) { Object *obedit = scene->obedit; if (ob != obedit) { - struct Batch *geom = DRW_cache_curve_edge_wire_get(ob); + struct Gwn_Batch *geom = DRW_cache_curve_edge_wire_get(ob); if (theme_id == TH_UNDEFINED) { theme_id = DRW_object_wire_theme_get(ob, sl, NULL); } diff --git a/source/blender/draw/modes/paint_texture_mode.c b/source/blender/draw/modes/paint_texture_mode.c index 9521fb08d34..795b0bae02b 100644 --- a/source/blender/draw/modes/paint_texture_mode.c +++ b/source/blender/draw/modes/paint_texture_mode.c @@ -297,9 +297,9 @@ static void PAINT_TEXTURE_cache_populate(void *vedata, Object *ob) if (me->mloopuv != NULL) { if (use_material_slots) { - struct Batch **geom_array = me->totcol ? DRW_cache_mesh_surface_texpaint_get(ob) : NULL; + struct Gwn_Batch **geom_array = me->totcol ? DRW_cache_mesh_surface_texpaint_get(ob) : NULL; if ((me->totcol == 0) || (geom_array == NULL)) { - struct Batch *geom = DRW_cache_mesh_surface_get(ob); + struct Gwn_Batch *geom = DRW_cache_mesh_surface_get(ob); DRW_shgroup_call_add(stl->g_data->shgroup_fallback, geom, ob->obmat); ok = true; } @@ -316,7 +316,7 @@ static void PAINT_TEXTURE_cache_populate(void *vedata, Object *ob) } } else { - struct Batch *geom = DRW_cache_mesh_surface_texpaint_single_get(ob); + struct Gwn_Batch *geom = DRW_cache_mesh_surface_texpaint_single_get(ob); if (geom && stl->g_data->shgroup_image_array[0]) { DRW_shgroup_call_add(stl->g_data->shgroup_image_array[0], geom, ob->obmat); ok = true; @@ -325,14 +325,14 @@ static void PAINT_TEXTURE_cache_populate(void *vedata, Object *ob) } if (!ok) { - struct Batch *geom = DRW_cache_mesh_surface_get(ob); + struct Gwn_Batch *geom = DRW_cache_mesh_surface_get(ob); DRW_shgroup_call_add(stl->g_data->shgroup_fallback, geom, ob->obmat); } /* Face Mask */ const bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; if (use_face_sel) { - struct Batch *geom; + struct Gwn_Batch *geom; /* Note: ideally selected faces wouldn't show interior wire. */ const bool use_wire = true; geom = DRW_cache_mesh_edges_paint_overlay_get(ob, use_wire, use_face_sel); diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c index f65db8686c0..ac3b82e9418 100644 --- a/source/blender/draw/modes/paint_vertex_mode.c +++ b/source/blender/draw/modes/paint_vertex_mode.c @@ -147,7 +147,7 @@ static void PAINT_VERTEX_cache_populate(void *vedata, Object *ob) bool use_wire = BKE_collection_engine_property_value_get_bool(ces_mode_pw, "use_wire"); const Mesh *me = ob->data; const bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; - struct Batch *geom; + struct Gwn_Batch *geom; world_light = BKE_collection_engine_property_value_get_bool(ces_mode_pw, "use_shading") ? 0.5f : 1.0f; diff --git a/source/blender/draw/modes/paint_weight_mode.c b/source/blender/draw/modes/paint_weight_mode.c index d880d1d9f23..270566b6cc6 100644 --- a/source/blender/draw/modes/paint_weight_mode.c +++ b/source/blender/draw/modes/paint_weight_mode.c @@ -184,7 +184,7 @@ static void PAINT_WEIGHT_cache_populate(void *vedata, Object *ob) const Mesh *me = ob->data; const bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0; const bool use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0; - struct Batch *geom; + struct Gwn_Batch *geom; world_light = BKE_collection_engine_property_value_get_bool(ces_mode_pw, "use_shading") ? 0.5f : 1.0f; diff --git a/source/blender/draw/modes/particle_mode.c b/source/blender/draw/modes/particle_mode.c index 4b63a00d0a5..dd22a5c6d8f 100644 --- a/source/blender/draw/modes/particle_mode.c +++ b/source/blender/draw/modes/particle_mode.c @@ -172,7 +172,7 @@ static void PARTICLE_cache_populate(void *vedata, Object *ob) if (ob->type == OB_MESH) { /* Get geometry cache */ - struct Batch *geom = DRW_cache_mesh_surface_get(ob); + struct Gwn_Batch *geom = DRW_cache_mesh_surface_get(ob); /* Add geom to a shading group */ DRW_shgroup_call_add(stl->g_data->group, geom, ob->obmat); |