[Bf-blender-cvs] [d664818] GPU_data_request: fix compilation when TRUST_NO_ONE is disabled

Mike Erwin noreply at git.blender.org
Sat Apr 4 09:54:12 CEST 2015


Commit: d664818c968c417d3fe0100e999ef82a8167798b
Author: Mike Erwin
Date:   Sat Apr 4 03:53:40 2015 -0400
Branches: GPU_data_request
https://developer.blender.org/rBd664818c968c417d3fe0100e999ef82a8167798b

fix compilation when TRUST_NO_ONE is disabled

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

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

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

diff --git a/source/blender/gpu/intern/gpux_vbo.c b/source/blender/gpu/intern/gpux_vbo.c
index ae15035..36a740b 100644
--- a/source/blender/gpu/intern/gpux_vbo.c
+++ b/source/blender/gpu/intern/gpux_vbo.c
@@ -12,7 +12,7 @@
  * the ARB version of VAOs *must* use VBOs for vertex data
  * so we should follow that restriction on all platforms. */
 #ifdef USE_VBO
-#define USE_VAO
+  #define USE_VAO
 #endif
 
 #ifdef TRUST_NO_ONE
@@ -269,9 +269,9 @@ void GPUx_set_attrib(VertexBuffer *buff, unsigned attrib_num, unsigned vertex_nu
 
 void GPUx_set_attrib_3f(VertexBuffer *buff, unsigned attrib_num, unsigned vertex_num, float x, float y, float z)
 {
+	const GLfloat data[] = { x, y, z };
 #ifdef TRUST_NO_ONE
 	Attrib *attrib = buff->attribs + attrib_num;
-	const GLfloat data[] = { x, y, z };
 	assert(attrib->comp_type == GL_FLOAT);
 	assert(attrib->comp_ct == 3);
 #endif /* TRUST_NO_ONE */




More information about the Bf-blender-cvs mailing list