From 084dd555366c326b7ee18515bcb282a8f4eb394a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 26 Aug 2008 18:51:54 +0000 Subject: dust color --- src/render/draw.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/render/draw.cc') diff --git a/src/render/draw.cc b/src/render/draw.cc index 415a56c..8bf694f 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -45,8 +45,8 @@ const float drawfxdistance = 64.0f; const float farplane = 1016.0f; core::Zone *zone = 0; - -float zone_light[4]; +float zone_light[4]; // locaton of the zone light +math::Color zone_color; // color of the zone light bool has_zone_light = false; typedef std::map Globes; @@ -66,6 +66,7 @@ void pass_prepare(float seconds) // reset light state gl::disable(GL_LIGHT1); has_zone_light = false; + zone_color.assign(1.0); // clear current list of globes globes_list.clear(); @@ -168,6 +169,7 @@ void pass_prepare(float seconds) for (size_t i=0; i <3; i++) { zone_light[i] = globe->location()[i]; + zone_color[i] = globe->color()[i]; diffuse_light[i] = globe->color()[i] * 0.4; } zone_light[3] = 1.0f; @@ -1082,7 +1084,7 @@ void draw(float seconds) gl::depthmask(GL_FALSE); // disable depth buffer writing draw_pass_spacegrid(); // draw the blue spacegrid - Dust::draw(); // draw spacedust + Dust::draw(zone_color); // draw spacedust draw_pass_model_fx(seconds); // draw entity lights and engines -- cgit v1.2.3