Before this, i try to run my program, and the fps > 300 but know i run the program the fps just = 4, what should I check first to solve this problem??
Code: Select all
int fps = driver->getFPS();
if (lastFPS != fps)
{ core::stringw str = L"";
str += "Tinggi Jalan : ";
if(cam.Z<47700)
str += terrain->getHeight(camera->getAbsolutePosition().X, camera->getAbsolutePosition().Z);
if(cam.Z>=47700)
str += terrain1->getHeight(camera->getAbsolutePosition().X, camera->getAbsolutePosition().Z);
str += " ";
//Cetak Posisi
str += "Titik Awal : ";
str += cam.Z;
str += " ";
str += "Kecepatan : ";
str += koor1;
str += " ";
str += "Tinggi : ";
str += target.Z;
str += "Jarak : ";
str += target.X;
str += " FPS :";
str += fps;
//str += "W :";
//str += beban1;
device->setWindowCaption(str.c_str());
lastFPS = fps;}
}