X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fpolytest.c;h=58fdb41578185727f67cc9b7677414a9bbeddb59;hp=826b0b0c5a5439a8a2df57f7d65d0ddf4bef53e7;hb=25669bf7362645d1c0fee9d7cb07f4a6b0b34903;hpb=dce48eb322ddf2a3c3622fc132ece21ba7653da3 diff --git a/src/polytest.c b/src/polytest.c index 826b0b0..58fdb41 100644 --- a/src/polytest.c +++ b/src/polytest.c @@ -74,6 +74,8 @@ static void start(long trans_time) g3d_perspective(50.0, 1.3333333, 0.5, 100.0); g3d_enable(G3D_CULL_FACE); + g3d_enable(G3D_LIGHTING); + g3d_enable(G3D_LIGHT0); } static void update(void) @@ -113,7 +115,11 @@ static void draw(void) g3d_rotate(phi, 1, 0, 0); g3d_rotate(theta, 0, 1, 0); + g3d_light_pos(0, -10, 10, 20); + zsort(&torus); + + g3d_mtl_diffuse(0.3, 0.6, 1.0); draw_mesh(&torus); /*draw_mesh(&cube);*/