diff options
author | Luca Rood <dev@lucarood.com> | 2017-02-08 01:53:20 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2017-02-11 02:36:06 +0300 |
commit | 8fbf1c4d77dcf21f2b7d63db51c7b6a950e21993 (patch) | |
tree | 0573988e7f0726d28a1a1210f00c5823e104071f /source/blender/editors/transform/transform_constraints.c | |
parent | 3f9f82f3c45e9889ae00636ef41d9dc49cad4d83 (diff) |
OpenGL immediate mode: Convert leftover UI_ThemeColor calls
Some `UI_ThemeColor` calls were left in converted files, in some cases
because they were just overlooked, and in the case of text drawing,
because the new BLF color functions were not yet implemented at the
time of conversion.
Also converted one `drawcircball` call that was left in
transform_constraints.c
Part of T49043
Diffstat (limited to 'source/blender/editors/transform/transform_constraints.c')
-rw-r--r-- | source/blender/editors/transform/transform_constraints.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index a8183d11501..60689be5500 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -769,8 +769,6 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) float tmat[4][4], imat[4][4]; int depth_test_enabled; - UI_ThemeColor(TH_GRID); - if (t->spacetype == SPACE_VIEW3D && rv3d != NULL) { copy_m4_m4(tmat, rv3d->viewmat); invert_m4_m4(imat, tmat); @@ -803,10 +801,17 @@ void drawPropCircle(const struct bContext *C, TransInfo *t) if (depth_test_enabled) glDisable(GL_DEPTH_TEST); + unsigned int pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 3, KEEP_FLOAT); + + immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); + immUniformThemeColor(TH_GRID); + set_inverted_drawing(1); - drawcircball(GL_LINE_LOOP, t->center_global, t->prop_size, imat); + imm_drawcircball(t->center_global, t->prop_size, imat, pos); set_inverted_drawing(0); + immUnbindProgram(); + if (depth_test_enabled) glEnable(GL_DEPTH_TEST); |