diff options
author | Stijn Buys <ingar@osirion.org> | 2008-03-06 21:49:54 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-03-06 21:49:54 +0000 |
commit | d1b9fa9ebb493674c95983fe690bffb730b1ece2 (patch) | |
tree | 1de0975318cb41835f87c0a27f76e5f7c60ca7b7 /src | |
parent | c3d56342784bd97cce666f24539db31cbd5506d9 (diff) |
moving model to core
Diffstat (limited to 'src')
-rw-r--r-- | src/client/draw.cc | 2 | ||||
-rw-r--r-- | src/client/view.cc | 14 | ||||
-rw-r--r-- | src/core/model.cc (renamed from src/render/model.cc) | 0 | ||||
-rw-r--r-- | src/core/model.h (renamed from src/render/model.h) | 0 |
4 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); diff --git a/src/render/model.cc b/src/core/model.cc index ae34270..ae34270 100644 --- a/src/render/model.cc +++ b/src/core/model.cc diff --git a/src/render/model.h b/src/core/model.h index eca896b..eca896b 100644 --- a/src/render/model.h +++ b/src/core/model.h |