Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/draw.cc2
-rw-r--r--src/client/view.cc14
2 files changed, 7 insertions, 9 deletions
diff --git a/src/client/draw.cc b/src/client/draw.cc
index 87be92c..77e3e92 100644
--- a/src/client/draw.cc
+++ b/src/client/draw.cc
@@ -150,7 +150,7 @@ void draw_entity_default(core::Entity *entity)
gl::rotate(entity->direction(), 0.0f, 0.0f, 1.0f );
if (model) {
- model->draw(entity, camera::eye);
+ model->draw(entity);
} else {
gl::disable(GL_LIGHTING);
gl::disable(GL_LIGHT0);
diff --git a/src/client/view.cc b/src/client/view.cc
index cd90efc..bf69072 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -52,24 +52,22 @@ void reset()
//gl::shademodel(GL_FLAT);
// lighting
+ GLfloat light_position[] = { 0.0, 0.0, 0.0, 1.0 };
GLfloat ambient_light[] = { 0.2f, 0.2f, 0.2f, 1.0f };
- GLfloat diffuse_light[] = { 0.6f, 0.6f, 0.6f, 1.0f };
- GLfloat specular_light[] = { 0.2f, 0.2f, 0.2f, 1.0f };
- GLfloat specular_reflectance[] = { 1.0f, 1.0f, 1.0f, 1.0f };
+ GLfloat diffuse_light[] = { 0.4f, 0.4f, 0.4f, 1.0f };
+ GLfloat specular_light[] = { 0.4f, 0.4f, 0.4f, 1.0f };
+ GLfloat specular_reflectance[] = { 0.5f, 0.5f, 0.5f, 1.0f };
+ glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient_light);
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse_light);
glLightfv(GL_LIGHT0, GL_SPECULAR, specular_light);
- // position GL_LIGHT0 at the camera eye
- GLfloat light_position[] = { 0.0, 0.0, 0.0, 1.0 };
- glLightfv(GL_LIGHT0, GL_POSITION, light_position);
-
// color tracking
glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
glMaterialfv(GL_FRONT, GL_SPECULAR, specular_reflectance);
- glMateriali(GL_FRONT, GL_SHININESS, 16); // shininess 1-128
+ glMateriali(GL_FRONT, GL_SHININESS, 128); // shininess 1-128
gl::disable(GL_LIGHTING);
gl::disable(GL_LIGHT0);