summaryrefslogtreecommitdiff
path: root/cogl/cogl-debug.c
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2010-04-26 10:01:43 +0100
committerRobert Bragg <robert@linux.intel.com>2010-06-09 17:15:59 +0100
commitacc44161c108dafef63d730b585b4f68b935f6ad (patch)
tree23171e3b4972c746255c6dfdd0a6cca3def7c52b /cogl/cogl-debug.c
parent8ebf76a9a91da0bbbe1208366c1740f0c77d6392 (diff)
downloadcogl-acc44161c108dafef63d730b585b4f68b935f6ad.tar.gz
material: Adds backend abstraction for fragment processing
As part of an effort to improve the architecture of CoglMaterial internally this overhauls how we flush layer state to OpenGL by adding a formal backend abstraction for fragment processing and further formalizing the CoglTextureUnit abstraction. There are three backends: "glsl", "arbfp" and "fixed". The fixed backend uses the OpenGL fixed function APIs to setup the fragment processing, the arbfp backend uses code generation to handle fragment processing using an ARBfp program, and the GLSL backend is currently only there as a formality to handle user programs associated with a material. (i.e. the glsl backend doesn't yet support code generation) The GLSL backend has highest precedence, then arbfp and finally the fixed. If a backend can't support some particular CoglMaterial feature then it will fallback to the next backend. This adds three new COGL_DEBUG options: * "disable-texturing" as expected should disable all texturing * "disable-arbfp" always make the arbfp backend fallback * "disable-glsl" always make the glsl backend fallback * "show-source" show code generated by the arbfp/glsl backends
Diffstat (limited to 'cogl/cogl-debug.c')
-rw-r--r--cogl/cogl-debug.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/cogl/cogl-debug.c b/cogl/cogl-debug.c
index 46ab04cb..93049196 100644
--- a/cogl/cogl-debug.c
+++ b/cogl/cogl-debug.c
@@ -50,6 +50,7 @@ static const GDebugKey cogl_log_debug_keys[] = {
{ "draw", COGL_DEBUG_DRAW },
{ "opengl", COGL_DEBUG_OPENGL },
{ "pango", COGL_DEBUG_PANGO },
+ { "show-source", COGL_DEBUG_SHOW_SOURCE}
};
static const int n_cogl_log_debug_keys =
G_N_ELEMENTS (cogl_log_debug_keys);
@@ -61,7 +62,10 @@ static const GDebugKey cogl_behavioural_debug_keys[] = {
{ "disable-software-transform", COGL_DEBUG_DISABLE_SOFTWARE_TRANSFORM },
{ "force-scanline-paths", COGL_DEBUG_FORCE_SCANLINE_PATHS },
{ "dump-atlas-image", COGL_DEBUG_DUMP_ATLAS_IMAGE },
- { "disable-atlas", COGL_DEBUG_DISABLE_ATLAS }
+ { "disable-atlas", COGL_DEBUG_DISABLE_ATLAS },
+ { "disable-texturing", COGL_DEBUG_DISABLE_TEXTURING},
+ { "disable-arbfp", COGL_DEBUG_DISABLE_ARBFP},
+ { "disable-glsl", COGL_DEBUG_DISABLE_GLSL}
};
static const int n_cogl_behavioural_debug_keys =
G_N_ELEMENTS (cogl_behavioural_debug_keys);
@@ -115,6 +119,10 @@ _cogl_parse_debug_string (const char *value,
OPT ("force-scanline-paths:", "use a scanline based path rasterizer");
OPT ("dump-atlas-image:", "dump atlas changes to an image file");
OPT ("disable-atlas:", "disable texture atlasing");
+ OPT ("disable-texturing:", "disable texturing primitives");
+ OPT ("disable-arbfp:", "disable use of ARBfp");
+ OPT ("disable-glsl:", "disable use of GLSL");
+ OPT ("show-source:", "show generated ARBfp/GLSL");
OPT ("opengl:", "traces some select OpenGL calls");
g_printerr ("\n%28s\n", "Special debug values:");
OPT ("all:", "Enables all non-behavioural debug options");