aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/pugl_cairo_test.c6
-rw-r--r--test/pugl_test.c29
2 files changed, 21 insertions, 14 deletions
diff --git a/test/pugl_cairo_test.c b/test/pugl_cairo_test.c
index a16c821..3cdf904 100644
--- a/test/pugl_cairo_test.c
+++ b/test/pugl_cairo_test.c
@@ -202,7 +202,8 @@ main(int argc, char** argv)
}
}
- PuglView* view = puglInit(NULL, NULL);
+ PuglWorld* world = puglNewWorld();
+ PuglView* view = puglNewView(world);
puglInitWindowClass(view, "PuglCairoTest");
puglInitWindowSize(view, 512, 512);
puglInitWindowMinSize(view, 256, 256);
@@ -233,6 +234,7 @@ main(int argc, char** argv)
}
}
- puglDestroy(view);
+ puglFreeView(view);
+ puglFreeWorld(world);
return 0;
}
diff --git a/test/pugl_test.c b/test/pugl_test.c
index b8a0a42..b012868 100644
--- a/test/pugl_test.c
+++ b/test/pugl_test.c
@@ -34,16 +34,17 @@
typedef struct
{
- bool continuous;
- int quit;
- float xAngle;
- float yAngle;
- float dist;
- double lastMouseX;
- double lastMouseY;
- double lastDrawTime;
- unsigned framesDrawn;
- bool mouseEntered;
+ PuglWorld* world;
+ bool continuous;
+ int quit;
+ float xAngle;
+ float yAngle;
+ float dist;
+ double lastMouseX;
+ double lastMouseY;
+ double lastDrawTime;
+ unsigned framesDrawn;
+ bool mouseEntered;
} PuglTestApp;
static void
@@ -178,7 +179,9 @@ main(int argc, char** argv)
}
}
- PuglView* view = puglInit(NULL, NULL);
+ app.world = puglNewWorld();
+
+ PuglView* view = puglNewView(app.world);
puglInitWindowClass(view, "PuglTest");
puglInitWindowSize(view, 512, 512);
puglInitWindowMinSize(view, 256, 256);
@@ -224,6 +227,8 @@ main(int argc, char** argv)
}
}
- puglDestroy(view);
+ puglFreeView(view);
+ puglFreeWorld(app.world);
+
return 0;
}