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:
authorCampbell Barton <ideasman42@gmail.com>2012-02-19 06:54:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-19 06:54:50 +0400
commit22d326a663b77c8c0c51beeb21858f0f7cd5c9b4 (patch)
treee622b30dea855e00bc2a05ad2934c5fdd9182aee /source/blender/blenkernel/intern/editderivedmesh.c
parent4ca1d6f28ffcfe34625cbd895fa6fd70d56a6e61 (diff)
skip per face texface poly lookup while drawing when the layer isnt found.
also remove some unused code.
Diffstat (limited to 'source/blender/blenkernel/intern/editderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c
index 034dd9c6537..1d90bba655d 100644
--- a/source/blender/blenkernel/intern/editderivedmesh.c
+++ b/source/blender/blenkernel/intern/editderivedmesh.c
@@ -812,7 +812,7 @@ static void emDM_drawFacesTex_common(
glBegin(GL_TRIANGLES);
for (i=0; i<em->tottri; i++) {
BMLoop **ls = em->looptris[i];
- MTexPoly *tp= CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY);
+ MTexPoly *tp= has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL;
MTFace mtf = {{{0}}};
/*unsigned char *cp= NULL;*/ /*UNUSED*/
int drawSmooth= BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH);
@@ -882,7 +882,7 @@ static void emDM_drawFacesTex_common(
for (i=0; i<em->tottri; i++) {
BMLoop **ls = em->looptris[i];
- MTexPoly *tp= CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY);
+ MTexPoly *tp= has_uv ? CustomData_bmesh_get(&bm->pdata, ls[0]->f->head.data, CD_MTEXPOLY) : NULL;
MTFace mtf = {{{0}}};
/*unsigned char *cp= NULL;*/ /*UNUSED*/
int drawSmooth= BM_elem_flag_test(ls[0]->f, BM_ELEM_SMOOTH);