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>2015-04-15 21:14:01 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-04-15 21:32:16 +0300
commit6675fd6b52554cf4ed63d5a740dfe60525cf1f3a (patch)
treebef9182349afb714136bdb2ebb55aef65df07d5c /source/blender/blenkernel/intern/cdderivedmesh.c
parent7f4b6a345e59bd4b05c8cab08d0c618eea9f827d (diff)
dyntopo: don't allocate tessfaces while sculpting
Tessellation data isn't used for drawing or sculpting. This frees up some memory ~approx 10% in own tests. Also slight spee-up since it avoids calculating it in the first place.
Diffstat (limited to 'source/blender/blenkernel/intern/cdderivedmesh.c')
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index bd5ee4b9851..e4a5dbb9d24 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -470,7 +470,7 @@ static void cdDM_drawFacesSolid(DerivedMesh *dm,
int a;
if (cddm->pbvh && cddm->pbvh_draw) {
- if (dm->numTessFaceData) {
+ if (BKE_pbvh_has_faces(cddm->pbvh)) {
float (*face_nors)[3] = CustomData_get_layer(&dm->faceData, CD_NORMAL);
BKE_pbvh_draw(cddm->pbvh, partial_redraw_planes, face_nors,
@@ -527,7 +527,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
* (the same as it'll display without UV maps in textured view)
*/
if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) {
- if (dm->numTessFaceData) {
+ if (BKE_pbvh_has_faces(cddm->pbvh)) {
GPU_set_tpage(NULL, false, false);
BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false);
}
@@ -912,7 +912,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
* works fine for matcap
*/
if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) {
- if (dm->numTessFaceData) {
+ if (BKE_pbvh_has_faces(cddm->pbvh)) {
setMaterial(1, &gattribs);
BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false);
}
@@ -1246,7 +1246,7 @@ static void cdDM_drawMappedFacesMat(DerivedMesh *dm,
* works fine for matcap
*/
if (cddm->pbvh && cddm->pbvh_draw && BKE_pbvh_type(cddm->pbvh) == PBVH_BMESH) {
- if (dm->numTessFaceData) {
+ if (BKE_pbvh_has_faces(cddm->pbvh)) {
setMaterial(userData, 1, &gattribs);
BKE_pbvh_draw(cddm->pbvh, NULL, NULL, NULL, false);
}