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>
)
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 */