diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-03-23 08:45:46 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-03-23 08:46:14 +0300 |
commit | 09ad6842499f638ecd944714c0a82ba8deebb073 (patch) | |
tree | f3f3f3be2571d530497850b9196e0c23ff3e8093 /source/blender/editors/curve | |
parent | c2366009c06ad7bdda29d182f8f3b4550cc0e123 (diff) |
cleanup use of GPU matrix API
Take advantage of 2D functions, rotation about the X Y or Z axis, uniform scale factors.
We no longer need to call gpuMatrixBegin_legacy() before using the new API locally in functions.
related to T49450
Diffstat (limited to 'source/blender/editors/curve')
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c index c2c85e20174..cf7cfec5130 100644 --- a/source/blender/editors/curve/editcurve_paint.c +++ b/source/blender/editors/curve/editcurve_paint.c @@ -475,7 +475,6 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS Batch_Uniform3fv(sphere, "color", color); /* scale to edit-mode space */ - gpuMatrixBegin3D_legacy(); gpuPushMatrix(); gpuMultMatrix3D(obedit->obmat); @@ -489,15 +488,15 @@ static void curve_draw_stroke_3d(const struct bContext *UNUSED(C), ARegion *UNUS const float radius = stroke_elem_radius(cdd, selem); + gpuPushMatrix(); gpuScaleUniform(radius); Batch_draw(sphere); - gpuScaleUniform(1.0f / radius); + gpuPopMatrix(); location_prev = selem->location_local; } gpuPopMatrix(); - gpuMatrixEnd(); } if (stroke_len > 1) { |