diff options
author | Mike Erwin <significant.bit@gmail.com> | 2015-11-25 20:30:20 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2015-11-26 03:49:54 +0300 |
commit | 7bbcb643f23ed5c828b5a6cd51a442860eae96d3 (patch) | |
tree | 1d1ebf682578dddee82be2e68e81ca977bbeafd9 /source/blender/gpu/intern/gpu_buffers.c | |
parent | 88556d801febc4fd02cb93302a7c25dcdd3d166e (diff) |
OpenGL: remove unused VBO_DISABLED from PBVH
Was almost certainly being compiled out anyway, but now we don’t have
to read it!
Diffstat (limited to 'source/blender/gpu/intern/gpu_buffers.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 19 |
1 files 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(); } } } |