diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-28 18:14:22 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-28 18:19:42 +0300 |
commit | 2100dba34bbec7fffdff787c01d3270ab7d3dfbb (patch) | |
tree | 6537a82b5ffe39e64da79faf8a0b875804567409 /source/blender/editors/gpencil | |
parent | fbe7c848c20c1f3fef0b2ee47b9d2d2fa19a5b5e (diff) |
Cleanup: GPU: Move program point size to GPU_state
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/annotate_draw.c | 8 | ||||
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index f325422fec7..a853e2bcc9a 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -561,7 +561,7 @@ static void annotation_draw_strokes(bGPdata *UNUSED(gpd), short lthick, const float color[4]) { - GPU_enable_program_point_size(); + GPU_program_point_size(true); for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { /* check if stroke can be drawn */ @@ -622,7 +622,7 @@ static void annotation_draw_strokes(bGPdata *UNUSED(gpd), } } - GPU_disable_program_point_size(); + GPU_program_point_size(false); } /* Draw selected verts for strokes being edited */ @@ -658,7 +658,7 @@ static void annotation_draw_strokes_edit(bGPdata *gpd, } } - GPU_enable_program_point_size(); + GPU_program_point_size(true); /* draw stroke verts */ for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) { @@ -751,7 +751,7 @@ static void annotation_draw_strokes_edit(bGPdata *gpd, immUnbindProgram(); } - GPU_disable_program_point_size(); + GPU_program_point_size(false); /* clear depth mask */ if (dflag & GP_DRAWDATA_ONLY3D) { diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index ef74aa28b63..5f08035a56b 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -180,7 +180,7 @@ static void gp_draw_stroke_volumetric_2d(const bGPDspoint *points, format, "color", GPU_COMP_U8, 4, GPU_FETCH_INT_TO_FLOAT_UNIT); immBindBuiltinProgram(GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR); - GPU_enable_program_point_size(); + GPU_program_point_size(true); immBegin(GPU_PRIM_POINTS, totpoints); const bGPDspoint *pt = points; @@ -199,7 +199,7 @@ static void gp_draw_stroke_volumetric_2d(const bGPDspoint *points, immEnd(); immUnbindProgram(); - GPU_disable_program_point_size(); + GPU_program_point_size(false); } /* draw a 3D stroke in "volumetric" style */ @@ -215,7 +215,7 @@ static void gp_draw_stroke_volumetric_3d(const bGPDspoint *points, format, "color", GPU_COMP_U8, 4, GPU_FETCH_INT_TO_FLOAT_UNIT); immBindBuiltinProgram(GPU_SHADER_3D_POINT_VARYING_SIZE_VARYING_COLOR); - GPU_enable_program_point_size(); + GPU_program_point_size(true); immBegin(GPU_PRIM_POINTS, totpoints); const bGPDspoint *pt = points; @@ -229,7 +229,7 @@ static void gp_draw_stroke_volumetric_3d(const bGPDspoint *points, immEnd(); immUnbindProgram(); - GPU_disable_program_point_size(); + GPU_program_point_size(false); } /* --------------- Stroke Fills ----------------- */ @@ -867,7 +867,7 @@ static void gp_draw_strokes(tGPDdraw *tgpw) short sthickness; float ink[4]; - GPU_enable_program_point_size(); + GPU_program_point_size(true); bGPDstroke *gps_init = (tgpw->gps) ? tgpw->gps : tgpw->t_gpf->strokes.first; @@ -1104,7 +1104,7 @@ static void gp_draw_strokes(tGPDdraw *tgpw) } } - GPU_disable_program_point_size(); + GPU_program_point_size(false); } /* ----- General Drawing ------ */ |