Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/render/draw.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc
index dea24bc..4e5e2a9 100644
--- a/src/render/draw.cc
+++ b/src/render/draw.cc
@@ -112,7 +112,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;
+ diffuse_light[i] = globe->color()[i] * 0.4f;
}
zone_light[3] = 1.0f;
diffuse_light[3] = 1.0f;
@@ -592,8 +592,9 @@ void draw_model_fragments(model::Model *model,
//bool use_color_array = true; // glEnableClientState(GL_COLOR_ARRAY) is set
// TODO this should probably be initialized somewhere else
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
+ glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP);
+ glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP);
+ glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP);
for (model::Model::Groups::iterator git = model->groups().begin(); git != model->groups().end(); git++) {
@@ -714,6 +715,7 @@ void draw_model_fragments(model::Model *model,
// enable env mapping
gl::enable(GL_TEXTURE_GEN_S);
gl::enable(GL_TEXTURE_GEN_T);
+ gl::enable(GL_TEXTURE_GEN_R);
use_env = true;
}
@@ -723,6 +725,7 @@ void draw_model_fragments(model::Model *model,
// disable env mapping
gl::disable(GL_TEXTURE_GEN_S);
gl::disable(GL_TEXTURE_GEN_T);
+ gl::disable(GL_TEXTURE_GEN_R);
use_env = false;
}
}
@@ -746,6 +749,7 @@ void draw_model_fragments(model::Model *model,
// disable env mapping
gl::disable(GL_TEXTURE_GEN_S);
gl::disable(GL_TEXTURE_GEN_T);
+ gl::disable(GL_TEXTURE_GEN_R);
use_env = false;
}
@@ -781,6 +785,7 @@ void draw_model_fragments(model::Model *model,
// disable env mapping
gl::disable(GL_TEXTURE_GEN_S);
gl::disable(GL_TEXTURE_GEN_T);
+ gl::disable(GL_TEXTURE_GEN_R);
use_env = false;
}