[Bf-blender-cvs] [7bbcb64] master: OpenGL: remove unused VBO_DISABLED from PBVH

Mike Erwin noreply at git.blender.org
Thu Nov 26 01:53:15 CET 2015


Commit: 7bbcb643f23ed5c828b5a6cd51a442860eae96d3
Author: Mike Erwin
Date:   Wed Nov 25 12:30:20 2015 -0500
Branches: master
https://developer.blender.org/rB7bbcb643f23ed5c828b5a6cd51a442860eae96d3

OpenGL: remove unused VBO_DISABLED from PBVH

Was almost certainly being compiled out anyway, but now we don’t have
to read it!

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

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 69aca31..7fe9da4 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1019,24 +1019,17 @@ struct GPU_PBVH_Buffers {
 	float diffuse_color[4];
 };
 
-typedef enum {
-	VBO_ENABLED,
-	VBO_DISABLED
-} VBO_State;
-
-static void gpu_colors_enable(VBO_State vbo_state)
+static void gpu_colors_enable()
 {
 	glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
 	glEnable(GL_COLOR_MATERIAL);
-	if (vbo_state == VBO_ENABLED)
-		glEnableClientState(GL_COLOR_ARRAY);
+	glEnableClientState(GL_COLOR_ARRAY);
 }
 
-static void gpu_colors_disable(VBO_State vbo_state)
+static void gpu_colors_disable()
 {
 	glDisable(GL_COLOR_MATERIAL);
-	if (vbo_state == VBO_ENABLED)
-		glDisableClientState(GL_COLOR_ARRAY);
+	glDisableClientState(GL_COLOR_ARRAY);
 }
 
 static float gpu_color_from_mask(float mask)
@@ -1864,7 +1857,7 @@ void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial,
 		glEnableClientState(GL_VERTEX_ARRAY);
 		if (!wireframe) {
 			glEnableClientState(GL_NORMAL_ARRAY);
-			gpu_colors_enable(VBO_ENABLED);
+			gpu_colors_enable();
 		}
 
 		GPU_buffer_bind(buffers->vert_buf, GPU_BINDING_ARRAY);
@@ -1943,7 +1936,7 @@ void GPU_draw_pbvh_buffers(GPU_PBVH_Buffers *buffers, DMSetMaterial setMaterial,
 		glDisableClientState(GL_VERTEX_ARRAY);
 		if (!wireframe) {
 			glDisableClientState(GL_NORMAL_ARRAY);
-			gpu_colors_disable(VBO_ENABLED);
+			gpu_colors_disable();
 		}
 	}
 }




More information about the Bf-blender-cvs mailing list