diff options
author | Ray Molenkamp <github@lazydodo.com> | 2018-06-28 04:07:23 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2018-06-28 04:07:23 +0300 |
commit | 8e02106d0ddc7b31844d26037a824d56d3c65663 (patch) | |
tree | bfa1898220d74ac9610b8a1363a4087a44f7b41d /source/blender/editors/uvedit/uvedit_smart_stitch.c | |
parent | fe258fd4451a7fb1ccdd85d1607b6dbd30442f28 (diff) |
GLRefactor: partially remove gl calls from source/blender/editors.
This translates the gl calls to the new GPU_ wrappers from D3501.
Given it's tedious and repetitive work, this patch does as much as it can with search + replace, the remainder of the gl calls will need to be manually dealt with on a case by case basis.
This fixes 13 of the 28 failing editors when building without opengl.
For the list of substitutions see D3502
Reviewers: brecht
Differential Revision: https://developer.blender.org/D3502
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index bac30830516..9091f3eff0b 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -65,6 +65,7 @@ #include "ED_space_api.h" #include "GPU_batch.h" +#include "GPU_state.h" #include "RNA_access.h" #include "RNA_define.h" @@ -1570,7 +1571,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar pos_id = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT); } - glEnable(GL_BLEND); + GPU_blend(true); /* Static Tris */ UI_GetThemeColor4fv(TH_STITCH_PREVIEW_ACTIVE, col); @@ -1623,12 +1624,12 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar UI_GetThemeColor4fv(TH_STITCH_PREVIEW_EDGE, col); stitch_draw_vbo(vbo_line, GWN_PRIM_LINES, col); - glDisable(GL_BLEND); + GPU_blend(false); /* draw stitch vert/lines preview */ if (state->mode == STITCH_VERT) { - glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) * 2.0f); + GPU_point_size(UI_GetThemeValuef(TH_VERTEX_SIZE) * 2.0f); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_STITCHABLE, col); vbo = GWN_vertbuf_create_with_format(&format); |