ld33_umonster
diff src/game.cc @ 3:93ff21458a16
fixed stuff
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 23 Aug 2015 02:51:39 +0300 |
parents | 35349df5392d |
children | 3b4460b34d43 |
line diff
1.1 --- a/src/game.cc Sat Aug 22 23:55:21 2015 +0300 1.2 +++ b/src/game.cc Sun Aug 23 02:51:39 2015 +0300 1.3 @@ -6,6 +6,7 @@ 1.4 #include "shader.h" 1.5 #include "shadow.h" 1.6 #include "opt.h" 1.7 +#include "mesh.h" 1.8 1.9 #include "room.h" 1.10 1.11 @@ -64,6 +65,8 @@ 1.12 return false; 1.13 } 1.14 1.15 + Mesh::use_custom_sdr_attr = false; 1.16 + 1.17 assert(glGetError() == GL_NO_ERROR); 1.18 return true; 1.19 } 1.20 @@ -88,12 +91,11 @@ 1.21 glRotatef(cam_phi, 1, 0, 0); 1.22 glRotatef(cam_theta, 0, 1, 0); 1.23 1.24 - float lpos[] = {-0, 0, 0, 1}; 1.25 + float lpos[] = {-5, 15, 10, 1}; 1.26 glLightfv(GL_LIGHT0, GL_POSITION, lpos); 1.27 1.28 - opt.shadows = false; 1.29 if(opt.shadows && sdr_shadow) { 1.30 - begin_shadow_pass(Vector3(lpos[0], lpos[1], lpos[2]), Vector3(0, 0, 0), 5); 1.31 + begin_shadow_pass(Vector3(lpos[0], lpos[1], lpos[2]), Vector3(0, 0, 0), 10); 1.32 draw_scene(); 1.33 end_shadow_pass(); 1.34 1.35 @@ -116,7 +118,6 @@ 1.36 glActiveTexture(GL_TEXTURE0); 1.37 glBindTexture(GL_TEXTURE_2D, 0); 1.38 } else { 1.39 - override_shader(sdr_shadow_notex); 1.40 draw_scene(); 1.41 } 1.42 } 1.43 @@ -137,7 +138,7 @@ 1.44 glPushMatrix(); 1.45 glTranslatef(0, 0.75, 0); 1.46 1.47 - glmaterial(0.2, 0.3, 1.0, 0.8, 60.0); 1.48 + glmaterial(1.0, 0.4, 0.3, 0.8, 60.0); 1.49 draw_teapot(); 1.50 1.51 glPopMatrix();