diff --git a/sources/main.cpp b/sources/main.cpp index a894578..dcb28fd 100755 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -401,13 +401,13 @@ //light info //Color l0_col(0.1f, 0.1f, 0.1f); //AmbientLight light0(l0_col, GL_LIGHT0); - //Color l0_col(0.3f, 0.3f, 0.3f); - //Vec l0_pos(0.0f, 10.0f, 10.0f); - //SpecularLight light0(l0_pos, l0_col, GL_LIGHT0); + Color l0_col(0.3f, 0.3f, 0.3f); + Vec l0_pos(0.0f, -10.0f, -10.0f); + SpecularLight light0(l0_pos, l0_col, GL_LIGHT0); - //Vec l1_pos(10.0f, 10.0f, 10.0f); - //Color l1_col(0.0f, 0.5f, 1.0f); - //DiffuseLight light1(l1_pos, l1_col, GL_LIGHT1); + Vec l1_pos(-10.0f, -10.0f, -10.0f); + Color l1_col(0.0f, 0.5f, 1.0f); + DiffuseLight light1(l1_pos, l1_col, GL_LIGHT1); //glEnable(GL_COLOR_MATERIAL); @@ -521,10 +521,10 @@ // lights if (keystate[SDLK_1]) { - //light0.flip(); + light0.flip(); } else if (keystate[SDLK_2]) { - //light1.flip(); + light1.flip(); } else { react_keyevent = 0; diff --git a/sources/poly.cpp b/sources/poly.cpp index b748875..0fdf310 100755 --- a/sources/poly.cpp +++ b/sources/poly.cpp @@ -29,6 +29,7 @@ Poly::Poly(std::vector & _points, Color _color) { delta = 0.0f; + scaleFactor = 1.0f; drawNormals = false; position = new Vec(0,0,0); rotation = new Vec(0,0,0); @@ -47,6 +48,7 @@ Poly::Poly(std::vector & _points, Material _material) { delta = 0.0f; + scaleFactor = 1.0f; drawNormals = false; position = new Vec(0,0,0); rotation = new Vec(0,0,0);