diff options
author | David Robillard <d@drobilla.net> | 2012-05-02 20:49:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-02 20:49:13 +0000 |
commit | f027f3810baaa93bd4b8273b774421053e8e1cac (patch) | |
tree | 8fad8d4ffe6c1e37962b45ce66333c8d9eae5c94 /pugl/pugl_win.cpp | |
parent | 56cc27fe0eec999f5e01e9b40f5bd16929713eed (diff) | |
download | pugl-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_win.cpp')
-rw-r--r-- | pugl/pugl_win.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/pugl/pugl_win.cpp b/pugl/pugl_win.cpp index 3128daf..cc69036 100644 --- a/pugl/pugl_win.cpp +++ b/pugl/pugl_win.cpp @@ -21,7 +21,6 @@ #include <windows.h> #include <windowsx.h> #include <GL/gl.h> -#include <GL/glu.h> #include "pugl_internal.h" @@ -123,21 +122,13 @@ puglReshape(PuglView* view, int width, int height) wglMakeCurrent(view->impl->hdc, view->impl->hglrc); if (view->reshapeFunc) { - // User provided a reshape function, defer to that view->reshapeFunc(view, width, height); } else { - // No custom reshape function, do something reasonable - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(45.0f, view->width/(float)view->height, 1.0f, 10.0f); - glViewport(0, 0, view->width, view->height); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); + puglDefaultReshape(view, width, height); } - view->width = width; - view->height = height; + view->width = width; + view->height = height; } void |