[cogl] Adds cogl_framebuffer_identity_matrix
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] Adds cogl_framebuffer_identity_matrix
- Date: Tue, 6 Dec 2011 19:00:10 +0000 (UTC)
commit 5ca78668afcbdca0d4b82e0db060e93276f3fd3d
Author: Robert Bragg <robert linux intel com>
Date: Sun Nov 20 18:42:58 2011 +0000
Adds cogl_framebuffer_identity_matrix
This adds a cogl_framebuffer_identity_matrix() method that can be used
to reset the current modelview matrix to the identity matrix.
Reviewed-by: Neil Roberts <neil linux intel com>
cogl/cogl-framebuffer.c | 8 ++++++++
cogl/cogl-framebuffer.h | 14 ++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index bc64106..f5cc877 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -1798,6 +1798,14 @@ cogl_framebuffer_pop_matrix (CoglFramebuffer *framebuffer)
}
void
+cogl_framebuffer_identity_matrix (CoglFramebuffer *framebuffer)
+{
+ CoglMatrixStack *modelview_stack =
+ _cogl_framebuffer_get_modelview_stack (framebuffer);
+ _cogl_matrix_stack_load_identity (modelview_stack);
+}
+
+void
cogl_framebuffer_scale (CoglFramebuffer *framebuffer,
float x,
float y,
diff --git a/cogl/cogl-framebuffer.h b/cogl/cogl-framebuffer.h
index b86d273..c39350d 100644
--- a/cogl/cogl-framebuffer.h
+++ b/cogl/cogl-framebuffer.h
@@ -152,6 +152,20 @@ cogl_framebuffer_push_matrix (CoglFramebuffer *framebuffer);
void
cogl_framebuffer_pop_matrix (CoglFramebuffer *framebuffer);
+#define cogl_framebuffer_identity_matrix \
+ cogl_framebuffer_identity_matrix_EXP
+/**
+ * cogl_framebuffer_identity_matrix:
+ * @framebuffer: A #CoglFramebuffer pointer
+ *
+ * Resets the current model-view matrix to the identity matrix.
+ *
+ * Since: 1.10
+ * Stability: unstable
+ */
+void
+cogl_framebuffer_identity_matrix (CoglFramebuffer *framebuffer);
+
#define cogl_framebuffer_scale cogl_framebuffer_scale_EXP
/**
* cogl_framebuffer_scale:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]