diff options
author | David Robillard <d@drobilla.net> | 2014-08-27 07:09:58 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-08-27 07:09:58 +0000 |
commit | b4dbb3616865cd236cda4f2e4ac806b3b4840b29 (patch) | |
tree | 4a78f8298e42b95a074844e44d69a2446cb5eea3 /pugl/pugl_internal.h | |
parent | f25f829a3038db39c83ad8cc92dd5fdc4876751b (diff) | |
download | pugl-b4dbb3616865cd236cda4f2e4ac806b3b4840b29.tar.gz pugl-b4dbb3616865cd236cda4f2e4ac806b3b4840b29.tar.bz2 pugl-b4dbb3616865cd236cda4f2e4ac806b3b4840b29.zip |
Cairo support on X11.
Diffstat (limited to 'pugl/pugl_internal.h')
-rw-r--r-- | pugl/pugl_internal.h | 13 |
1 files changed, 12 insertions, 1 deletions
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; @@ -110,6 +113,12 @@ puglInitResizable(PuglView* view, bool resizable) } void +puglInitContextType(PuglView* view, PuglContextType type) +{ + view->ctx_type = type; +} + +void puglSetHandle(PuglView* view, PuglHandle handle) { view->handle = 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 |