mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
Flush the journal before changing the projection
Since the projection matrix isn't tracked in the journal and since our software transform of vertices as we log into the journal doesn't include the projective transform we need to make sure we flush all primitives in the journal before ever changing the projection. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
ee01fd263a
commit
89fd2edeb0
15
cogl/cogl.c
15
cogl/cogl.c
@ -826,6 +826,10 @@ cogl_frustum (float left,
|
||||
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
|
||||
/* XXX: The projection matrix isn't currently tracked in the journal
|
||||
* so we need to flush all journaled primitives first... */
|
||||
cogl_flush ();
|
||||
|
||||
_cogl_matrix_stack_load_identity (projection_stack);
|
||||
|
||||
_cogl_matrix_stack_frustum (projection_stack,
|
||||
@ -851,6 +855,10 @@ cogl_ortho (float left,
|
||||
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
|
||||
/* XXX: The projection matrix isn't currently tracked in the journal
|
||||
* so we need to flush all journaled primitives first... */
|
||||
cogl_flush ();
|
||||
|
||||
cogl_matrix_init_identity (&ortho);
|
||||
cogl_matrix_ortho (&ortho, left, right, bottom, top, z_near, z_far);
|
||||
_cogl_matrix_stack_set (projection_stack, &ortho);
|
||||
@ -888,10 +896,13 @@ cogl_set_projection_matrix (CoglMatrix *matrix)
|
||||
{
|
||||
CoglMatrixStack *projection_stack =
|
||||
_cogl_framebuffer_get_projection_stack (cogl_get_draw_framebuffer ());
|
||||
|
||||
/* XXX: The projection matrix isn't currently tracked in the journal
|
||||
* so we need to flush all journaled primitives first... */
|
||||
cogl_flush ();
|
||||
|
||||
_cogl_matrix_stack_set (projection_stack, matrix);
|
||||
|
||||
/* FIXME: Update the inverse projection matrix!! Presumably use
|
||||
* of clip planes must currently be broken if this API is used. */
|
||||
_COGL_MATRIX_DEBUG_PRINT (matrix);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user