Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_clip/clip_graph_draw.c
| Show First 20 Lines • Show All 333 Lines • ▼ Show 20 Lines | if (lines) { | ||||
| immEnd(); | immEnd(); | ||||
| } | } | ||||
| } | } | ||||
| void clip_draw_graph(SpaceClip *sc, ARegion *ar, Scene *scene) | void clip_draw_graph(SpaceClip *sc, ARegion *ar, Scene *scene) | ||||
| { | { | ||||
| MovieClip *clip = ED_space_clip_get_clip(sc); | MovieClip *clip = ED_space_clip_get_clip(sc); | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| View2DGrid *grid; | |||||
| short unitx = V2D_UNIT_FRAMESCALE, unity = V2D_UNIT_VALUES; | |||||
| /* grid */ | /* grid */ | ||||
| grid = UI_view2d_grid_calc( | UI_view2d_draw_lines_x__values(v2d); | ||||
| scene, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy); | UI_view2d_draw_lines_y__values(v2d); | ||||
| UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL); | |||||
| UI_view2d_grid_free(grid); | |||||
| if (clip) { | if (clip) { | ||||
| 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); | ||||
| GPU_point_size(3.0f); | GPU_point_size(3.0f); | ||||
| if (sc->flag & SC_SHOW_GRAPH_TRACKS_MOTION) { | if (sc->flag & SC_SHOW_GRAPH_TRACKS_MOTION) { | ||||
| Show All 17 Lines | |||||