From 7bbcb643f23ed5c828b5a6cd51a442860eae96d3 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Wed, 25 Nov 2015 12:30:20 -0500 Subject: [PATCH] OpenGL: remove unused VBO_DISABLED from PBVH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was almost certainly being compiled out anyway, but now we don’t have to read it! --- source/blender/gpu/intern/gpu_buffers.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 69aca31e21a..7fe9da44d8a 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(); } } }