From 69be0a7d6ed810faf6d5090c826df72c58b874f3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 27 Jan 2014 17:16:47 +0000 Subject: Require PUGL_VERBOSE to be defined for logging. Add X focus grab hack from Robin Gareus. --- pugl/pugl_internal.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pugl/pugl_internal.h') diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h index 88f59f2..74aae55 100644 --- a/pugl/pugl_internal.h +++ b/pugl/pugl_internal.h @@ -20,10 +20,25 @@ Note this file contains function definitions, so it must be compiled into the final binary exactly once. Each platform specific implementation file including it once should achieve this. + + If you are copying the pugl code into your source tree, the following + symbols can be defined to tweak pugl behaviour: + + PUGL_GRAB_FOCUS: Work around reparent keyboard issues by grabbing focus. + PUGL_VERBOSE: Print GL information to console. */ #include "pugl.h" +#ifdef PUGL_VERBOSE +# include +# define PUGL_LOG(str) fprintf(stderr, "pugl: " str) +# define PUGL_LOGF(fmt, ...) fprintf(stderr, "pugl: " fmt, __VA_ARGS__) +#else +# define PUGL_LOG(str) +# define PUGL_LOGF(fmt, ...) +#endif + void puglDefaultReshape(PuglView* view, int width, int height); typedef struct PuglInternalsImpl PuglInternals; -- cgit v1.2.3