mutter/clutter/cogl/common
Emmanuele Bassi 605dfb8fd0 Add runtime debug messages for COGL
Clutter is able to show debug messages written using the CLUTTER_NOTE()
macro at runtime, either by using an environment variable:

  CLUTTER_DEBUG=...

or by using a command line switch:

  --clutter-debug=...
  --clutter-no-debug=...

Both are parsed during the initialization process by using the
GOption API.

COGL would benefit from having the same support.

In order to do this, we need a cogl_get_option_group() function in
COGL that sets up a GOptionGroup for COGL and adds a pre-parse hook
that will check the COGL_DEBUG environment variable. The OptionGroup
will also install two command line switches:

  --cogl-debug
  --cogl-no-debug

With the same semantics of the Clutter ones.

During Clutter initialization, the COGL option group will be attached
to the GOptionContext used to parse the command line options passed
to a Clutter application.

Every debug message written using:

  COGL_NOTE (SECTION, "message format", arguments);

Will then be printed only if SECTION was enabled at runtime.

This whole machinery, like the equivalent one in Clutter, depends on
a compile time switch, COGL_ENABLE_DEBUG, which is enabled at the same
time as CLUTTER_ENABLE_DEBUG. Having two different symbols allows
greater granularity.
2009-02-23 13:00:52 +00:00
..
cogl-bitmap-fallback.c 2008-06-30 Emmanuele Bassi <ebassi@openedhand.com> 2008-06-30 14:20:46 +00:00
cogl-bitmap-pixbuf.c Add API for extracting image size from a file 2009-01-12 16:52:20 +00:00
cogl-bitmap.c Add API for extracting image size from a file 2009-01-12 16:52:20 +00:00
cogl-bitmap.h Add API for extracting image size from a file 2009-01-12 16:52:20 +00:00
cogl-clip-stack.c [Cogl] the cogl_get_*_matrix functions now work with CoglMatrix types 2009-02-23 10:49:35 +00:00
cogl-clip-stack.h Bug 1172 - Disjoint paths and clip to path 2008-12-04 13:45:09 +00:00
cogl-color.c [cogl-color.c] #include fix for the cogl_set_source_color prototype 2009-02-18 16:19:14 +00:00
cogl-debug.c Add runtime debug messages for COGL 2009-02-23 13:00:52 +00:00
cogl-fixed.c Improve accuracy of clutter_sinx() 2009-01-22 15:59:23 +00:00
cogl-handle.h Fallout from cogl-material merge 2009-01-27 16:02:04 +00:00
cogl-material-private.h [Cogl] Fixes automatic handling of the GL blend enable state. 2009-02-23 10:49:35 +00:00
cogl-material.c [cogl-material] Always glBindTexture when flushing material state 2009-02-23 10:49:35 +00:00
cogl-matrix.c [Cogl] the cogl_get_*_matrix functions now work with CoglMatrix types 2009-02-23 10:49:35 +00:00
cogl-primitives.c Fix a variable masking warning 2009-01-29 13:31:51 +00:00
cogl-primitives.h Fix the Cogl primitives for the GLES backend 2009-01-24 00:26:51 +00:00
cogl-util.c [cogl] Provide GTypes for COGL types 2009-02-19 12:02:42 +00:00
cogl-util.h Merged clutter-ivan branch into trunk. 2008-04-25 13:37:36 +00:00
cogl-vertex-buffer-private.h Renames the mesh api to the "vertex buffer api". 2009-01-20 22:29:35 +00:00
cogl-vertex-buffer.c [Cogl] Remove a debugging assert that was triggering on false positives 2009-02-23 10:49:35 +00:00
Makefile.am Add runtime debug messages for COGL 2009-02-23 13:00:52 +00:00
stb_image.c Merged clutter-ivan branch into trunk. 2008-04-25 13:37:36 +00:00