Go to file
Emmanuele Bassi 9e9c615e49 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
common Add runtime debug messages for COGL 2009-02-23 13:00:52 +00:00
doc/reference/cogl [docs] Rename cogl-docs from sgml to xml 2009-02-20 12:02:31 +00:00
gl Add runtime debug messages for COGL 2009-02-23 13:00:52 +00:00
gles Add runtime debug messages for COGL 2009-02-23 13:00:52 +00:00
cogl-color.h [docs] Various gtk-doc updates for Cogl 2009-02-09 14:33:14 +00:00
cogl-debug.h Add runtime debug messages for COGL 2009-02-23 13:00:52 +00:00
cogl-deprecated.h 2008-11-12 Emmanuele Bassi <ebassi@linux.intel.com> 2008-11-12 13:57:58 +00:00
cogl-fixed.h [Automatic fixed-to-float.sh change] Applies a number fixed to float patches 2009-01-20 16:20:54 +00:00
cogl-material.h [cogl] Add cogl_is_material to cogl-material.h 2009-02-19 11:55:54 +00:00
cogl-matrix.h [Cogl] the cogl_get_*_matrix functions now work with CoglMatrix types 2009-02-23 10:49:35 +00:00
cogl-offscreen.h 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> 2008-10-30 17:57:41 +00:00
cogl-path.h Changes cogl_rectangle to take x1, y1, x2, y2 args not x1, y1, width, height 2009-01-28 17:20:15 +00:00
cogl-shader.h 2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com> 2008-11-18 15:21:02 +00:00
cogl-texture.h Fully integrates CoglMaterial throughout the rest of Cogl 2009-01-27 14:26:39 +00:00
cogl-types.h [cogl] Provide GTypes for COGL types 2009-02-19 12:02:42 +00:00
cogl-vertex-buffer.h [docs] Various gtk-doc updates for Cogl 2009-02-09 14:33:14 +00:00
cogl.h.in Add runtime debug messages for COGL 2009-02-23 13:00:52 +00:00
Makefile.am [build] Add cogl.h to the built sources list 2009-02-12 12:42:58 +00:00
TODO Merged clutter-ivan branch into trunk. 2008-04-25 13:37:36 +00:00