[cogl] matrix: Add cogl_debug_matrix_print api
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] matrix: Add cogl_debug_matrix_print api
- Date: Mon, 10 Sep 2012 15:20:04 +0000 (UTC)
commit 3b33889ff1204f19347a9548320ba95baa54c18c
Author: Robert Bragg <robert linux intel com>
Date: Wed Jun 20 15:50:18 2012 +0100
matrix: Add cogl_debug_matrix_print api
As a convenience for debugging this adds a cogl_debug_matrix_print
function that prints out the components of a matrix and any internal
flags associated with the given matrix.
cogl/cogl-matrix-private.h | 5 +----
cogl/cogl-matrix.c | 2 +-
cogl/cogl-matrix.h | 11 +++++++++++
3 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/cogl/cogl-matrix-private.h b/cogl/cogl-matrix-private.h
index f6f6cb8..0d79564 100644
--- a/cogl/cogl-matrix-private.h
+++ b/cogl/cogl-matrix-private.h
@@ -35,13 +35,10 @@ G_BEGIN_DECLS
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_MATRICES))) \
{ \
g_print ("%s:\n", G_STRFUNC); \
- _cogl_matrix_print (MATRIX); \
+ cogl_debug_matrix_print (MATRIX); \
}
void
-_cogl_matrix_print (const CoglMatrix *matrix);
-
-void
_cogl_matrix_prefix_print (const char *prefix, const CoglMatrix *matrix);
G_END_DECLS
diff --git a/cogl/cogl-matrix.c b/cogl/cogl-matrix.c
index ba71d26..0ee28d2 100644
--- a/cogl/cogl-matrix.c
+++ b/cogl/cogl-matrix.c
@@ -380,7 +380,7 @@ _cogl_matrix_prefix_print (const char *prefix, const CoglMatrix *matrix)
* Dumps the contents of a CoglMatrix structure.
*/
void
-_cogl_matrix_print (const CoglMatrix *matrix)
+cogl_debug_matrix_print (const CoglMatrix *matrix)
{
_cogl_matrix_prefix_print ("", matrix);
}
diff --git a/cogl/cogl-matrix.h b/cogl/cogl-matrix.h
index 5a93219..8d85e92 100644
--- a/cogl/cogl-matrix.h
+++ b/cogl/cogl-matrix.h
@@ -743,6 +743,17 @@ cogl_matrix_is_identity (const CoglMatrix *matrix);
void
cogl_matrix_transpose (CoglMatrix *matrix);
+/**
+ * cogl_debug_matrix_print:
+ * @matrix: A #CoglMatrix
+ *
+ * Prints the contents of a #CoglMatrix to stdout.
+ *
+ * Since: 2.0
+ */
+void
+cogl_debug_matrix_print (const CoglMatrix *matrix);
+
#ifdef COGL_HAS_GTYPE_SUPPORT
#define COGL_GTYPE_TYPE_MATRIX (cogl_gtype_matrix_get_type ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]