From f4516e4057f0b7f06e1cc6b26e6de7e846644678 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Fri, 5 Jun 2009 13:50:00 +0100 Subject: [PATCH] [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. --- cogl-debug.h | 3 ++- common/cogl-current-matrix.c | 3 ++- common/cogl-debug.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cogl-debug.h b/cogl-debug.h index 1b42358dc..c67f37568 100644 --- a/cogl-debug.h +++ b/cogl-debug.h @@ -39,7 +39,8 @@ typedef enum { COGL_DEBUG_RECTANGLES = 1 << 7, COGL_DEBUG_HANDLE = 1 << 8, 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; #ifdef COGL_ENABLE_DEBUG diff --git a/common/cogl-current-matrix.c b/common/cogl-current-matrix.c index 7c3bc57a3..7c2372134 100644 --- a/common/cogl-current-matrix.c +++ b/common/cogl-current-matrix.c @@ -320,7 +320,8 @@ _cogl_current_matrix_state_init (void) ctx->matrix_mode = COGL_MATRIX_MODELVIEW; ctx->modelview_stack = NULL; - if (ctx->indirect) + if (ctx->indirect || + cogl_debug_flags & COGL_DEBUG_FORCE_CLIENT_SIDE_MATRICES) { ctx->modelview_stack = _cogl_matrix_stack_new (); diff --git a/common/cogl-debug.c b/common/cogl-debug.c index 7eb8561c1..53236cdbe 100644 --- a/common/cogl-debug.c +++ b/common/cogl-debug.c @@ -41,7 +41,8 @@ static const GDebugKey cogl_debug_keys[] = { { "rectangles", COGL_DEBUG_RECTANGLES }, { "handle", COGL_DEBUG_HANDLE }, { "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);