summaryrefslogtreecommitdiff
path: root/cogl/cogl-debug.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2012-07-31 16:30:33 +0100
committerNeil Roberts <neil@linux.intel.com>2012-08-01 11:41:59 +0100
commitec69c2dc576c78664e0b73879365cb7414ecf441 (patch)
tree70da266f8e11f692fdfe42a73dfab56c37dae724 /cogl/cogl-debug.c
parentf05d6923fff28b1d167a391d486e319743c49215 (diff)
downloadcogl-ec69c2dc576c78664e0b73879365cb7414ecf441.tar.gz
Add conf vars to trick Cogl to think extensions are disabled
This adds two new configuration environment variables: COGL_DISABLE_GL_EXTENSIONS and COGL_OVERRIDE_GL_VERSION The variables can also be set in the cogl.conf file using the same names. The first one is a list of GL extension names separated by commas. When set Cogl will assume any extension listed here is not available by removing it from the string returned from glGetString(GL_EXTENSIONS). If the string is set in both the config file and the environment variable then the union of the two lists will be used. The second overrides the value returned from glGetString(GL_VERSION). If the string is set in both places the version from the environment variable will take priority. These are sometimes useful for debugging Cogl to test the various combinations of extensions. It could also be useful to work around driver bugs where an extension is badly supported and it would be better not to use it. The variables in cogl-config that just set a global char * variable have been put together in an array instead of having a separate blob of code for each one in order to make it simpler to add new variables. Reviewed-by: Robert Bragg <robert@linux.intel.com>
Diffstat (limited to 'cogl/cogl-debug.c')
-rw-r--r--cogl/cogl-debug.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cogl/cogl-debug.c b/cogl/cogl-debug.c
index 5161b4cd..1a7e7e61 100644
--- a/cogl/cogl-debug.c
+++ b/cogl/cogl-debug.c
@@ -182,6 +182,16 @@ _cogl_parse_debug_string (const char *value,
OPT (IGNORED, "ignored", "verbose", "ignored", \
N_("Enables all non-behavioural debug options"));
#undef OPT
+
+ g_printerr ("\n"
+ "%28s\n"
+ " COGL_DISABLE_GL_EXTENSIONS: %s\n"
+ " COGL_OVERRIDE_GL_VERSION: %s\n",
+ _("Additional environment variables:"),
+ _("Comma-separated list of GL extensions to pretend are "
+ "disabled"),
+ _("Override the GL version that Cogl will assume the driver "
+ "supports"));
exit (1);
}
else