From f027f3810baaa93bd4b8273b774421053e8e1cac Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 2 May 2012 20:49:13 +0000 Subject: Remove GLU dependency. Fix compilation errors on X11. Make default resize function set up a 2D view. Set appropriate reshape callback in pugl_test. --- pugl/pugl_internal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'pugl/pugl_internal.h') 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 @@ -64,6 +64,18 @@ puglGetModifiers(PuglView* view) return view->mods; } +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) { -- cgit v1.2.3