Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_drag_drop.c
| Show First 20 Lines • Show All 359 Lines • ▼ Show 20 Lines | if (coords->use_snapping) { | ||||
| ED_draw_sequencer_snap_point(C, coords->snap_point_x); | ED_draw_sequencer_snap_point(C, coords->snap_point_x); | ||||
| } | } | ||||
| /* Init GPU drawing. */ | /* Init GPU drawing. */ | ||||
| GPU_line_width(2.0f); | GPU_line_width(2.0f); | ||||
| GPU_blend(GPU_BLEND_ALPHA); | GPU_blend(GPU_BLEND_ALPHA); | ||||
| GPU_line_smooth(true); | GPU_line_smooth(true); | ||||
| 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); | ||||
| /* Draw strips. The code here is taken from sequencer_draw. */ | /* Draw strips. The code here is taken from sequencer_draw. */ | ||||
| float x1 = coords->start_frame; | float x1 = coords->start_frame; | ||||
| float x2 = coords->start_frame + floorf(strip_len); | float x2 = coords->start_frame + floorf(strip_len); | ||||
| float strip_color[3]; | float strip_color[3]; | ||||
| uchar text_color[4] = {255, 255, 255, 255}; | uchar text_color[4] = {255, 255, 255, 255}; | ||||
| float pixelx = BLI_rctf_size_x(®ion->v2d.cur) / BLI_rcti_size_x(®ion->v2d.mask); | float pixelx = BLI_rctf_size_x(®ion->v2d.cur) / BLI_rcti_size_x(®ion->v2d.mask); | ||||
| float pixely = BLI_rctf_size_y(®ion->v2d.cur) / BLI_rcti_size_y(®ion->v2d.mask); | float pixely = BLI_rctf_size_y(®ion->v2d.cur) / BLI_rcti_size_y(®ion->v2d.mask); | ||||
| ▲ Show 20 Lines • Show All 373 Lines • Show Last 20 Lines | |||||