summaryrefslogtreecommitdiffstats
path: root/libdimension/scene.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-08-21 13:24:13 -0600
committerTavian Barnes <tavianator@gmail.com>2011-08-21 13:24:13 -0600
commit942fd9ff8e267b361de580a95fa247e486120891 (patch)
tree683835731d05db901d98d10ba0023bb1ef3fb285 /libdimension/scene.c
parent6b1fcde7af64ca81079dffe1d62096228693b5d6 (diff)
downloaddimension-942fd9ff8e267b361de580a95fa247e486120891.tar.xz
Replace sky_spheres with a single background pigment.
Diffstat (limited to 'libdimension/scene.c')
-rw-r--r--libdimension/scene.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libdimension/scene.c b/libdimension/scene.c
index dc62799..ff2ff62 100644
--- a/libdimension/scene.c
+++ b/libdimension/scene.c
@@ -32,8 +32,7 @@ dmnsn_new_scene(void)
{
dmnsn_scene *scene = dmnsn_malloc(sizeof(dmnsn_scene));
- scene->background = dmnsn_black;
- scene->sky_sphere = NULL;
+ scene->background = NULL;
scene->default_texture = dmnsn_new_texture();
scene->default_interior = dmnsn_new_interior();
scene->canvas = NULL;
@@ -71,7 +70,7 @@ dmnsn_delete_scene(dmnsn_scene *scene)
dmnsn_delete_camera(scene->camera);
dmnsn_delete_interior(scene->default_interior);
dmnsn_delete_texture(scene->default_texture);
- dmnsn_delete_sky_sphere(scene->sky_sphere);
+ dmnsn_delete_pigment(scene->background);
dmnsn_free(scene);
}
}
@@ -89,11 +88,9 @@ dmnsn_initialize_scene(dmnsn_scene *scene)
scene->outer_height = scene->canvas->height;
}
- dmnsn_initialize_texture(scene->default_texture);
+ dmnsn_initialize_pigment(scene->background);
- if (scene->sky_sphere) {
- dmnsn_initialize_sky_sphere(scene->sky_sphere);
- }
+ dmnsn_initialize_texture(scene->default_texture);
DMNSN_ARRAY_FOREACH (dmnsn_object **, object, scene->objects) {
dmnsn_texture_cascade(scene->default_texture, &(*object)->texture);