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 6ade522f27
.
This commit is contained in:
parent
0335c1fd21
commit
a0f6da0abc
Notes:
blender-bot
2023-02-13 21:36:09 +01:00
Referenced by issue #81215, Crosshair cursor is too small when sculpting on 4k resolution. Referenced by issue #79523, Weight Paint hard to see red circle too thinner
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue