aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_osx.m
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r--pugl/pugl_osx.m15
1 files changed, 3 insertions, 12 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 3c5425e..2f4a0e9 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -93,22 +93,13 @@
int height = bounds.size.height;
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, width/(float)height, 1.0f, 10.0f);
- glViewport(0, 0, width, height);
-
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
+ puglDefaultReshape(view, width, height);
}
- view->width = width;
- view->height = height;
- view->redisplay = true;
+ view->width = width;
+ view->height = height;
}
- (void) drawRect:(NSRect)rect