1
0
Fork 0

cogl-framebuffer: Flush journal when creating fbo

Since framebuffer state is not flushed prior to replaying the journal,
the trick of marking the framebuffer dirty prior to calling
glBindFramebuffer() doesn't work... the outstanding journal entries
will get replayed to the newly created framebuffer.

Fix this by flushing the journal as well.

http://bugzilla.openedhand.com/show_bug.cgi?id=2110

Signed-off-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Owen W. Taylor 2010-05-08 16:58:14 -04:00 committed by Robert Bragg
parent 11532f79ec
commit 582bd409dd

View file

@ -273,8 +273,11 @@ try_creating_fbo (CoglOffscreen *offscreen,
)
return FALSE;
/* We are about to generate and bind a new fbo, so when next flushing the
* journal, we will need to rebind the current framebuffer... */
/* We are about to generate and bind a new fbo, so we pretend to change framebuffer
* state so that the old framebuffer will be rebound again before drawing.
* The framebuffer state can't be changed while their are active entries, so flush
* first. */
_cogl_journal_flush ();
ctx->dirty_bound_framebuffer = 1;
/* Generate framebuffer */