From e474549da5e2a5fa8dc3e80ce01aa8dc08d2f265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sat, 4 May 2019 01:44:55 +0200 Subject: Cleanup: GPU_buffers: Remove obsolete debug drawing --- source/blender/gpu/GPU_buffers.h | 3 -- source/blender/gpu/intern/gpu_buffers.c | 64 --------------------------------- 2 files changed, 67 deletions(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h index b9ec897a9ec..718553e2b1c 100644 --- a/source/blender/gpu/GPU_buffers.h +++ b/source/blender/gpu/GPU_buffers.h @@ -92,9 +92,6 @@ short GPU_pbvh_buffers_material_index_get(GPU_PBVH_Buffers *buffers); bool GPU_pbvh_buffers_has_mask(GPU_PBVH_Buffers *buffers); -/* debug PBVH draw */ -void GPU_pbvh_BB_draw(float min[3], float max[3], bool leaf, unsigned int pos); - void GPU_pbvh_buffers_free(GPU_PBVH_Buffers *buffers); void GPU_pbvh_fix_linking(void); diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 092fd1e3a2b..e30fccbf29d 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -1028,70 +1028,6 @@ void GPU_pbvh_buffers_free(GPU_PBVH_Buffers *buffers) /** \} */ -/* -------------------------------------------------------------------- */ -/** \name Debug - * \{ */ - -/* debug function, draws the pbvh BB */ -void GPU_pbvh_BB_draw(float min[3], float max[3], bool leaf, uint pos) -{ - if (leaf) { - immUniformColor4f(0.0, 1.0, 0.0, 0.5); - } - else { - immUniformColor4f(1.0, 0.0, 0.0, 0.5); - } - - /* TODO(merwin): revisit this after we have mutable VertexBuffers - * could keep a static batch & index buffer, change the VBO contents per draw - */ - - immBegin(GPU_PRIM_LINES, 24); - - /* top */ - immVertex3f(pos, min[0], min[1], max[2]); - immVertex3f(pos, min[0], max[1], max[2]); - - immVertex3f(pos, min[0], max[1], max[2]); - immVertex3f(pos, max[0], max[1], max[2]); - - immVertex3f(pos, max[0], max[1], max[2]); - immVertex3f(pos, max[0], min[1], max[2]); - - immVertex3f(pos, max[0], min[1], max[2]); - immVertex3f(pos, min[0], min[1], max[2]); - - /* bottom */ - immVertex3f(pos, min[0], min[1], min[2]); - immVertex3f(pos, min[0], max[1], min[2]); - - immVertex3f(pos, min[0], max[1], min[2]); - immVertex3f(pos, max[0], max[1], min[2]); - - immVertex3f(pos, max[0], max[1], min[2]); - immVertex3f(pos, max[0], min[1], min[2]); - - immVertex3f(pos, max[0], min[1], min[2]); - immVertex3f(pos, min[0], min[1], min[2]); - - /* sides */ - immVertex3f(pos, min[0], min[1], min[2]); - immVertex3f(pos, min[0], min[1], max[2]); - - immVertex3f(pos, min[0], max[1], min[2]); - immVertex3f(pos, min[0], max[1], max[2]); - - immVertex3f(pos, max[0], max[1], min[2]); - immVertex3f(pos, max[0], max[1], max[2]); - - immVertex3f(pos, max[0], min[1], min[2]); - immVertex3f(pos, max[0], min[1], max[2]); - - immEnd(); -} - -/** \} */ - void GPU_pbvh_fix_linking() { } -- cgit v1.2.3