Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/editderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 7fd241eb8e3..dc50e39a862 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -55,8 +55,8 @@
#include "MEM_guardedalloc.h"
-#include "GPU_extensions.h"
#include "GPU_glew.h"
+#include "GPU_shader.h"
extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */
@@ -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) {