Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_node/node_draw.c')
-rw-r--r--source/blender/editors/space_node/node_draw.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 02adc064f88..d99d1c97653 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -640,8 +640,8 @@ static void node_draw_preview_background(float tile, rctf *rect)
{
float x, y;
- VertexFormat *format = immVertexFormat();
- unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT);
+ Gwn_VertFormat *format = immVertexFormat();
+ unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
@@ -713,7 +713,7 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
glDisable(GL_BLEND);
- unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 2, KEEP_FLOAT);
+ unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformThemeColorShadeAlpha(TH_BACK, -15, +100);
imm_draw_line_box(pos, draw_rect.xmin, draw_rect.ymin, draw_rect.xmax, draw_rect.ymax);
@@ -763,9 +763,9 @@ void node_draw_sockets(View2D *v2d, const bContext *C, bNodeTree *ntree, bNode *
float scale;
UI_view2d_scale_get(v2d, &scale, NULL);
- VertexFormat *format = immVertexFormat();
- unsigned int pos = VertexFormat_add_attrib(format, "pos", COMP_F32, 2, KEEP_FLOAT);
- unsigned int col = VertexFormat_add_attrib(format, "color", COMP_F32, 4, KEEP_FLOAT);
+ Gwn_VertFormat *format = immVertexFormat();
+ unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
+ unsigned int col = GWN_vertformat_attr_add(format, "color", GWN_COMP_F32, 4, GWN_FETCH_FLOAT);
glEnable(GL_BLEND);
GPU_enable_program_point_size();
@@ -780,7 +780,7 @@ void node_draw_sockets(View2D *v2d, const bContext *C, bNodeTree *ntree, bNode *
immUniform1f("outlineWidth", 1.0f);
immUniform4f("outlineColor", 0.0f, 0.0f, 0.0f, 0.6f);
- immBeginAtMost(PRIM_POINTS, total_input_ct + total_output_ct);
+ immBeginAtMost(GWN_PRIM_POINTS, total_input_ct + total_output_ct);
}
/* socket inputs */
@@ -824,7 +824,7 @@ void node_draw_sockets(View2D *v2d, const bContext *C, bNodeTree *ntree, bNode *
immUniform4f("outlineColor", c[0], c[1], c[2], 1.0f);
immUniform1f("outlineWidth", 1.5f);
- immBegin(PRIM_POINTS, selected_input_ct + selected_output_ct);
+ immBegin(GWN_PRIM_POINTS, selected_input_ct + selected_output_ct);
if (selected_input_ct) {
/* socket inputs */
@@ -1096,13 +1096,13 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
}
/* scale widget thing */
- unsigned int pos = VertexFormat_add_attrib(immVertexFormat(), "pos", COMP_F32, 2, KEEP_FLOAT);
+ unsigned int pos = GWN_vertformat_attr_add(immVertexFormat(), "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformThemeColorShade(color_id, -10);
dx = 10.0f;
- immBegin(PRIM_LINES, 4);
+ immBegin(GWN_PRIM_LINES, 4);
immVertex2f(pos, rct->xmax - dx, centy - 4.0f);
immVertex2f(pos, rct->xmax - dx, centy + 4.0f);
@@ -1113,7 +1113,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
immUniformThemeColorShade(color_id, 30);
dx -= snode->aspect;
- immBegin(PRIM_LINES, 4);
+ immBegin(GWN_PRIM_LINES, 4);
immVertex2f(pos, rct->xmax - dx, centy - 4.0f);
immVertex2f(pos, rct->xmax - dx, centy + 4.0f);