9e9c615e49
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.
87 lines
2.7 KiB
Makefile
87 lines
2.7 KiB
Makefile
libclutterincludedir = $(includedir)/clutter-@CLUTTER_API_VERSION@/cogl
|
|
libclutterinclude_HEADERS = \
|
|
$(top_builddir)/clutter/cogl/cogl.h \
|
|
$(top_builddir)/clutter/cogl/cogl-defines-gles.h \
|
|
$(top_builddir)/clutter/cogl/cogl-color.h \
|
|
$(top_builddir)/clutter/cogl/cogl-deprecated.h \
|
|
$(top_builddir)/clutter/cogl/cogl-fixed.h \
|
|
$(top_builddir)/clutter/cogl/cogl-offscreen.h \
|
|
$(top_builddir)/clutter/cogl/cogl-path.h \
|
|
$(top_builddir)/clutter/cogl/cogl-shader.h \
|
|
$(top_builddir)/clutter/cogl/cogl-texture.h \
|
|
$(top_builddir)/clutter/cogl/cogl-types.h \
|
|
$(top_builddir)/clutter/cogl/cogl-vertex-buffer.h \
|
|
$(top_builddir)/clutter/cogl/cogl-material.h \
|
|
$(top_builddir)/clutter/cogl/cogl-matrix.h \
|
|
$(top_builddir)/clutter/cogl/cogl-debug.h
|
|
|
|
INCLUDES = \
|
|
-I$(top_srcdir) \
|
|
-I$(top_srcdir)/clutter \
|
|
-I$(top_srcdir)/clutter/cogl \
|
|
-I$(top_srcdir)/clutter/cogl/common \
|
|
-I$(top_srcdir)/clutter/cogl/$(CLUTTER_COGL) \
|
|
-I$(top_builddir)/clutter \
|
|
-I$(top_builddir)/clutter/cogl \
|
|
-DG_LOG_DOMAIN=\"Cogl-GLES\" \
|
|
-DCLUTTER_COMPILATION \
|
|
$(CLUTTER_CFLAGS) \
|
|
$(CLUTTER_DEBUG_CFLAGS) \
|
|
$(MAINTAINER_CFLAGS) \
|
|
$(GCC_FLAGS)
|
|
|
|
LDADD = $(CLUTTER_LIBS)
|
|
|
|
noinst_LTLIBRARIES = libclutter-cogl.la
|
|
|
|
libclutter_cogl_la_SOURCES = \
|
|
$(top_builddir)/clutter/cogl/cogl.h \
|
|
$(top_builddir)/clutter/cogl/cogl-defines-gles.h \
|
|
$(top_builddir)/clutter/cogl/cogl-color.h \
|
|
$(top_builddir)/clutter/cogl/cogl-deprecated.h \
|
|
$(top_builddir)/clutter/cogl/cogl-fixed.h \
|
|
$(top_builddir)/clutter/cogl/cogl-offscreen.h \
|
|
$(top_builddir)/clutter/cogl/cogl-path.h \
|
|
$(top_builddir)/clutter/cogl/cogl-shader.h \
|
|
$(top_builddir)/clutter/cogl/cogl-texture.h \
|
|
$(top_builddir)/clutter/cogl/cogl-types.h \
|
|
$(top_builddir)/clutter/cogl/cogl-debug.h \
|
|
cogl-internal.h \
|
|
cogl-texture-private.h \
|
|
cogl-fbo.h \
|
|
cogl-context.h \
|
|
cogl.c \
|
|
cogl-primitives.c \
|
|
cogl-texture.c \
|
|
cogl-fbo.c \
|
|
cogl-context.c \
|
|
cogl-gles2-wrapper.h \
|
|
cogl-program.h \
|
|
cogl-program.c \
|
|
cogl-shader-private.h \
|
|
cogl-shader.c
|
|
|
|
if USE_GLES2_WRAPPER
|
|
libclutter_cogl_la_SOURCES += \
|
|
cogl-gles2-wrapper.c \
|
|
cogl-fixed-vertex-shader.h \
|
|
cogl-fixed-vertex-shader.c \
|
|
cogl-fixed-fragment-shader.h \
|
|
cogl-fixed-fragment-shader.c
|
|
endif
|
|
|
|
EXTRA_DIST = cogl-defines.h.in \
|
|
stringify.sh \
|
|
cogl-fixed-vertex-shader.glsl \
|
|
cogl-fixed-fragment-shader.glsl
|
|
|
|
libclutter_cogl_la_LIBADD = $(top_builddir)/clutter/cogl/common/libclutter-cogl-common.la
|
|
|
|
.glsl.h :
|
|
/bin/sh $(top_srcdir)/clutter/cogl/gles/stringify.sh -h $<
|
|
|
|
.glsl.c :
|
|
/bin/sh $(top_srcdir)/clutter/cogl/gles/stringify.sh $<
|
|
|
|
cogl-gles2-wrapper.lo : cogl-fixed-vertex-shader.h cogl-fixed-fragment-shader.h
|