Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-05-26 23:08:56 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-05-27 00:24:11 +0300
commit8df99a5d8aa1f14715aaf37b889b05c195cf5c80 (patch)
tree7803815cfdc38781f37a5b923cefcfa96b40e057 /source/blender/draw/intern/draw_debug.h
parentc883f09fa84789c46237da33d1f17f84ad4bf6ac (diff)
DRW: Add new DRW_debug API.
This new API aim to provide simple function that can be called by the draw engines during any phase of the draw pipeline. All calls are saved and issued after all engines have finished rendering. This removes the need of setuping special passes and shading groups for some simple debug drawing.
Diffstat (limited to 'source/blender/draw/intern/draw_debug.h')
-rw-r--r--source/blender/draw/intern/draw_debug.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_debug.h b/source/blender/draw/intern/draw_debug.h
new file mode 100644
index 00000000000..1dab431fc88
--- /dev/null
+++ b/source/blender/draw/intern/draw_debug.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2018, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor(s): Blender Institute
+ *
+ */
+
+/** \file draw_debug.h
+ * \ingroup draw
+ */
+
+#ifndef __DRAW_DEBUG_H__
+#define __DRAW_DEBUG_H__
+
+struct BoundBox;
+
+void DRW_debug_modelmat_reset(void);
+void DRW_debug_modelmat(const float modelmat[4][4]);
+
+void DRW_debug_line_v3v3(const float v1[3], const float v2[3], const float color[4]);
+void DRW_debug_polygon_v3(const float (*v)[3], const int vert_len, const float color[4]);
+void DRW_debug_m4(const float m[4][4]);
+void DRW_debug_bbox(const BoundBox *bbox, const float color[4]);
+
+#endif /* __DRAW_DEBUG_H__ */