aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-05-22 12:53:32 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-05-22 12:53:32 +0000
commit299515e5e3b1339581114eb75d2dfbe425ceb405 (patch)
treecc0d726fb043a9cc57a2bdc45c357a86250cfde3 /src/render.c
parent5074aa838702ec42b89be0adc32098f9d14cc34d (diff)
Make the lander stand out a bit more
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@36 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/render.c b/src/render.c
index 328301b..85d2693 100644
--- a/src/render.c
+++ b/src/render.c
@@ -532,6 +532,13 @@ void render_draw(Game *game, Uint32 t) {
/* Finally, draw the lander */
// glUseProgramObjectARB(r->lighting_program);
// glUniform1iARB(glGetUniformLocationARB(game->render->lighting_program, "texture"), 0);
+ GLfloat pos[] = { -1.0, 0.8, 4.0, 0.0 };
+ GLfloat diffuse[] = { 0.4, 0.4, 0.4, 1.0 };
+ GLfloat specular[] = { 1.0, 1.0, 1.0, 1.0 };
+ glLightfv(GL_LIGHT2, GL_POSITION, pos);
+ glLightfv(GL_LIGHT2, GL_DIFFUSE, diffuse);
+ glLightfv(GL_LIGHT2, GL_SPECULAR, specular);
+ glEnable(GL_LIGHT2);
glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
@@ -544,6 +551,7 @@ void render_draw(Game *game, Uint32 t) {
render_draw_line(game->lander->x, game->lander->y, game->lander->z, game->lander->x, game->lander->y, game->lander->z-200.0);
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
+ glDisable(GL_LIGHT2);
// glUseProgramObjectARB(0);
render_draw_2d(r, game);