Commit: 69b1b95356dfb5491730878de2ab5093eb90e20a
Author: Dalai Felinto
Date:   Wed Oct 12 23:18:14 2016 +0000
Branches: blender2.8
https://developer.blender.org/rB69b1b95356dfb5491730878de2ab5093eb90e20a

immediate mode: use new ThemeColor functions

===================================================================

M       source/blender/editors/space_time/space_time.c
M       source/blender/editors/space_view3d/view3d_fly.c
M       source/blender/editors/space_view3d/view3d_walk.c

===================================================================

diff --git a/source/blender/editors/space_time/space_time.c 
b/source/blender/editors/space_time/space_time.c
index 685f513..0b249bf 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -101,11 +101,8 @@ static void time_draw_sfra_efra(Scene *scene, View2D *v2d)
        glDisable(GL_BLEND);
 
        /* thin lines where the actual frames are */
-       unsigned char color[3];
-       UI_GetThemeColorShade3ubv(TH_BACK, -60, color);
-
        immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
-       immUniformColor3ubv(color);
+       immUniformThemeColorShade(TH_BACK, -60);
 
        immBegin(GL_LINES, 4);
 
diff --git a/source/blender/editors/space_view3d/view3d_fly.c 
b/source/blender/editors/space_view3d/view3d_fly.c
index 19c4b80..b42afd3 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -264,9 +264,7 @@ static void drawFlyPixel(const struct bContext *UNUSED(C), 
ARegion *UNUSED(ar),
 
        immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-       unsigned char square_color[3];
-       UI_GetThemeColor3ubv(TH_VIEW_OVERLAY, square_color);
-       immUniformColor3ubv(square_color);
+       immUniformThemeColor(TH_VIEW_OVERLAY);
 
        immBegin(GL_LINES, 16);
 
diff --git a/source/blender/editors/space_view3d/view3d_walk.c 
b/source/blender/editors/space_view3d/view3d_walk.c
index 7a826c1..4131a5c 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -345,9 +345,7 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), 
ARegion *ar, void *a
 
        immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 
-       unsigned char crosshair_color[3];
-       UI_GetThemeColor3ubv(TH_VIEW_OVERLAY, crosshair_color);
-       immUniformColor3ubv(crosshair_color);
+       immUniformThemeColor(TH_VIEW_OVERLAY);
 
        immBegin(GL_LINES, 8);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to