aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-02 20:49:13 +0000
committerDavid Robillard <d@drobilla.net>2012-05-02 20:49:13 +0000
commitf027f3810baaa93bd4b8273b774421053e8e1cac (patch)
tree8fad8d4ffe6c1e37962b45ce66333c8d9eae5c94 /pugl/pugl_internal.h
parent56cc27fe0eec999f5e01e9b40f5bd16929713eed (diff)
downloadpugl-f027f3810baaa93bd4b8273b774421053e8e1cac.tar.gz
pugl-f027f3810baaa93bd4b8273b774421053e8e1cac.tar.bz2
pugl-f027f3810baaa93bd4b8273b774421053e8e1cac.zip
Remove GLU dependency.
Fix compilation errors on X11. Make default resize function set up a 2D view. Set appropriate reshape callback in pugl_test.
Diffstat (limited to 'pugl/pugl_internal.h')
-rw-r--r--pugl/pugl_internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/pugl/pugl_internal.h b/pugl/pugl_internal.h
index 5235db3..981c0fb 100644
--- a/pugl/pugl_internal.h
+++ b/pugl/pugl_internal.h
@@ -65,6 +65,18 @@ puglGetModifiers(PuglView* view)
}
void
+puglDefaultReshape(PuglView* view, int width, int height)
+{
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(0, width, height, 0, 0, 1);
+ glViewport(0, 0, width, height);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+}
+
+void
puglIgnoreKeyRepeat(PuglView* view, bool ignore)
{
view->ignoreKeyRepeat = ignore;