aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-02-21 14:42:42 +0100
committerJulian T <julian@jtle.dk>2020-02-21 14:42:42 +0100
commit9b40029e42f994aeff59ecc44a6d3b8fba93071d (patch)
treec133f8f6190b445560c4d8438ba89d7caaa0a7cd /main.c
parent623fee395425ab33f14fb9cd8ffa790e362f59d7 (diff)
Pretty realistic colors
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index 011f2c1..0f0103a 100644
--- a/main.c
+++ b/main.c
@@ -19,6 +19,9 @@ int main()
s.objects = NULL;
s.lights = NULL;
+ material_t m;
+ vector_set(&m.color, 0, 1, 0);
+
vector_set(&s.view.position, 0, 15, 10);
vector_set(&s.view.target, 0, 0, 0);
s.view.width = TESTW;
@@ -27,8 +30,8 @@ int main()
viewpoint_init(&s.view);
// Setup plane
- add_sphere(&s, vector_set(NULL, 0, 0, 5), 5);
- add_sphere(&s, vector_set(NULL, 10, 0, 5), 5);
+ add_sphere(&s, vector_set(NULL, 0, 0, 5), 5, &m);
+ //add_sphere(&s, vector_set(NULL, 10, 0, 5), 5);
add_plane(&s, vector_set(NULL, 0, 0, 2), vector_set(NULL, 0, 0, 1));
add_light(&s, vector_set(NULL, 10, 0, 20), color_set(NULL, 255, 255, 255));