Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_clip/clip_utils.c
| Show First 20 Lines • Show All 629 Lines • ▼ Show 20 Lines | void clip_draw_sfra_efra(View2D *v2d, Scene *scene) | ||||
| UI_view2d_view_ortho(v2d); | UI_view2d_view_ortho(v2d); | ||||
| /* currently clip editor supposes that editing clip length is equal to scene frame range */ | /* currently clip editor supposes that editing clip length is equal to scene frame range */ | ||||
| GPU_blend(GPU_BLEND_ALPHA); | GPU_blend(GPU_BLEND_ALPHA); | ||||
| 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_2D_UNIFORM_COLOR); | ||||
| immUniformColor4f(0.0f, 0.0f, 0.0f, 0.4f); | immUniformThemeColor(TH_TIME_RANGE); | ||||
| immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax); | immRectf(pos, v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax); | ||||
| immRectf(pos, (float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); | immRectf(pos, (float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); | ||||
| GPU_blend(GPU_BLEND_NONE); | GPU_blend(GPU_BLEND_NONE); | ||||
| immUniformThemeColorShade(TH_BACK, -60); | immUniformThemeColor3(TH_TIME_RANGE); | ||||
| /* thin lines where the actual frames are */ | /* thin lines where the actual frames are */ | ||||
| GPU_line_width(1.0f); | GPU_line_width(1.0f); | ||||
| immBegin(GPU_PRIM_LINES, 4); | immBegin(GPU_PRIM_LINES, 4); | ||||
| immVertex2f(pos, (float)SFRA, v2d->cur.ymin); | immVertex2f(pos, (float)SFRA, v2d->cur.ymin); | ||||
| immVertex2f(pos, (float)SFRA, v2d->cur.ymax); | immVertex2f(pos, (float)SFRA, v2d->cur.ymax); | ||||
| immVertex2f(pos, (float)EFRA, v2d->cur.ymin); | immVertex2f(pos, (float)EFRA, v2d->cur.ymin); | ||||
| immVertex2f(pos, (float)EFRA, v2d->cur.ymax); | immVertex2f(pos, (float)EFRA, v2d->cur.ymax); | ||||
| immEnd(); | immEnd(); | ||||
| immUnbindProgram(); | immUnbindProgram(); | ||||
| } | } | ||||