[Bf-blender-cvs] [ea31c55b08e] blender2.8: Gawain: cleanup code formatting

Mike Erwin noreply at git.blender.org
Mon May 22 00:27:22 CEST 2017


Commit: ea31c55b08e0add843f56af0a62d030fd25606f2
Author: Mike Erwin
Date:   Sun May 21 17:53:16 2017 -0400
Branches: blender2.8
https://developer.blender.org/rBea31c55b08e0add843f56af0a62d030fd25606f2

Gawain: cleanup code formatting

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

M	intern/gawain/src/imm_util.c
M	intern/gawain/src/immediate.c

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

diff --git a/intern/gawain/src/imm_util.c b/intern/gawain/src/imm_util.c
index 74caeb6fd3a..de50ca96907 100644
--- a/intern/gawain/src/imm_util.c
+++ b/intern/gawain/src/imm_util.c
@@ -14,33 +14,33 @@
 
 
 void immRectf(unsigned pos, float x1, float y1, float x2, float y2)
-{
+	{
 	immBegin(PRIM_TRIANGLE_FAN, 4);
 	immVertex2f(pos, x1, y1);
 	immVertex2f(pos, x2, y1);
 	immVertex2f(pos, x2, y2);
 	immVertex2f(pos, x1, y2);
 	immEnd();
-}
+	}
 
 void immRecti(unsigned pos, int x1, int y1, int x2, int y2)
-{
+	{
 	immBegin(PRIM_TRIANGLE_FAN, 4);
 	immVertex2i(pos, x1, y1);
 	immVertex2i(pos, x2, y1);
 	immVertex2i(pos, x2, y2);
 	immVertex2i(pos, x1, y2);
 	immEnd();
-}
+	}
 
 #if 0 // more complete version in case we want that
 void immRecti_complete(int x1, int y1, int x2, int y2, const float color[4])
-{
+	{
 	VertexFormat *format = immVertexFormat();
 	unsigned pos = add_attrib(format, "pos", COMP_I32, 2, CONVERT_INT_TO_FLOAT);
 	immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
 	immUniformColor4fv(color);
 	immRecti(pos, x1, y1, x2, y2);
 	immUnbindProgram();
-}
+	}
 #endif
diff --git a/intern/gawain/src/immediate.c b/intern/gawain/src/immediate.c
index 7c3b0e11e92..8b6f0fdbff5 100644
--- a/intern/gawain/src/immediate.c
+++ b/intern/gawain/src/immediate.c
@@ -749,12 +749,10 @@ void immVertex2iv(unsigned attrib_id, const int data[2])
     #define GET_UNIFORM const ShaderInput* uniform = ShaderInterface_uniform(imm.shader_interface, name);
   #endif
 #else
-/* NOTE: It is possible to have uniform fully optimized out from the shader.
- * In this case we can't assert failure or allow NULL-pointer dereference.
- *
- * TODO(sergey): How can we detect existing-but-optimized-out uniform but still
- * catch typos in uniform names passed to immUniform*() functions?
- */
+	// NOTE: It is possible to have uniform fully optimized out from the shader.
+	//       In this case we can't assert failure or allow NULL-pointer dereference.
+	// TODO(sergey): How can we detect existing-but-optimized-out uniform but still
+	//               catch typos in uniform names passed to immUniform*() functions?
   #define GET_UNIFORM const ShaderInput* uniform = ShaderInterface_uniform(imm.shader_interface, name); if (uniform == NULL) return;
 #endif
 
@@ -765,16 +763,16 @@ void immUniform1f(const char* name, float x)
 	}
 
 void immUniform2f(const char* name, float x, float y)
-{
+	{
 	GET_UNIFORM
 	glUniform2f(uniform->location, x, y);
-}
+	}
 
 void immUniform2fv(const char* name, const float data[2])
-{
+	{
 	GET_UNIFORM
 	glUniform2fv(uniform->location, 1, data);
-}
+	}
 
 void immUniform3f(const char* name, float x, float y, float z)
 	{




More information about the Bf-blender-cvs mailing list