Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_draw.c
| Show First 20 Lines • Show All 2,080 Lines • ▼ Show 20 Lines | void draw_timeline_seq(const bContext *C, ARegion *ar) | ||||
| /* overlap playhead */ | /* overlap playhead */ | ||||
| if (scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) { | if (scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) { | ||||
| int cfra_over = (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS) ? | int cfra_over = (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS) ? | ||||
| scene->ed->over_cfra : | scene->ed->over_cfra : | ||||
| scene->r.cfra + scene->ed->over_ofs; | scene->r.cfra + scene->ed->over_ofs; | ||||
| 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_3D_LINE_DASHED_UNIFORM_COLOR); | immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); | ||||
| float viewport_size[4]; | |||||
| GPU_viewport_size_get_f(viewport_size); | |||||
| immUniform2f("viewport_size", viewport_size[2], viewport_size[3]); | |||||
| immUniform1f("dash_width", 20.0f * U.pixelsize); | immUniform1f("dash_width", 20.0f * U.pixelsize); | ||||
| immUniform1f("dash_factor", 0.5f); | immUniform1f("dash_factor", 0.5f); | ||||
| immUniformThemeColor(TH_CFRAME); | immUniformThemeColor(TH_CFRAME); | ||||
| immBegin(GPU_PRIM_LINES, 2); | immBegin(GPU_PRIM_LINES, 2); | ||||
| immVertex2f(pos, cfra_over, v2d->cur.ymin); | immVertex2f(pos, cfra_over, v2d->cur.ymin); | ||||
| immVertex2f(pos, cfra_over, v2d->cur.ymax); | immVertex2f(pos, cfra_over, v2d->cur.ymax); | ||||
| immEnd(); | immEnd(); | ||||
| Show All 29 Lines | |||||