Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_operators.c
| Show First 20 Lines • Show All 2,135 Lines • ▼ Show 20 Lines | static void radial_control_paint_cursor(bContext *UNUSED(C), int x, int y, void *customdata) | ||||
| if (rc->col_prop) { | if (rc->col_prop) { | ||||
| RNA_property_float_get_array(&rc->col_ptr, rc->col_prop, col); | RNA_property_float_get_array(&rc->col_ptr, rc->col_prop, col); | ||||
| } | } | ||||
| GPUVertFormat *format = immVertexFormat(); | GPUVertFormat *format = immVertexFormat(); | ||||
| uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | ||||
| immUniformColor3fvAlpha(col, 0.5f); | immUniformThemeColor(TH_PAINT_CURSOR); | ||||
| if (rc->subtype == PROP_ANGLE) { | if (rc->subtype == PROP_ANGLE) { | ||||
| GPU_matrix_push(); | GPU_matrix_push(); | ||||
| /* draw original angle line */ | /* draw original angle line */ | ||||
| GPU_matrix_rotate_3f(RAD2DEGF(rc->initial_value), 0.0f, 0.0f, 1.0f); | GPU_matrix_rotate_3f(RAD2DEGF(rc->initial_value), 0.0f, 0.0f, 1.0f); | ||||
| immBegin(GPU_PRIM_LINES, 2); | immBegin(GPU_PRIM_LINES, 2); | ||||
| immVertex2f(pos, (float)WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE, 0.0f); | immVertex2f(pos, (float)WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE, 0.0f); | ||||
| ▲ Show 20 Lines • Show All 1,546 Lines • Show Last 20 Lines | |||||