Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_stroke.c
| Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | static void paint_draw_smooth_cursor(bContext *C, int x, int y, void *customdata) | ||||
| if (stroke && brush) { | if (stroke && brush) { | ||||
| GPU_line_smooth(true); | GPU_line_smooth(true); | ||||
| GPU_blend(GPU_BLEND_ALPHA); | GPU_blend(GPU_BLEND_ALPHA); | ||||
| ARegion *region = stroke->vc.region; | ARegion *region = stroke->vc.region; | ||||
| uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); | ||||
| immUniformColor4ubv(paint->paint_cursor_col); | immUniformColor4ubv(paint->paint_cursor_col); | ||||
| immBegin(GPU_PRIM_LINES, 2); | immBegin(GPU_PRIM_LINES, 2); | ||||
| immVertex2f(pos, x, y); | immVertex2f(pos, x, y); | ||||
| immVertex2f(pos, | immVertex2f(pos, | ||||
| stroke->last_mouse_position[0] + region->winrct.xmin, | stroke->last_mouse_position[0] + region->winrct.xmin, | ||||
| stroke->last_mouse_position[1] + region->winrct.ymin); | stroke->last_mouse_position[1] + region->winrct.ymin); | ||||
| ▲ Show 20 Lines • Show All 1,543 Lines • Show Last 20 Lines | |||||