summaryrefslogtreecommitdiff
path: root/cogl/cogl-matrix-stack.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-02-02 14:23:53 +0000
committerNeil Roberts <neil@linux.intel.com>2011-02-15 12:10:54 +0000
commita067e7a16b52488b0bf66845959d649de4ca0d43 (patch)
treed72c423de08237cc3e9c01956ee831c047eadde5 /cogl/cogl-matrix-stack.c
parent4d6754ed0fc9202602241aa0c656befce651033e (diff)
downloadcogl-a067e7a16b52488b0bf66845959d649de4ca0d43.tar.gz
cogl-framebuffer: Separate the draw and read buffer
The current framebuffer is now internally separated so that there can be a different draw and read buffer. This is required to use the GL_EXT_framebuffer_blit extension. The current draw and read buffers are stored as a pair in a single stack so that pushing the draw and read buffer is done simultaneously with the new _cogl_push_framebuffers internal function. Calling cogl_pop_framebuffer will restore both the draw and read buffer to the previous state. The public cogl_push_framebuffer function is layered on top of the new function so that it just pushes the same buffer for both drawing and reading. When flushing the framebuffer state, the cogl_framebuffer_flush_state function now tackes a pointer to both the draw and the read buffer. Anywhere that was just flushing the state for the current framebuffer with _cogl_get_framebuffer now needs to call both _cogl_get_draw_buffer and _cogl_get_read_buffer.
Diffstat (limited to 'cogl/cogl-matrix-stack.c')
-rw-r--r--cogl/cogl-matrix-stack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cogl/cogl-matrix-stack.c b/cogl/cogl-matrix-stack.c
index d0d34ef9..fd654124 100644
--- a/cogl/cogl-matrix-stack.c
+++ b/cogl/cogl-matrix-stack.c
@@ -434,7 +434,7 @@ _cogl_matrix_stack_prepare_for_flush (CoglMatrixStack *stack,
* always render upside down to offscreen buffers.
*/
if (mode == COGL_MATRIX_PROJECTION &&
- cogl_is_offscreen (_cogl_get_framebuffer ()))
+ cogl_is_offscreen (_cogl_get_draw_buffer ()))
{
CoglMatrix flipped_projection;
CoglMatrix *projection =