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.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 9a61d757ef5..5553928b012 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -691,13 +691,13 @@ static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node)
{
bNodeLink *link;
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
for (link = node->internal_links.first; link; link = link->next) {
node_draw_link_bezier(v2d, snode, link, TH_REDALERT, TH_REDALERT, -1);
}
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* flags used in gpu_shader_keyframe_diamond_frag.glsl */
@@ -836,7 +836,7 @@ void ED_node_socket_draw(bNodeSocket *sock, const rcti *rect, const float color[
format, "outlineColor", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
gpuPushAttr(GPU_BLEND_BIT);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
GPU_program_point_size(true);
immBindBuiltinProgram(GPU_SHADER_KEYFRAME_DIAMOND);
@@ -909,9 +909,9 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
node_draw_preview_background(BLI_rctf_size_x(prv) / 10.0f, &draw_rect);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
/* premul graphics */
- GPU_blend_set_func_separate(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
IMMDrawPixelsTexState state = immDrawPixelsTexSetup(GPU_SHADER_2D_IMAGE_COLOR);
immDrawPixelsTex(&state,
@@ -926,7 +926,7 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
scale,
NULL);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
@@ -981,7 +981,7 @@ void node_draw_sockets(View2D *v2d,
uint outline_col_id = GPU_vertformat_attr_add(
format, "outlineColor", GPU_COMP_F32, 4, GPU_FETCH_FLOAT);
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
GPU_program_point_size(true);
immBindBuiltinProgram(GPU_SHADER_KEYFRAME_DIAMOND);
immUniform1f("outline_scale", 0.7f);
@@ -1115,7 +1115,7 @@ void node_draw_sockets(View2D *v2d,
immUnbindProgram();
GPU_program_point_size(false);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
static void node_draw_basis(const bContext *C,
@@ -1391,7 +1391,7 @@ static void node_draw_hidden(const bContext *C,
/* custom color inline */
if (node->flag & NODE_CUSTOM_COLOR) {
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
GPU_line_smooth(true);
UI_draw_roundbox_3fv_alpha(false,
@@ -1404,7 +1404,7 @@ static void node_draw_hidden(const bContext *C,
1.0f);
GPU_line_smooth(false);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
}
/* title */
@@ -1638,7 +1638,7 @@ void node_draw_nodetree(const bContext *C,
}
/* node lines */
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
nodelink_batch_start(snode);
for (link = ntree->links.first; link; link = link->next) {
if (!nodeLinkIsHidden(link)) {
@@ -1646,7 +1646,7 @@ void node_draw_nodetree(const bContext *C,
}
}
nodelink_batch_end(snode);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
/* draw foreground nodes, last nodes in front */
for (a = 0, node = ntree->nodes.first; node; node = node->next, a++) {
@@ -1707,12 +1707,12 @@ static void draw_group_overlay(const bContext *C, ARegion *region)
float color[4];
/* shade node groups to separate them visually */
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
UI_GetThemeColorShadeAlpha4fv(TH_NODE_GROUP, 0, 0, color);
UI_draw_roundbox_corner_set(UI_CNR_NONE);
UI_draw_roundbox_4fv(true, rect.xmin, rect.ymin, rect.xmax, rect.ymax, 0, color);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
/* set the block bounds to clip mouse events from underlying nodes */
block = UI_block_begin(C, region, "node tree bounds block", UI_EMBOSS);
@@ -1751,7 +1751,7 @@ void drawnodespace(const bContext *C, ARegion *region)
ED_region_draw_cb_draw(C, region, REGION_DRAW_PRE_VIEW);
/* only set once */
- GPU_blend_set_func_separate(GPU_BLEND_ALPHA);
+ GPU_blend(GPU_BLEND_ALPHA);
/* nodes */
snode_set_context(C);
@@ -1837,7 +1837,7 @@ void drawnodespace(const bContext *C, ARegion *region)
}
/* temporary links */
- GPU_blend(true);
+ GPU_blend(GPU_BLEND_ALPHA);
GPU_line_smooth(true);
for (nldrag = snode->linkdrag.first; nldrag; nldrag = nldrag->next) {
for (linkdata = nldrag->links.first; linkdata; linkdata = linkdata->next) {
@@ -1845,7 +1845,7 @@ void drawnodespace(const bContext *C, ARegion *region)
}
}
GPU_line_smooth(false);
- GPU_blend(false);
+ GPU_blend(GPU_BLEND_NONE);
if (snode->flag & SNODE_SHOW_GPENCIL) {
/* draw grease-pencil ('canvas' strokes) */