[Bf-blender-cvs] [e474549da5e] master: Cleanup: GPU_buffers: Remove obsolete debug drawing

Clément Foucault noreply at git.blender.org
Sat May 4 14:11:44 CEST 2019


Commit: e474549da5e2a5fa8dc3e80ce01aa8dc08d2f265
Author: Clément Foucault
Date:   Sat May 4 01:44:55 2019 +0200
Branches: master
https://developer.blender.org/rBe474549da5e2a5fa8dc3e80ce01aa8dc08d2f265

Cleanup: GPU_buffers: Remove obsolete debug drawing

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

M	source/blender/gpu/GPU_buffers.h
M	source/blender/gpu/intern/gpu_buffers.c

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

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()
 {
 }



More information about the Bf-blender-cvs mailing list