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-22 22:36:39 +0000
committerStijn Buys <ingar@osirion.org>2008-03-22 22:36:39 +0000
commit7fef8856b21215b0dd28dcc57f04c8a98ab5226f (patch)
tree76288a11fc8138466ee8f76dbf644f29fb0dfbdd /src/client
parent8d5cd141d63d9628dbdfebdde462657d5c05f0cf (diff)
Implemented vertex arrays
Diffstat (limited to 'src/client')
-rw-r--r--src/client/view.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index 466723f..5d14992 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -56,7 +56,7 @@ void reset()
GLfloat ambient_light[] = { 0.2f, 0.2f, 0.2f, 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 };
+ GLfloat specular_reflectance[] = { 0.2f, 0.2f, 0.2f, 1.0f };
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient_light);
@@ -85,6 +85,8 @@ void reset()
// alpha-blending
gl::blendfunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
gl::enable(GL_BLEND);
+
+ // client state
}
void draw_loader()
@@ -130,7 +132,7 @@ void draw_status()
int hours = (int) sys::time() / 3600;
int minutes = (int)(sys::time() - 3600*hours) / 60;
int seconds = (int)(sys::time() - 3600*hours - 60 *minutes);
- status << " clock " << std::setfill('0') << std::setw(2) << hours << ":"
+ status << "clock " << std::setfill('0') << std::setw(2) << hours << ":"
<< std::setfill('0') << std::setw(2) << minutes << ":"
<< std::setfill('0') << std::setw(2) << seconds;
@@ -138,9 +140,18 @@ void draw_status()
seconds = (int) floorf(core::application()->time() - (float) minutes* 60.0f);
status << " time " << std::setfill('0') << std::setw(2) << minutes << ":" << std::setfill('0') << std::setw(2) << seconds;
- status << " fps " << std::setw(4) << fps;
+
draw_text(CHARWIDTH, 4, status);
+ // print stats if desired
+ if (render::r_drawstats && render::r_drawstats->value()) {
+ std::stringstream stats;
+ stats << "fps " << std::setw(6) << fps << "\n";
+ stats << "tris " << std::setw(6) << render::Stats::tris << "\n";
+ stats << "spheres " << std::setw(4) << render::Stats::spheres << "\n";
+ draw_text(video::width-CHARWIDTH*13, CHARHEIGHT*3, stats);
+ }
+
// print the version number in the upper right corner
gl::color(0.0f, 1.0f, 0.0f, 1.0f);
std::string version("ver. ");