summaryrefslogtreecommitdiffstats
path: root/libdimension/tests
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/tests
parent6b1fcde7af64ca81079dffe1d62096228693b5d6 (diff)
downloaddimension-942fd9ff8e267b361de580a95fa247e486120891.tar.xz
Replace sky_spheres with a single background pigment.
Diffstat (limited to 'libdimension/tests')
-rw-r--r--libdimension/tests/render.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libdimension/tests/render.c b/libdimension/tests/render.c
index 577fa6a..ae0301f 100644
--- a/libdimension/tests/render.c
+++ b/libdimension/tests/render.c
@@ -36,9 +36,6 @@ dmnsn_test_scene_set_defaults(dmnsn_scene *scene)
dmnsn_color_from_sRGB(dmnsn_color_mul(0.7, dmnsn_white))
)
);
-
- /* Background color */
- scene->background = dmnsn_clear;
}
static void
@@ -75,9 +72,8 @@ dmnsn_test_scene_add_camera(dmnsn_scene *scene)
}
static void
-dmnsn_test_scene_add_sky_sphere(dmnsn_scene *scene)
+dmnsn_test_scene_add_background(dmnsn_scene *scene)
{
- scene->sky_sphere = dmnsn_new_sky_sphere();
dmnsn_pattern *sky_gradient = dmnsn_new_gradient_pattern(dmnsn_y);
dmnsn_map *sky_gradient_pigment_map = dmnsn_new_pigment_map();
dmnsn_pigment_map_add_color(sky_gradient_pigment_map, 0.0, dmnsn_orange);
@@ -85,10 +81,9 @@ dmnsn_test_scene_add_sky_sphere(dmnsn_scene *scene)
dmnsn_new_color5(0.0, 0.1, 0.2, 0.1, 0.0)
);
dmnsn_pigment_map_add_color(sky_gradient_pigment_map, 0.35, background);
- dmnsn_pigment *sky_pigment =
+ scene->background =
dmnsn_new_pigment_map_pigment(sky_gradient, sky_gradient_pigment_map,
DMNSN_PIGMENT_MAP_SRGB);
- dmnsn_array_push(scene->sky_sphere->pigments, &sky_pigment);
}
static void
@@ -283,7 +278,7 @@ dmnsn_new_test_scene(void)
dmnsn_test_scene_set_defaults(scene);
dmnsn_test_scene_add_canvas(scene);
dmnsn_test_scene_add_camera(scene);
- dmnsn_test_scene_add_sky_sphere(scene);
+ dmnsn_test_scene_add_background(scene);
dmnsn_test_scene_add_lights(scene);
dmnsn_test_scene_add_objects(scene);
return scene;