Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-03-06 21:49:54 +0000
committerStijn Buys <ingar@osirion.org>2008-03-06 21:49:54 +0000
commitd1b9fa9ebb493674c95983fe690bffb730b1ece2 (patch)
tree1de0975318cb41835f87c0a27f76e5f7c60ca7b7
parentc3d56342784bd97cce666f24539db31cbd5506d9 (diff)
moving model to core
-rw-r--r--osirion.kdevelop2
-rw-r--r--osirion.kdevelop.pcsbin456490 -> 495428 bytes
-rw-r--r--osirion.kdevses22
-rw-r--r--src/client/draw.cc2
-rw-r--r--src/client/view.cc14
-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
7 files changed, 13 insertions, 27 deletions
diff --git a/osirion.kdevelop b/osirion.kdevelop
index d40c050..58a8bfc 100644
--- a/osirion.kdevelop
+++ b/osirion.kdevelop
@@ -21,7 +21,7 @@
</general>
<kdevautoproject>
<general>
- <activetarget>src/core/libcore.la</activetarget>
+ <activetarget>src/client/libclient.la</activetarget>
<useconfiguration>debug</useconfiguration>
</general>
<run>
diff --git a/osirion.kdevelop.pcs b/osirion.kdevelop.pcs
index d218712..49bad62 100644
--- a/osirion.kdevelop.pcs
+++ b/osirion.kdevelop.pcs
Binary files differ
diff --git a/osirion.kdevses b/osirion.kdevses
index 98b982a..f0d27df 100644
--- a/osirion.kdevses
+++ b/osirion.kdevses
@@ -1,25 +1,13 @@
<?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE KDevPrjSession>
<KDevPrjSession>
- <DocsAndViews NumberOfDocuments="6" >
- <Doc0 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/client/console.cc" >
- <View0 Encoding="" line="296" Type="Source" />
+ <DocsAndViews NumberOfDocuments="2" >
+ <Doc0 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/client/draw.cc" >
+ <View0 Encoding="" line="152" Type="Source" />
</Doc0>
- <Doc1 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/core/application.cc" >
- <View0 Encoding="" line="145" Type="Source" />
+ <Doc1 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/render/model.cc" >
+ <View0 Encoding="" line="415" Type="Source" />
</Doc1>
- <Doc2 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/core/cvar.cc" >
- <View0 Encoding="" line="146" Type="Source" />
- </Doc2>
- <Doc3 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/core/application.h" >
- <View0 Encoding="" line="67" Type="Source" />
- </Doc3>
- <Doc4 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/core/commandbuffer.cc" >
- <View0 Encoding="" line="73" Type="Source" />
- </Doc4>
- <Doc5 NumberOfViews="1" URL="file:///home/ingar/projects/osirion/osirion-work/src/client/client.cc" >
- <View0 Encoding="" line="91" Type="Source" />
- </Doc5>
</DocsAndViews>
<pluginList>
<kdevdebugger>
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