Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_draw.c
| Context not available. | |||||
| const bool is_searching = SEARCHING_OUTLINER(soops) || | const bool is_searching = SEARCHING_OUTLINER(soops) || | ||||
| (soops->outlinevis == SO_DATABLOCKS && soops->search_string[0] != 0); | (soops->outlinevis == SO_DATABLOCKS && soops->search_string[0] != 0); | ||||
| VertexFormat *format = immVertexFormat(); | |||||
| unsigned pos = add_attrib(format, "pos", GL_INT, 2, CONVERT_INT_TO_FLOAT); | |||||
| immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); | |||||
| for (TreeElement *te = lb->first; te; te = te->next) { | for (TreeElement *te = lb->first; te; te = te->next) { | ||||
| const TreeStoreElem *tselem = TREESTORE(te); | const TreeStoreElem *tselem = TREESTORE(te); | ||||
| const int start_y = *io_start_y; | const int start_y = *io_start_y; | ||||
| /* selection status */ | /* selection status */ | ||||
| if (tselem->flag & TSE_SELECTED) { | if (tselem->flag & TSE_SELECTED) { | ||||
| glColor4fv(col_selection); | immUniformColor4fv(col_selection); | ||||
| glRecti(0, start_y + 1, (int)ar->v2d.cur.xmax, start_y + UI_UNIT_Y - 1); | immRecti(pos, 0, start_y + 1, (int)ar->v2d.cur.xmax, start_y + UI_UNIT_Y - 1); | ||||
| } | } | ||||
| /* search match highlights | /* search match highlights | ||||
| * we don't expand items when searching in the datablocks but we | * we don't expand items when searching in the datablocks but we | ||||
| * still want to highlight any filter matches. */ | * still want to highlight any filter matches. */ | ||||
| if (is_searching && (tselem->flag & TSE_SEARCHMATCH)) { | if (is_searching && (tselem->flag & TSE_SEARCHMATCH)) { | ||||
| glColor4fv(col_searchmatch); | immUniformColor4fv(col_searchmatch); | ||||
| glRecti(start_x, start_y + 1, ar->v2d.cur.xmax, start_y + UI_UNIT_Y - 1); | immRecti(pos, start_x, start_y + 1, ar->v2d.cur.xmax, start_y + UI_UNIT_Y - 1); | ||||
| } | } | ||||
| /* mouse hover highlights */ | /* mouse hover highlights */ | ||||
| if (tselem->flag & TSE_HIGHLIGHTED) { | if (tselem->flag & TSE_HIGHLIGHTED) { | ||||
| glColor4fv(col_highlight); | immUniformColor4fv(col_highlight); | ||||
| glRecti(0, start_y + 1, (int)ar->v2d.cur.xmax, start_y + UI_UNIT_Y - 1); | immRecti(pos, 0, start_y + 1, (int)ar->v2d.cur.xmax, start_y + UI_UNIT_Y - 1); | ||||
| } | } | ||||
| *io_start_y -= UI_UNIT_Y; | *io_start_y -= UI_UNIT_Y; | ||||
| Context not available. | |||||
| start_x + UI_UNIT_X, io_start_y); | start_x + UI_UNIT_X, io_start_y); | ||||
| } | } | ||||
| } | } | ||||
| immUnbindProgram(); | |||||
| } | } | ||||
| static void outliner_draw_highlights(ARegion *ar, SpaceOops *soops, int startx, int *starty) | static void outliner_draw_highlights(ARegion *ar, SpaceOops *soops, int startx, int *starty) | ||||
| Context not available. | |||||