[cogl-debug] Adds a "client-side-matrices" Cogl debug option

This allows us to force Cogl to use the client side matrix stack even when
direct rendering.
This commit is contained in:
Robert Bragg 2009-06-05 13:50:00 +01:00
parent 7b85da8b28
commit f4516e4057
3 changed files with 6 additions and 3 deletions

View File

@ -39,7 +39,8 @@ typedef enum {
COGL_DEBUG_RECTANGLES = 1 << 7, COGL_DEBUG_RECTANGLES = 1 << 7,
COGL_DEBUG_HANDLE = 1 << 8, COGL_DEBUG_HANDLE = 1 << 8,
COGL_DEBUG_BLEND_STRINGS = 1 << 9, COGL_DEBUG_BLEND_STRINGS = 1 << 9,
COGL_DEBUG_DISABLE_BATCHING = 1 << 10 COGL_DEBUG_DISABLE_BATCHING = 1 << 10,
COGL_DEBUG_FORCE_CLIENT_SIDE_MATRICES = 1 << 11
} CoglDebugFlags; } CoglDebugFlags;
#ifdef COGL_ENABLE_DEBUG #ifdef COGL_ENABLE_DEBUG

View File

@ -320,7 +320,8 @@ _cogl_current_matrix_state_init (void)
ctx->matrix_mode = COGL_MATRIX_MODELVIEW; ctx->matrix_mode = COGL_MATRIX_MODELVIEW;
ctx->modelview_stack = NULL; ctx->modelview_stack = NULL;
if (ctx->indirect) if (ctx->indirect ||
cogl_debug_flags & COGL_DEBUG_FORCE_CLIENT_SIDE_MATRICES)
{ {
ctx->modelview_stack = ctx->modelview_stack =
_cogl_matrix_stack_new (); _cogl_matrix_stack_new ();

View File

@ -41,7 +41,8 @@ static const GDebugKey cogl_debug_keys[] = {
{ "rectangles", COGL_DEBUG_RECTANGLES }, { "rectangles", COGL_DEBUG_RECTANGLES },
{ "handle", COGL_DEBUG_HANDLE }, { "handle", COGL_DEBUG_HANDLE },
{ "blend-strings", COGL_DEBUG_BLEND_STRINGS }, { "blend-strings", COGL_DEBUG_BLEND_STRINGS },
{ "disable-batching", COGL_DEBUG_DISABLE_BATCHING } { "disable-batching", COGL_DEBUG_DISABLE_BATCHING },
{ "client-side-matrices", COGL_DEBUG_FORCE_CLIENT_SIDE_MATRICES }
}; };
static const gint n_cogl_debug_keys = G_N_ELEMENTS (cogl_debug_keys); static const gint n_cogl_debug_keys = G_N_ELEMENTS (cogl_debug_keys);