Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_clip/clip_utils.c
| Context not available. | |||||
| #include "UI_view2d.h" | #include "UI_view2d.h" | ||||
| #include "clip_intern.h" // own include | #include "clip_intern.h" // own include | ||||
| #include "GPU_immediate.h" | |||||
| void clip_graph_tracking_values_iterate_track( | void clip_graph_tracking_values_iterate_track( | ||||
| SpaceClip *sc, MovieTrackingTrack *track, void *userdata, | SpaceClip *sc, MovieTrackingTrack *track, void *userdata, | ||||
| Context not available. | |||||
| glLineWidth(2.0); | glLineWidth(2.0); | ||||
| glBegin(GL_LINES); | VertexFormat* format = immVertexFormat(); | ||||
| glVertex2f(x, v2d->cur.ymin); | unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT); | ||||
| glVertex2f(x, v2d->cur.ymax); | |||||
| glEnd(); | immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | ||||
merwin: This line is black instead of green. Pull these lines down so they affect the bound shader:
```… | |||||
| immBegin(GL_LINES, 2); | |||||
| immVertex2f(pos, x, v2d->cur.ymin); | |||||
| immVertex2f(pos, x, v2d->cur.ymax); | |||||
| immEnd(); | |||||
| immUnbindProgram(); | |||||
| UI_view2d_view_orthoSpecial(ar, v2d, 1); | UI_view2d_view_orthoSpecial(ar, v2d, 1); | ||||
| Context not available. | |||||
| /* 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 */ | ||||
| glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| glColor4f(0.0f, 0.0f, 0.0f, 0.4f); | |||||
| glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)SFRA, v2d->cur.ymax); | VertexFormat* format = immVertexFormat(); | ||||
| glRectf((float)EFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax); | unsigned pos = add_attrib(format, "pos", GL_FLOAT, 2, KEEP_FLOAT); | ||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | |||||
| immUniformColor4f(0.0f, 0.0f, 0.0f, 0.4f); | |||||
| 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); | |||||
| immUnbindProgram(); | |||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| UI_ThemeColorShade(TH_BACK, -60); | UI_ThemeColorShade(TH_BACK, -60); | ||||
| Context not available. | |||||
merwinUnsubmitted Not Done Inline Actionsfdrawline below can also be updated. immBegin(GL_LINES, 4) ... Keep GPU_SHADER_2D_UNIFORM_COLOR bound, just update the color with immUniformThemeColorShade. Also noticed these lines need a glLineWidth(1.0f). merwin: fdrawline below can also be updated.
immBegin(GL_LINES, 4) ...
Keep… | |||||
This line is black instead of green. Pull these lines down so they affect the bound shader:
Just change UI_ThemeColor to immUniformThemeColor.