[Bf-blender-cvs] [eff1b54] master: Fix subsurf edge drawing when more than one loose edge vert exists
Antony Riakiotakis
noreply at git.blender.org
Fri Jul 24 14:39:59 CEST 2015
Commit: eff1b54362854719f3c87c39542a8d975bf15c60
Author: Antony Riakiotakis
Date: Fri Jul 24 14:39:52 2015 +0200
Branches: master
https://developer.blender.org/rBeff1b54362854719f3c87c39542a8d975bf15c60
Fix subsurf edge drawing when more than one loose edge vert exists
===================================================================
M source/blender/blenkernel/intern/subsurf_ccg.c
===================================================================
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 33bc593..05061f1 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;
More information about the Bf-blender-cvs
mailing list