[Bf-blender-cvs] [0ba42d9] strand_gpu: Fix broken attribute disabling when some of the attributes are implicit.

Lukas Tönne noreply at git.blender.org
Sat Jul 9 18:30:43 CEST 2016


Commit: 0ba42d944b6607d15f9a70462b225087b7144329
Author: Lukas Tönne
Date:   Sat Jul 9 18:25:14 2016 +0200
Branches: strand_gpu
https://developer.blender.org/rB0ba42d944b6607d15f9a70462b225087b7144329

Fix broken attribute disabling when some of the attributes are implicit.

The vertex attributes for the fiber buffer use the gl_Vertex builtin variable
of GLSL instead of an explicit named attribute input. The corresponding index
then is -1. The following attributes still need to be disabled however.

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

M	source/blender/gpu/intern/gpu_buffers.c

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

diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index d5484ac..c4bb7c3 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -851,8 +851,6 @@ void GPU_interleaved_attrib_unbind(void)
 		if (attribData[i].index != -1) {
 			glDisableVertexAttribArray(attribData[i].index);
 		}
-		else
-			break;
 	}
 	attribData[0].index = -1;
 }




More information about the Bf-blender-cvs mailing list