diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-11-27 23:16:26 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2015-12-06 21:35:15 +0300 |
commit | 82191b102fba685b0dbb70c1bffd4dafc8c538b6 (patch) | |
tree | 082f5d942a07a780e5307e8d53b2c8e5ccc692af /source/blender/blenkernel/intern/editderivedmesh.c | |
parent | 1eed354e530f395c14b290b4b504a1bcc9299fcb (diff) |
OpenGL: pass flag to indicate of drawMappedFaces needs to use normals.
Differential Revision: https://developer.blender.org/D1645
Diffstat (limited to 'source/blender/blenkernel/intern/editderivedmesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 7fd241eb8e3..b6d009deb2a 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -732,8 +732,7 @@ static void emDM_drawMappedFaces( const int lasttri = tottri - 1; /* compare agasint this a lot */ DMDrawOption draw_option; int i, flush; - const int skip_normals = !glIsEnabled(GL_LIGHTING); /* could be passed as an arg */ - + const int skip_normals = !(flag & DM_DRAW_NEED_NORMALS); const float (*lnors)[3] = dm->getLoopDataArray(dm, CD_NORMAL); MLoopCol *lcol[3] = {NULL} /* , dummylcol = {0} */; unsigned char(*color_vert_array)[4] = em->derivedVertColor; @@ -755,7 +754,8 @@ static void emDM_drawMappedFaces( } if (has_vcol_preview || has_fcol_preview) { flag |= DM_DRAW_ALWAYS_SMOOTH; - glDisable(GL_LIGHTING); /* grr */ + /* weak, this logic should really be moved higher up */ + setMaterial = NULL; } if (bmdm->vertexCos) { |