diff options
-rw-r--r-- | src/render.c | 8 |
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); |