[Bf-blender-cvs] [de9ec80] master: Fix T47405: subsurf inconsistent triangulation in OpenGL compared to applied modifier and render.

Brecht Van Lommel noreply at git.blender.org
Sun Feb 14 03:56:56 CET 2016


Commit: de9ec80e644bb86a3ebb258db9135c3ee32bdcac
Author: Brecht Van Lommel
Date:   Sun Feb 14 03:50:41 2016 +0100
Branches: master
https://developer.blender.org/rBde9ec80e644bb86a3ebb258db9135c3ee32bdcac

Fix T47405: subsurf inconsistent triangulation in OpenGL compared to applied modifier and render.

===================================================================

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 5d3d75f..a5f7d56 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -2060,13 +2060,13 @@ static void ccgDM_buffer_copy_triangles(
 					for (x = 0; x < gridFaces; x++) {
 						start = gpumat->start + fc[mati].i_tri_hidden;
 
-						varray[start--] = totloops + 1;
+						varray[start--] = totloops;
 						varray[start--] = totloops + 2;
 						varray[start--] = totloops + 3;
 
 						varray[start--] = totloops;
 						varray[start--] = totloops + 1;
-						varray[start--] = totloops + 3;
+						varray[start--] = totloops + 2;
 
 						fc[mati].i_tri_hidden -= 6;
 
@@ -2082,13 +2082,13 @@ static void ccgDM_buffer_copy_triangles(
 					for (x = 0; x < gridFaces; x++) {
 						start = gpumat->start + fc[mati].i_tri_visible;
 
-						varray[start++] = totloops + 3;
+						varray[start++] = totloops;
 						varray[start++] = totloops + 2;
-						varray[start++] = totloops + 1;
-
 						varray[start++] = totloops + 3;
-						varray[start++] = totloops + 1;
+
 						varray[start++] = totloops;
+						varray[start++] = totloops + 1;
+						varray[start++] = totloops + 2;
 
 						fc[mati].i_tri_visible += 6;




More information about the Bf-blender-cvs mailing list