cogl-framebuffer: Separate the draw and read buffer
authorNeil Roberts <neil@linux.intel.com>
Wed, 2 Feb 2011 14:23:53 +0000 (14:23 +0000)
committerNeil Roberts <neil@linux.intel.com>
Tue, 15 Feb 2011 12:10:54 +0000 (12:10 +0000)
commite57aa3ca3ee88f117e72e668ab3e762b6ea731ba
tree26388927b6b9af363d94da768898c550c8f961ec
parentbdb309cbd676ea2b710b57154b68c190e9e5fa9a
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.
clutter/cogl/cogl/cogl-attribute.c
clutter/cogl/cogl/cogl-clip-stack.c
clutter/cogl/cogl/cogl-clip-state.c
clutter/cogl/cogl/cogl-framebuffer-private.h
clutter/cogl/cogl/cogl-framebuffer.c
clutter/cogl/cogl/cogl-journal.c
clutter/cogl/cogl/cogl-matrix-stack.c
clutter/cogl/cogl/cogl-primitives.c
clutter/cogl/cogl/cogl-texture.c
clutter/cogl/cogl/cogl.c
clutter/cogl/cogl/cogl2-path.c