GPU: State: Replace GL_LINE_SMOOTH by GPU_line_smooth
This commit is contained in:
parent
53cd37d510
commit
72c323d50c
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue