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/interface | |
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/interface')
-rw-r--r-- | source/blender/editors/interface/interface_draw.c | 24 |
1 files changed, 12 insertions, 12 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> |