aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-06-24 18:12:53 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-06-24 18:12:53 +0000
commit3fee94ac188612f989e106fbe19e37ddd5701ded (patch)
tree8247d35b65c3846d7491a7dd8d6b0afa22df620a /src
parentd5e9fdcee11c3a9ecd9696e3e83c9b91240359b6 (diff)
Comments
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@108 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'src')
-rw-r--r--src/render.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/render.c b/src/render.c
index 4acce6b..d4754d7 100644
--- a/src/render.c
+++ b/src/render.c
@@ -675,7 +675,7 @@ void render_draw(Game *game, Uint32 t) {
sqrtf(2.0)*sinf(game->lander->yaw)*sinf(game->view_angle),
sqrtf(2.0)*cosf(game->lander->yaw)*sinf(game->view_angle), sqrtf(2.0)*cosf(game->view_angle));
if ( r->shaders ) glUseProgram(r->lighting_program);
- if ( r->shaders ) glUniform1i(glGetUniformLocation(game->render->lighting_program, "texture"), 0);
+ if ( r->shaders ) glUniform1i(glGetUniformLocation(game->render->lighting_program, "texture"), 0); /* Using GL_TEXTURE0 */
if ( r->shaders ) glUniform1i(glGetUniformLocation(game->render->lighting_program, "texture_only"), 0);
if ( r->shaders ) glUniform1i(glGetUniformLocation(game->render->lighting_program, "texture_enabled"), 1);
if ( r->shaders ) glUniform1i(glGetUniformLocation(game->render->lighting_program, "fill_light_enabled"), 0);
@@ -684,7 +684,7 @@ void render_draw(Game *game, Uint32 t) {
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, amb);
render_draw_stuff(game, t, 1.0);
- /* Finally, draw the lander */
+ /* Draw the lander */
glEnable(GL_LIGHT2);
glDisable(GL_LIGHT0);
glDisable(GL_LIGHT1);
@@ -700,7 +700,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_LIGHT2);
- /* Back faces */
+ /* Back faces (done last to make blending work properly) */
if ( r->shaders ) glUseProgram(0); /* Speed things up a bit by not using per-fragment lighting for back faces */
glFrontFace(GL_CW);
glPolygonOffset(1.0, 1.0);