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:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-24 15:39:52 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-24 15:39:52 +0300
commiteff1b54362854719f3c87c39542a8d975bf15c60 (patch)
tree86722f0c849013fff45228fd9e3babdba0a8e426 /source/blender/blenkernel/intern/subsurf_ccg.c
parentb55ed89b662361aa0b6d4c4fc42bf12ce690d070 (diff)
Fix subsurf edge drawing when more than one loose edge vert exists
Diffstat (limited to 'source/blender/blenkernel/intern/subsurf_ccg.c')
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 33bc593d016..05061f18b21 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -2279,10 +2279,10 @@ static void ccgDM_buffer_copy_edge(
unsigned int tot_interior = 0;
unsigned int grid_tot_face = grid_face_side * grid_face_side;
- int iloose, inorm, iloosehidden, inormhidden;
- int tot_loose_hidden = 0, tot_loose = 0;
- int tot_hidden = 0, tot = 0;
- unsigned int iloosevert = dm->drawObject->tot_loop_verts;
+ unsigned int iloose, inorm, iloosehidden, inormhidden;
+ unsigned int tot_loose_hidden = 0, tot_loose = 0;
+ unsigned int tot_hidden = 0, tot = 0;
+ unsigned int iloosevert;
/* int tot_interior = 0; */
/* first, handle hidden/loose existing edges, then interior edges */
@@ -2304,6 +2304,7 @@ static void ccgDM_buffer_copy_edge(
/* multiply by two for loose edges, the indices are copied in a different way */
iloose = (tot + tot_hidden) * grid_face_side * 2;
iloosehidden = (tot + tot_hidden + tot_loose) * grid_face_side * 2;
+ iloosevert = dm->drawObject->tot_loop_verts;
/* part one, handle all normal edges */
for (j = 0; j < totedge; j++) {
@@ -2343,6 +2344,8 @@ static void ccgDM_buffer_copy_edge(
iloosehidden++;
iloosevert++;
}
+ /* we are through with this loose edge and moving to the next, so increase by one */
+ iloosevert++;
}
else {
index_start = ccgdm->faceMap[fhandle].startFace;
@@ -2364,6 +2367,8 @@ static void ccgDM_buffer_copy_edge(
iloose++;
iloosevert++;
}
+ /* we are through with this loose edge and moving to the next, so increase by one */
+ iloosevert++;
}
else {
index_start = ccgdm->faceMap[fhandle].startFace;