Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/glutil.c
| Context not available. | |||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| /* DEPRECATED: use imm_draw_line instead */ | |||||
| void fdrawline(float x1, float y1, float x2, float y2) /* DEPRECATED */ | void fdrawline(float x1, float y1, float x2, float y2) | ||||
| { | { | ||||
| glBegin(GL_LINES); | glBegin(GL_LINES); | ||||
| glVertex2f(x1, y1); | glVertex2f(x1, y1); | ||||
| Context not available. | |||||
| immEnd(); | immEnd(); | ||||
| } | } | ||||
| void imm_draw_line(unsigned pos, float x1, float y1, float x2, float y2) | |||||
| { | |||||
| immBegin(PRIM_LINES, 2); | |||||
| immVertex2f(pos, x1, y1); | |||||
| immVertex2f(pos, x2, y2); | |||||
| immEnd(); | |||||
| } | |||||
merwin: I think drawing one line is so simple that no helper function is needed. fdrawline will just go… | |||||
cyraxAuthorUnsubmitted Not Done Inline ActionsLeft this in place. If there are strong feelings against this kind of util functions, let me know and I'll delete it. Otherwise it helps reduce clutter. cyrax: Left this in place. If there are strong feelings against this kind of util functions, let me… | |||||
| void imm_draw_line_box_3D(unsigned pos, float x1, float y1, float x2, float y2) | void imm_draw_line_box_3D(unsigned pos, float x1, float y1, float x2, float y2) | ||||
| { | { | ||||
| /* use this version when VertexFormat has a vec3 position */ | /* use this version when VertexFormat has a vec3 position */ | ||||
| Context not available. | |||||
I think drawing one line is so simple that no helper function is needed. fdrawline will just go away.