diff options
author | Luca Rood <dev@lucarood.com> | 2017-02-03 04:17:22 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-02-03 04:21:08 +0300 |
commit | b1b5ded37f9e2967fb1e2b33c6aef89c233750ed (patch) | |
tree | 5e2548a10474fa294981fbdb80b1e2fe0b1b3d02 /source/blender/editors/space_view3d | |
parent | d85295534b6dad80b9c0db32708f7318ef79e134 (diff) |
Fix shaders in some immBindBuiltinProgram calls
Had mistakenly used 3D shaders for some 2D drawings...
Replaced those now.
Part of T49043
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_ruler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/view3d_ruler.c b/source/blender/editors/space_view3d/view3d_ruler.c index dde3ef75a86..482fe356b46 100644 --- a/source/blender/editors/space_view3d/view3d_ruler.c +++ b/source/blender/editors/space_view3d/view3d_ruler.c @@ -461,7 +461,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a if (ruler_item->flag & RULERITEM_USE_ANGLE) { unsigned pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT); - immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); imm_cpack(is_act ? color_act : color_base); immBegin(GL_LINE_STRIP, 3); @@ -603,7 +603,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a else { unsigned pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT); - immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); imm_cpack(is_act ? color_act : color_base); immBegin(GL_LINE_STRIP, 2); @@ -706,7 +706,7 @@ static void ruler_info_draw_pixel(const struct bContext *C, ARegion *ar, void *a unsigned pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 2, KEEP_FLOAT); - immBindBuiltinProgram(GPU_SHADER_3D_UNIFORM_COLOR); + immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); imm_cpack(color_act); imm_draw_lined_circle(pos, co_ss[0], co_ss[1], size * U.pixelsize, 32); |