diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-04-16 19:25:42 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-04-16 19:25:42 +0300 |
commit | 7041b99b5a90509f215db83feeca900d123932b2 (patch) | |
tree | 85f0c6d07ae4b4e738d985c7481a2351caad71e8 /source/blender/editors/screen | |
parent | bf441fcfacc1648cb5aff87dafd1e5f0098e3d2b (diff) |
use immUniformColor instead of immUniform("color"
The specialized color functions are better in every way:
- faster lookup (don't have to match "color" string)
- flexible inputs (RGB with separate alpha)
- automatic alpha = 1.0 if not specified
Sort of related to T49043
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 599daef6661..57c8d19f52f 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -303,7 +303,7 @@ static void region_draw_azone_icon(AZone *az) /* outlined circle */ GPU_enable_program_point_size(); /* TODO: make a fixed-size shader to avoid this */ immBindBuiltinProgram(GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_OUTLINE_AA); - immUniform4f("color", 1.0f, 1.0f, 1.0f, 0.8f); + immUniformColor4f(1.0f, 1.0f, 1.0f, 0.8f); immUniform4f("outlineColor", 0.2f, 0.2f, 0.2f, 0.9f); immUniform1f("outlineWidth", 1.0f); immUniform1f("size", 9.5f); @@ -315,7 +315,7 @@ static void region_draw_azone_icon(AZone *az) /* + */ immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - immUniform4f("color", 0.2f, 0.2f, 0.2f, 0.9f); + immUniformColor4f(0.2f, 0.2f, 0.2f, 0.9f); immBegin(PRIM_LINES, 4); immVertex2f(pos, midx, midy - 2); immVertex2f(pos, midx, midy + 3); |