From b4dbb3616865cd236cda4f2e4ac806b3b4840b29 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 27 Aug 2014 07:09:58 +0000 Subject: Cairo support on X11. --- pugl/pugl_internal.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'pugl/pugl_internal.h') diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h index b86533a..3db08f7 100644 --- a/pugl/pugl_internal.h +++ b/pugl/pugl_internal.h @@ -25,7 +25,9 @@ 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. + PUGL_VERBOSE: Print graphics information to console. + PUGL_HAVE_CAIRO: Include Cairo support code. + PUGL_HAVE_GL: Include OpenGL support code. */ #include "pugl.h" @@ -55,6 +57,7 @@ struct PuglViewImpl { PuglInternals* impl; PuglNativeWindow parent; + PuglContextType ctx_type; int width; int height; @@ -109,6 +112,12 @@ puglInitResizable(PuglView* view, bool resizable) view->resizable = resizable; } +void +puglInitContextType(PuglView* view, PuglContextType type) +{ + view->ctx_type = type; +} + void puglSetHandle(PuglView* view, PuglHandle handle) { @@ -136,6 +145,7 @@ puglGetModifiers(PuglView* view) void puglDefaultReshape(PuglView* view, int width, int height) { +#ifdef PUGL_HAVE_GL glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, width, height, 0, 0, 1); @@ -143,6 +153,7 @@ puglDefaultReshape(PuglView* view, int width, int height) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); +#endif return; // unused -- cgit v1.2.3