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
parent4ca1d6f28ffcfe34625cbd895fa6fd70d56a6e61 (diff)
skip per face texface poly lookup while drawing when the layer isnt found.
also remove some unused code.
-rw-r--r--source/blender/blenkernel/intern/editderivedmesh.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c62
-rw-r--r--source/blender/bmesh/intern/bmesh_inline.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators_inline.c6
4 files changed, 8 insertions, 70 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);
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index cdb40d668d1..ac37041b073 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -48,68 +48,6 @@
/* prototypes */
static void bm_loop_attrs_copy(BMesh *source_mesh, BMesh *target_mesh,
const BMLoop *source_loop, BMLoop *target_loop);
-#if 0
-
-/*
- * BM_CONSTRUCT.C
- *
- * This file contains functions for making and destroying
- * individual elements like verts, edges and faces.
- *
- */
-
-/*
- * BMESH MAKE VERT
- *
- * Creates a new vertex and returns a pointer
- * to it. If a pointer to an example vertex is
- * passed in, it's custom data and properties
- * will be copied to the new vertex.
- *
- */
-
-BMVert *BM_vert_create(BMesh *bm, float co[3], BMVert *example)
-{
- BMVert *v = NULL;
- v = bmesh_mv(bm, co);
- if (example)
- CustomData_bmesh_copy_data(&bm->vdata, &bm->vdata, example->head.data, &v->head.data);
- return v;
-}
-
-/*
- * BMESH MAKE EDGE
- *
- * Creates a new edge betweeen two vertices and returns a
- * pointer to it. If 'nodouble' equals 1, then a check is
- * is done to make sure that an edge between those two vertices
- * does not already exist. If it does, that edge is returned instead
- * of creating a new one.
- *
- * If a new edge is created, and a pointer to an example edge is
- * provided, it's custom data and properties will be copied to the
- * new edge.
- *
- */
-
-BMEdge *BM_edge_create(BMesh *bm, BMVert *v1, BMVert *v2, BMEdge *example, int nodouble)
-{
- BMEdge *e = NULL;
-
- if (nodouble) /* test if edge already exists. */
- e = BM_edge_exists(v1, v2);
-
- if (!e) {
- e = bmesh_me(bm, v1, v2);
-
- if (example)
- CustomData_bmesh_copy_data(&bm->edata, &bm->edata, example->head.data, &e->head.data);
- }
-
- return e;
-
-}
-#endif
/*
* BMESH MAKE QUADTRIANGLE
diff --git a/source/blender/bmesh/intern/bmesh_inline.c b/source/blender/bmesh/intern/bmesh_inline.c
index 4dd13047b90..4433aaa0fc6 100644
--- a/source/blender/bmesh/intern/bmesh_inline.c
+++ b/source/blender/bmesh/intern/bmesh_inline.c
@@ -26,8 +26,8 @@
* BM Inline functions.
*/
-#ifndef BM_INLINE_C
-#define BM_INLINE_C
+#ifndef __BMESH_INLINE_C__
+#define __BMESH_INLINE_C__
#include "bmesh.h"
@@ -68,4 +68,4 @@ BM_INLINE int BM_elem_index_get(const void *element)
return ((BMHeader *)element)->index;
}
-#endif /* BM_INLINE_C */
+#endif /* __BMESH_INLINE_C__ */
diff --git a/source/blender/bmesh/intern/bmesh_iterators_inline.c b/source/blender/bmesh/intern/bmesh_iterators_inline.c
index d403508885e..ef644f96ce0 100644
--- a/source/blender/bmesh/intern/bmesh_iterators_inline.c
+++ b/source/blender/bmesh/intern/bmesh_iterators_inline.c
@@ -26,8 +26,8 @@
* BMesh inline iterator functions.
*/
-#ifndef BM_ITERATORS_INLINE_C
-#define BM_ITERATORS_INLINE_C
+#ifndef __BMESH_ITERATORS_INLINE_C__
+#define __BMESH_ITERATORS_INLINE_C__
#include "bmesh.h"
@@ -157,4 +157,4 @@ BM_INLINE void *BM_iter_new(BMIter *iter, BMesh *bm, const char itype, void *dat
}
-#endif /* BM_ITERATORS_INLINE_C */
+#endif /* __BMESH_ITERATORS_INLINE_C__ */