[cogl/wip/virtual-framebuffer: 13/37] stash: Adds internal _cogl_framebuffer_push/pop_orthographic
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/virtual-framebuffer: 13/37] stash: Adds internal _cogl_framebuffer_push/pop_orthographic
- Date: Wed, 23 Nov 2011 16:59:49 +0000 (UTC)
commit 627b82323e3f64e9b33b61c5488280a68a7b1085
Author: Robert Bragg <robert linux intel com>
Date: Sun Nov 20 18:43:53 2011 +0000
stash: Adds internal _cogl_framebuffer_push/pop_orthographic
cogl/cogl-framebuffer.c | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index a950770..89bf638 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -1915,6 +1915,38 @@ cogl_framebuffer_orthographic (CoglFramebuffer *framebuffer,
}
void
+_cogl_framebuffer_push_orthographic (CoglFramebuffer *framebuffer,
+ float x_1,
+ float y_1,
+ float x_2,
+ float y_2,
+ float near,
+ float far)
+{
+ CoglMatrixStack *projection_stack =
+ _cogl_framebuffer_get_projection_stack (framebuffer);
+ _cogl_matrix_stack_push (projection_stack);
+ _cogl_matrix_stack_load_identity (projection_stack);
+ _cogl_matrix_stack_ortho (projection_stack,
+ x_1, x_2, y_2, y_1,
+ near,
+ far);
+
+ framebuffer->context->current_draw_buffer_changes |=
+ COGL_FRAMEBUFFER_STATE_PROJECTION;
+}
+
+void
+_cogl_framebuffer_pop_orthographic (CoglFramebuffer *framebuffer)
+{
+ CoglMatrixStack *projection_stack =
+ _cogl_framebuffer_get_projection_stack (framebuffer);
+ _cogl_matrix_stack_pop (projection_stack);
+ framebuffer->context->current_draw_buffer_changes |=
+ COGL_FRAMEBUFFER_STATE_PROJECTION;
+}
+
+void
cogl_framebuffer_get_modelview_matrix (CoglFramebuffer *framebuffer,
CoglMatrix *matrix)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]