[Bf-blender-cvs] [1976fd7af1] blender2.8: Clay Engine: Fix instance attrib.

Clément Foucault noreply at git.blender.org
Sat Feb 11 20:48:00 CET 2017


Commit: 1976fd7af18bd784fadccc1ba4abbf7be878689d
Author: Clément Foucault
Date:   Thu Feb 9 18:33:12 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB1976fd7af18bd784fadccc1ba4abbf7be878689d

Clay Engine: Fix instance attrib.

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

M	source/blender/gpu/gawain/batch.c

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

diff --git a/source/blender/gpu/gawain/batch.c b/source/blender/gpu/gawain/batch.c
index 6beddaca6c..55ccd94a55 100644
--- a/source/blender/gpu/gawain/batch.c
+++ b/source/blender/gpu/gawain/batch.c
@@ -314,9 +314,9 @@ void Batch_draw_stupid_instanced(Batch* batch, unsigned int instance_vbo, int in
 			glVertexAttribPointer(loc + atr_ofs, (size > 4) ? 4 : size, GL_FLOAT, GL_FALSE,
 			                      sizeof(float) * attrib_stride, (GLvoid*)(sizeof(float) * ptr_ofs));
 			glVertexAttribDivisor(loc + atr_ofs, 1);
-			size -= 4;
 			atr_ofs++;
 			ptr_ofs += (size > 4) ? 4 : size;
+			size -= 4;
 		}
 	}
 	glBindBuffer(GL_ARRAY_BUFFER, 0);




More information about the Bf-blender-cvs mailing list