Erhm don't know. Maybe.
void Application::EnterMainLoop(int argc, char * argv[]) {
// Will just display a background
GUI::MainMenu menu(this->appSender, this->mainWindow.GetWidth(), this->mainWindow.GetHeight());
// Here's where I start with the text to be put on display.
sf::String frame("", sf::Font::GetDefaultFont(), 15); char str[64]; frame.SetCenter(120, 0);
frame.SetPosition((float)this->mainWindow.GetWidth(), 2); frame.SetColor(sf::Color(0, 0, 255));
while(true) {
// Get events from SFML and turn it into signals
this->appSender.FetchEventsFromWindow(&this->mainWindow);
// Add a repaint signal to let know all the objects to be repainted on screen
this->appSender.AddSignal(RepaintSignal(&this->mainWindow));
// Send signals to all objects
this->appSender.SendSignals();
// Put "Time: x.xxxxxx" on the display.
sprintf_s(str, "Time: %.4g", this->mainWindow.GetFrameTime());
frame.SetText(str);
this->mainWindow.Draw(frame);
// Update display
this->mainWindow.Display();
}
}
This is my main loop. So dump something similar to the main function? The interesting thing is that the speed increases? If it's accurate. The thing is that it shouldn't be eliminated but taken advantage of. Somehow. Or maybe the timer is just off.
**EDIT**
Maybe this is enough?
sf::RenderWindow window(sf::VideoMode(800, 600), "Test");
// Create and position sf::String frame here
while(true) {
window.Clear();
sprintf_s(str, "Time: %.4g", window.GetFrameTime());
frame.SetText(str);
window.Draw(frame);
window.Display();
}