Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Rood <dev@lucarood.com>2017-03-07 07:40:40 +0300
committerLuca Rood <dev@lucarood.com>2017-03-07 07:44:04 +0300
commit76ae10f580eb8cd460f4e69a500b8a65abc6f37a (patch)
tree40fa311ed18bc7fae77b31d587150ed69c854b68 /source/blender/editors/space_outliner/outliner_draw.c
parent78d9a0a563962b75978a922fb9ee716905374428 (diff)
OpenGL immediate mode: finish outliner_draw.c
Part of T49043
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index e8d98d9f4db..0ba60b21aa7 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -67,9 +67,6 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
-
#include "GPU_immediate.h"
#include "UI_interface.h"
@@ -671,18 +668,22 @@ static void outliner_draw_rnacols(ARegion *ar, int sizex)
if (miny < v2d->tot.ymin) miny = v2d->tot.ymin;
glLineWidth(1.0f);
- UI_ThemeColorShadeAlpha(TH_BACK, -15, -200);
-
- /* draw column separator lines */
- fdrawline((float)sizex,
- v2d->cur.ymax,
- (float)sizex,
- miny);
-
- fdrawline((float)sizex + OL_RNA_COL_SIZEX,
- v2d->cur.ymax,
- (float)sizex + OL_RNA_COL_SIZEX,
- miny);
+
+ unsigned int pos = add_attrib(immVertexFormat(), "pos", COMP_F32, 2, KEEP_FLOAT);
+ immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
+ immUniformThemeColorShadeAlpha(TH_BACK, -15, -200);
+
+ immBegin(PRIM_LINES, 4);
+
+ immVertex2f(pos, sizex, v2d->cur.ymax);
+ immVertex2f(pos, sizex, miny);
+
+ immVertex2f(pos, sizex + OL_RNA_COL_SIZEX, v2d->cur.ymax);
+ immVertex2f(pos, sizex + OL_RNA_COL_SIZEX, miny);
+
+ immEnd();
+
+ immUnbindProgram();
}
static void outliner_draw_rnabuts(uiBlock *block, ARegion *ar, SpaceOops *soops, int sizex, ListBase *lb)