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>2020-09-18 17:22:39 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-18 20:04:00 +0300
commita0f6da0abc6fefc6a679d8182b673e7c5ad3fdde (patch)
treeeb6acdc71b46347f9823a4481288ef6fb3a71cdf /source/blender/editors/sculpt_paint/paint_cursor.c
parent0335c1fd21dd49906968a2aa85b0016c8047f695 (diff)
Revert "Fix T79523 Paint Cursor: Wide line not supported on OSX"
This commit caused regression on some sculpt paint cursors. A better approach is being worked on. This reverts commit 6ade522f277fb74d4691973b7bb55840300043a2.
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 7379bdde4ab..55abb269660 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1839,28 +1839,22 @@ static void paint_cursor_update_anchored_location(PaintCursorContext *pcontext)
static void paint_cursor_setup_2D_drawing(PaintCursorContext *pcontext)
{
+ GPU_line_width(2.0f);
GPU_blend(GPU_BLEND_ALPHA);
+ GPU_line_smooth(true);
pcontext->pos = GPU_vertformat_attr_add(
immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
-
- float viewport[4];
- GPU_viewport_size_get_f(viewport);
- immBindBuiltinProgram(GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR);
- immUniform2fv("viewportSize", &viewport[2]);
- immUniform1f("lineWidth", 2.0f * U.pixelsize);
+ immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
}
static void paint_cursor_setup_3D_drawing(PaintCursorContext *pcontext)
{
+ GPU_line_width(2.0f);
GPU_blend(GPU_BLEND_ALPHA);
+ GPU_line_smooth(true);
pcontext->pos = GPU_vertformat_attr_add(
immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
-
- float viewport[4];
- GPU_viewport_size_get_f(viewport);
- immBindBuiltinProgram(GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR);
- immUniform2fv("viewportSize", &viewport[2]);
- immUniform1f("lineWidth", 2.0f * U.pixelsize);
+ immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR);
}
static void paint_cursor_restore_drawing_state(void)