summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-05-31 13:04:56 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-05-31 13:04:56 -0400
commit70373204b341fc91694c0293796230e447c51067 (patch)
tree7211994a4e89a77383a2c97afabb8488cdabc857 /libdimension
parent42be2e658987225458a98a54d5a9917c8d997457 (diff)
downloaddimension-70373204b341fc91694c0293796230e447c51067.tar.xz
scene: Put the light array on the pool.
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/scene.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdimension/scene.c b/libdimension/scene.c
index 3a73c48..4a083cf 100644
--- a/libdimension/scene.c
+++ b/libdimension/scene.c
@@ -30,12 +30,12 @@ static void
dmnsn_scene_cleanup(void *ptr)
{
dmnsn_scene *scene = ptr;
+
DMNSN_ARRAY_FOREACH (dmnsn_object **, object, scene->objects) {
dmnsn_delete_object(*object);
}
-
- dmnsn_delete_array(scene->lights);
dmnsn_delete_array(scene->objects);
+
dmnsn_delete_texture(scene->default_texture);
dmnsn_delete_pigment(scene->background);
}
@@ -55,7 +55,7 @@ dmnsn_new_scene(dmnsn_pool *pool)
scene->outer_width = 0;
scene->outer_height = 0;
scene->objects = DMNSN_NEW_ARRAY(dmnsn_object *);
- scene->lights = DMNSN_NEW_ARRAY(dmnsn_light *);
+ scene->lights = DMNSN_PALLOC_ARRAY(pool, dmnsn_light *);
scene->camera = NULL;
scene->quality = DMNSN_RENDER_FULL;
scene->reclimit = 5;