From a739e6116f026e2fe334f447082616712a1cfd78 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 13 May 2014 15:30:36 +0000 Subject: Fix non-extensible puglInit API. Fix memory leak. --- pugl_test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pugl_test.c') diff --git a/pugl_test.c b/pugl_test.c index b9a54f5..9282420 100644 --- a/pugl_test.c +++ b/pugl_test.c @@ -173,7 +173,10 @@ main(int argc, char** argv) } } - PuglView* view = puglCreate(0, "Pugl Test", 512, 512, resizable, true); + PuglView* view = puglInit(NULL, NULL); + puglInitWindowSize(view, 512, 512); + puglInitResizable(view, resizable); + puglIgnoreKeyRepeat(view, ignoreKeyRepeat); puglSetKeyboardFunc(view, onKeyboard); puglSetMotionFunc(view, onMotion); @@ -184,6 +187,9 @@ main(int argc, char** argv) puglSetReshapeFunc(view, onReshape); puglSetCloseFunc(view, onClose); + puglCreateWindow(view, "Pugl Test"); + puglShowWindow(view); + while (!quit) { puglProcessEvents(view); } -- cgit v1.2.3