Cleanup: replace attrib w/ attr

Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
This commit is contained in:
2019-01-29 07:46:25 +11:00
parent a9c2971658
commit 68cab3aff6
76 changed files with 667 additions and 629 deletions

View File

@@ -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>