Augmentation du LOD, affichage du FPS dans la console.

This commit is contained in:
Georges Dupéron 2012-01-20 14:08:50 +01:00
parent 0dc7976869
commit b3e0b2bfac
2 changed files with 6 additions and 2 deletions

View File

@ -2,7 +2,7 @@
const unsigned int Couleurs::fog = mix(cielHaut, cielBas, 0.5);
const float Dimensions::splitFactor = 5.f;
const float Dimensions::mergeFactor = 6.f;
const float Dimensions::splitFactor = 7.f;
const float Dimensions::mergeFactor = 8.f;
const float Dimensions::frontFrustum = 1.f;
const float Dimensions::backFrustum = 4000 * 100; // 4km

View File

@ -165,11 +165,15 @@ void View::renderScene(int lastTime, int currentTime) {
float fps = (int)(1000/(currentTime-lastTime));
char text[100]; // Text
snprintf(&(text[0]), 100, "FPS: %4.2f", fps);
std::cout << "\r" << fps << " ";
std::cout.flush();
/*
glLoadIdentity ();
glDisable(GL_LIGHTING);
glColor3f(0.0f, 0.0f, 0.0f);
//glRasterPos3f (0, 0, 0);
glutBitmapString(GLUT_BITMAP_TIMES_ROMAN_24, (unsigned char*)(&(text[0])));
*/
glFlush();
SDL_GL_SwapBuffers();