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')
-rw-r--r--source/blender/draw/intern/draw_view.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c13
-rw-r--r--source/blender/editors/interface/interface_icons_event.c4
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c5
4 files changed, 14 insertions, 12 deletions
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index cde63e7408b..c578625de05 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -216,7 +216,7 @@ void DRW_draw_cursor(void)
/* Draw nice Anti Aliased cursor. */
GPU_line_width(1.0f);
glEnable(GL_BLEND);
- glEnable(GL_LINE_SMOOTH);
+ GPU_line_smooth(true);
float eps = 1e-5f;
rv3d->viewquat[0] = -rv3d->viewquat[0];
@@ -278,7 +278,7 @@ void DRW_draw_cursor(void)
GPU_batch_draw(cursor_batch);
glDisable(GL_BLEND);
- glDisable(GL_LINE_SMOOTH);
+ GPU_line_smooth(false);
GPU_matrix_pop();
GPU_matrix_projection_set(original_proj);
}
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 39c679e4125..79a92c5a8de 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -75,6 +75,7 @@
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
+#include "GPU_state.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
@@ -1627,7 +1628,7 @@ void ED_gpencil_brush_draw_eraser(Brush *brush, int x, int y)
const uint shdr_pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
- glEnable(GL_LINE_SMOOTH);
+ GPU_line_smooth(true);
glEnable(GL_BLEND);
glBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -1656,7 +1657,7 @@ void ED_gpencil_brush_draw_eraser(Brush *brush, int x, int y)
immUnbindProgram();
glDisable(GL_BLEND);
- glDisable(GL_LINE_SMOOTH);
+ GPU_line_smooth(false);
}
static bool gp_brush_cursor_poll(bContext *C)
@@ -1776,7 +1777,7 @@ static void gp_brush_cursor_draw(bContext *C, int x, int y, void *customdata)
uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
- glEnable(GL_LINE_SMOOTH);
+ GPU_line_smooth(true);
glEnable(GL_BLEND);
/* Inner Ring: Color from UI panel */
@@ -1798,13 +1799,13 @@ static void gp_brush_cursor_draw(bContext *C, int x, int y, void *customdata)
imm_draw_circle_wire_2d(pos, x, y, radius + 1, 40);
glDisable(GL_BLEND);
- glDisable(GL_LINE_SMOOTH);
+ GPU_line_smooth(false);
/* Draw line for lazy mouse */
if ((last_mouse_position) &&
(brush->gpencil_settings->flag & GP_BRUSH_STABILIZE_MOUSE_TEMP))
{
- glEnable(GL_LINE_SMOOTH);
+ GPU_line_smooth(true);
glEnable(GL_BLEND);
copy_v3_v3(color, brush->add_col);
@@ -1819,7 +1820,7 @@ static void gp_brush_cursor_draw(bContext *C, int x, int y, void *customdata)
immEnd();
glDisable(GL_BLEND);
- glDisable(GL_LINE_SMOOTH);
+ GPU_line_smooth(false);
}
immUnbindProgram();
diff --git a/source/blender/editors/interface/interface_icons_event.c b/source/blender/editors/interface/interface_icons_event.c
index e77b47d19e5..8cd60c69b62 100644
--- a/source/blender/editors/interface/interface_icons_event.c
+++ b/source/blender/editors/interface/interface_icons_event.c
@@ -126,7 +126,7 @@ static void icon_draw_rect_input_line_prim(
const int prim,
const char lines[][2], int lines_len)
{
- glEnable(GL_LINE_SMOOTH);
+ GPU_line_smooth(true);
glEnable(GL_BLEND);
BLI_assert(ELEM(prim, GPU_PRIM_LINE_LOOP, GPU_PRIM_LINE_STRIP));
const uint pos_id = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
@@ -144,7 +144,7 @@ static void icon_draw_rect_input_line_prim(
}
immEnd();
immUnbindProgram();
- glDisable(GL_LINE_SMOOTH);
+ GPU_line_smooth(false);
glDisable(GL_BLEND);
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 3db5ff4d848..8221dfdbaae 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -85,6 +85,7 @@
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
+#include "GPU_state.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
@@ -2159,7 +2160,7 @@ static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void
GPU_matrix_translate_2f((float)x, (float)y);
glEnable(GL_BLEND);
- glEnable(GL_LINE_SMOOTH);
+ GPU_line_smooth(true);
/* apply zoom if available */
if (rc->zoom_prop) {
@@ -2220,7 +2221,7 @@ static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void
BLF_disable(fontid, BLF_SHADOW);
glDisable(GL_BLEND);
- glDisable(GL_LINE_SMOOTH);
+ GPU_line_smooth(false);
}