aboutsummaryrefslogtreecommitdiff
path: root/test/pugl_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/pugl_test.c')
-rw-r--r--test/pugl_test.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/pugl_test.c b/test/pugl_test.c
index 12ce529..0470586 100644
--- a/test/pugl_test.c
+++ b/test/pugl_test.c
@@ -48,6 +48,10 @@ onReshape(PuglView* view, int width, int height)
{
(void)view;
+ glEnable(GL_DEPTH_TEST);
+ glDepthFunc(GL_LESS);
+ glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
+
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glViewport(0, 0, width, height);
@@ -188,12 +192,6 @@ main(int argc, char** argv)
return 1;
}
- puglEnterContext(view, false);
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LESS);
- glClearColor(0.2f, 0.2f, 0.2f, 1.0f);
- puglLeaveContext(view, false);
-
puglShowWindow(view);
PuglFpsPrinter fpsPrinter = { puglGetTime(view) };