diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-13 12:21:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-13 12:21:46 +0300 |
commit | 617c4d6adbfe64b3a72b5c48f918f39d30aa18dc (patch) | |
tree | 711ab935244158a57f251cadc5a8a27219cb93ba /source/blender | |
parent | 8d8c5a542c48ece7c867dff42bbf9375466ae56f (diff) |
Fix glShadeModel being left flat in edit-mode draw
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 6b81c47765b..c1013342bd9 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -1185,6 +1185,10 @@ static void emDM_drawMappedFaces( if (draw_option_prev == DM_DRAW_OPTION_STIPPLE) { GPU_basic_shader_bind(GPU_SHADER_USE_COLOR); } + + if (shade_prev == GL_FLAT) { + glShadeModel(GL_SMOOTH); + } } static void bmdm_get_tri_uv(BMLoop *ltri[3], MLoopUV *luv[3], const int cd_loop_uv_offset) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 88b3d7db08b..07e8325756f 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -5760,8 +5760,6 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_COLOR_ARRAY); - glShadeModel(GL_SMOOTH); - if (pset->brushtype == PE_BRUSH_WEIGHT) glLineWidth(2.0f); @@ -5876,7 +5874,6 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); - glShadeModel(GL_FLAT); if (v3d->zbuf) glEnable(GL_DEPTH_TEST); } |