[cogl] Removes the cogl-current-matrix abstraction
The indirection through this API isn't necessary since we no longer arbitrate between the OpenGL matrix API and Cogl's client side API. Also it doesn't help to maintain an OpenGL style matrix mode API for internal use since it's awkward to keep restoring the MODELVIEW mode and easy enough to directly work with the matrix stacks of interest. This replaces use of the _cogl_current_matrix API with direct use of the _cogl_matrix_stack API. All the unused cogl_current_matrix API is removed and the matrix utility code left in cogl-current-matrix.c was moved to cogl.c.
This commit is contained in:
@ -321,9 +321,12 @@ _cogl_clip_stack_rebuild (void)
|
||||
gint scissor_y0 = 0;
|
||||
gint scissor_x1 = G_MAXINT;
|
||||
gint scissor_y1 = G_MAXINT;
|
||||
CoglMatrixStack *modelview_stack;
|
||||
|
||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||
|
||||
modelview_stack = ctx->modelview_stack;
|
||||
|
||||
/* The current primitive journal does not support tracking changes to the
|
||||
* clip stack... */
|
||||
_cogl_journal_flush ();
|
||||
@ -354,8 +357,8 @@ _cogl_clip_stack_rebuild (void)
|
||||
{
|
||||
CoglClipStackEntryPath *path = (CoglClipStackEntryPath *) entry;
|
||||
|
||||
cogl_push_matrix ();
|
||||
_cogl_set_matrix (&path->matrix);
|
||||
_cogl_matrix_stack_push (modelview_stack);
|
||||
_cogl_matrix_stack_set (modelview_stack, &path->matrix);
|
||||
|
||||
_cogl_add_path_to_stencil_buffer (path->path_nodes_min,
|
||||
path->path_nodes_max,
|
||||
@ -363,7 +366,7 @@ _cogl_clip_stack_rebuild (void)
|
||||
path->path,
|
||||
using_stencil_buffer);
|
||||
|
||||
cogl_pop_matrix ();
|
||||
_cogl_matrix_stack_pop (modelview_stack);
|
||||
|
||||
using_stencil_buffer = TRUE;
|
||||
|
||||
@ -374,8 +377,8 @@ _cogl_clip_stack_rebuild (void)
|
||||
{
|
||||
CoglClipStackEntryRect *rect = (CoglClipStackEntryRect *) entry;
|
||||
|
||||
cogl_push_matrix ();
|
||||
_cogl_set_matrix (&rect->matrix);
|
||||
_cogl_matrix_stack_push (modelview_stack);
|
||||
_cogl_matrix_stack_set (modelview_stack, &rect->matrix);
|
||||
|
||||
/* If this is the first entry and we support clip planes then use
|
||||
that instead */
|
||||
@ -399,7 +402,7 @@ _cogl_clip_stack_rebuild (void)
|
||||
using_stencil_buffer = TRUE;
|
||||
}
|
||||
|
||||
cogl_pop_matrix ();
|
||||
_cogl_matrix_stack_pop (modelview_stack);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user