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:
authorClément Foucault <foucault.clem@gmail.com>2019-03-25 22:26:52 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-25 22:26:52 +0300
commitc602ec74fdd20c17c9ca9c7eb59c048443efc2ce (patch)
treeaf55cc2a2da7c385db5a42735e2bbbdea7953e1f /source/blender/windowmanager/intern/wm_gesture.c
parentc41e8b8f6f38b9f5a037e11b83b49c4481256716 (diff)
GPU: State: Replace GL_BLEND by GPU_blend
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index c9853776902..013ee029200 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -197,7 +197,7 @@ static void wm_gesture_draw_rect(wmGesture *gt)
uint shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT);
- glEnable(GL_BLEND);
+ GPU_blend(true);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4f(1.0f, 1.0f, 1.0f, 0.05f);
@@ -206,7 +206,7 @@ static void wm_gesture_draw_rect(wmGesture *gt)
immUnbindProgram();
- glDisable(GL_BLEND);
+ GPU_blend(false);
shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
@@ -231,7 +231,7 @@ static void wm_gesture_draw_circle(wmGesture *gt)
{
rcti *rect = (rcti *)gt->customdata;
- glEnable(GL_BLEND);
+ GPU_blend(true);
const uint shdr_pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
@@ -242,7 +242,7 @@ static void wm_gesture_draw_circle(wmGesture *gt)
immUnbindProgram();
- glDisable(GL_BLEND);
+ GPU_blend(false);
immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR);
@@ -304,7 +304,7 @@ static void draw_filled_lasso(wmGesture *gt)
draw_filled_lasso_px_cb, &lasso_fill_data);
/* Additive Blending */
- glEnable(GL_BLEND);
+ GPU_blend(true);
glBlendFunc(GL_ONE, GL_ONE);
GLint unpack_alignment;
@@ -324,7 +324,7 @@ static void draw_filled_lasso(wmGesture *gt)
MEM_freeN(pixel_buf);
- glDisable(GL_BLEND);
+ GPU_blend(false);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}