diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-28 23:46:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-29 00:32:25 +0300 |
commit | 68cab3aff63aea95830aa082a160200768d0e826 (patch) | |
tree | 3a042217ce34d84387cdfcca97316597800396db /source/blender/editors | |
parent | a9c297165878b3c427a20f787cc90a6ada4df253 (diff) |
Cleanup: replace attrib w/ attr
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 24 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index dab8dd3d04b..3224acde4bf 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -251,7 +251,7 @@ void UI_draw_roundbox_4fv(bool filled, float minx, float miny, float maxx, float } #if 0 -static void round_box_shade_col(unsigned attrib, const float col1[3], float const col2[3], const float fac) +static void round_box_shade_col(uint attr, const float col1[3], float const col2[3], const float fac) { float col[4] = { fac * col1[0] + (1.0f - fac) * col2[0], @@ -259,7 +259,7 @@ static void round_box_shade_col(unsigned attrib, const float col1[3], float cons fac * col1[2] + (1.0f - fac) * col2[2], 1.0f }; - immAttr4fv(attrib, col); + immAttr4fv(attr, col); } #endif @@ -686,8 +686,8 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, const uiWidgetColors *UN * * \Note This functionn is to be used with the 2D dashed shader enabled. * - * \param pos: is a PRIM_FLOAT, 2, GPU_FETCH_FLOAT vertex attrib - * \param line_origin: is a PRIM_FLOAT, 2, GPU_FETCH_FLOAT vertex attrib + * \param pos: is a PRIM_FLOAT, 2, GPU_FETCH_FLOAT vertex attribute. + * \param line_origin: is a PRIM_FLOAT, 2, GPU_FETCH_FLOAT vertex attribute. * * The next 4 parameters are the offsets for the view, not the zones. */ @@ -733,7 +733,7 @@ static void draw_scope_end(const rctf *rect, GLint *scissor) static void histogram_draw_one( float r, float g, float b, float alpha, float x, float y, float w, float h, const float *data, int res, const bool is_line, - uint pos_attrib) + uint pos_attr) { float color[4] = {r, g, b, alpha}; @@ -753,19 +753,19 @@ static void histogram_draw_one( immBegin(GPU_PRIM_LINE_STRIP, res); for (int i = 0; i < res; i++) { float x2 = x + i * (w / (float)res); - immVertex2f(pos_attrib, x2, y + (data[i] * h)); + immVertex2f(pos_attr, x2, y + (data[i] * h)); } immEnd(); } else { /* under the curve */ immBegin(GPU_PRIM_TRI_STRIP, res * 2); - immVertex2f(pos_attrib, x, y); - immVertex2f(pos_attrib, x, y + (data[0] * h)); + immVertex2f(pos_attr, x, y); + immVertex2f(pos_attr, x, y + (data[0] * h)); for (int i = 1; i < res; i++) { float x2 = x + i * (w / (float)res); - immVertex2f(pos_attrib, x2, y + (data[i] * h)); - immVertex2f(pos_attrib, x2, y); + immVertex2f(pos_attr, x2, y + (data[i] * h)); + immVertex2f(pos_attr, x2, y); } immEnd(); @@ -776,7 +776,7 @@ static void histogram_draw_one( immBegin(GPU_PRIM_LINE_STRIP, res); for (int i = 0; i < res; i++) { float x2 = x + i * (w / (float)res); - immVertex2f(pos_attrib, x2, y + (data[i] * h)); + immVertex2f(pos_attr, x2, y + (data[i] * h)); } immEnd(); } @@ -2078,7 +2078,7 @@ void ui_draw_but_NODESOCKET(ARegion *ar, uiBut *but, const uiWidgetColors *UNUSE * would replace / modify the following 3 functions - merwin */ -static void ui_shadowbox(unsigned pos, unsigned color, float minx, float miny, float maxx, float maxy, float shadsize, uchar alpha) +static void ui_shadowbox(uint pos, uint color, float minx, float miny, float maxx, float maxy, float shadsize, uchar alpha) { /** * <pre> diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 17011c6f28f..7967e94963a 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1134,7 +1134,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) float inverse_diff_mat[4][4]; /* recalculate all strokes - * (all layers are considered without evaluating lock attributtes) */ + * (all layers are considered without evaluating lock attributes) */ for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) { /* calculate difference matrix */ ED_gpencil_parent_location(depsgraph, obact, gpd, gpl, diff_mat); diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 44e29f66ff9..d746bf7a199 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -807,7 +807,7 @@ static void paint_draw_alpha_overlay( * secondary is used for alpha/mask control */ bool col = ELEM(mode, PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D, PAINT_MODE_VERTEX) ? true : false; eOverlayControlFlags flags = BKE_paint_get_overlay_flags(); - gpuPushAttrib(GPU_DEPTH_BUFFER_BIT | GPU_BLEND_BIT); + gpuPushAttr(GPU_DEPTH_BUFFER_BIT | GPU_BLEND_BIT); /* Translate to region. */ GPU_matrix_push(); @@ -832,7 +832,7 @@ static void paint_draw_alpha_overlay( } GPU_matrix_pop(); - gpuPopAttrib(); + gpuPopAttr(); } |