Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Latest SFML2 Snapshot, FrameTime fail?  (Read 1480 times)

0 Members and 1 Guest are viewing this topic.

Haikarainen

  • Guest
Latest SFML2 Snapshot, FrameTime fail?
« on: June 30, 2011, 03:02:21 am »
Hey Laurent, I recently reformatted my computer, wich bringed along a fresh compiled snapshot of SFML2.

When I rebuilt one of my projects that was working fine before the reformat(new build of sfml2 snapshot), I noticed something very weird:

Firstly; The sf::RenderWindow->GetFrameTime() is REALLY weird, It's changed somehow, before, my fpscounter showed the real fps(60 with vsync enabled), but now it shows 0.06666666, also, everything is fastforwarded compared to my recent configuration.
I have an internal timescale-variable to match frame-independent movement speeds, before it was set to 100, now i have to set it to 0.1 to match up to normal speed.

The code for my FPS-Counter:
Code: [Select]

bool hkEngine::Step(){
this->FPS = 1.0f / this->FPSClock.GetElapsedTime();
this->FPSClock.Reset();
  .... lotsacodehere ...
}

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Latest SFML2 Snapshot, FrameTime fail?
« Reply #1 on: June 30, 2011, 03:20:53 am »
SFML2 has changed from float seconds to sf::Uint32 miliseconds. That's why your frame seems weird.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Haikarainen

  • Guest
Latest SFML2 Snapshot, FrameTime fail?
« Reply #2 on: June 30, 2011, 04:43:22 am »
Quote from: "Groogy"
SFML2 has changed from float seconds to sf::Uint32 miliseconds. That's why your frame seems weird.


Ah, sweet, thanks!