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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Sutur

Pages: [1]
1
Window / sf::Window::GetFrameTime() returns 0
« on: April 27, 2011, 10:01:14 pm »
Quote from: "Laurent"

So your program runs actively for a significant amount of time, and the clock still returns 0 second elapsed??

Yes, it did.
I switched to the latest SFML2 version( the one I was using before had been a few months old ) and it seems like it's now doing the job. I propably somehow messed up my previous SFML2 download.

Thanks for your help!

2
Window / sf::Window::GetFrameTime() returns 0
« on: April 24, 2011, 02:38:57 pm »
Quote from: "Laurent"
Try to replace Sleep(0.5) with an active loop that takes some time.

Does not change the behavior at all.

However, I managed to get it working by turning off Compiz.
Now the correct values are returned.
But I would really like it to work together with Compiz.
Please tell me if you can think of any solution.

Thanks in advance!

3
Window / sf::Window::GetFrameTime() returns 0
« on: April 22, 2011, 06:46:39 pm »
Code: [Select]

      std::cout << window.GetFrameTime() << std::endl;
      window.Display();


It keeps telling me 0.
So does the following code:

Code: [Select]

#include <SFML/Window.hpp>
#include <iostream>

int main()
{
   sf::Window window( sf::VideoMode( 800, 600 ), "" );
   sf::Clock frameTimeCounter;

   while( window.IsOpened() )
   {
      frameTimeCounter.Reset();

      sf::Event event;
      while( window.GetEvent( event ) )
         if( event.Type == sf::Event::KeyPressed || event.Type == sf::Event::Closed )
               window.Close();

      sf::Sleep( 0.5 );
      window.Display();
     
      std::cout << frameTimeCounter.GetElapsedTime() << std::endl;
   }
}

4
Window / sf::Window::GetFrameTime() returns 0
« on: April 21, 2011, 11:21:04 pm »
This prints 0 over and over again:

Code: [Select]
#include <SFML/Window.hpp>
#include <iostream>

int main()
{
sf::Window window( sf::VideoMode( 800, 600 ), "" );

while( window.IsOpened() )
{
sf::Event event;
while( window.GetEvent( event ) )
if( event.Type == sf::Event::KeyPressed || event.Type == sf::Event::Closed )
window.Close();

sf::Sleep( 0.5 );
window.Display();

std::cout << window.GetFrameTime() << std::endl;
}
}

5
Window / sf::Window::GetFrameTime() returns 0
« on: April 21, 2011, 10:35:51 pm »
Hello folks!

Everytime I call sf::Window::GetFrameTime() it returns 0 which can't be true.
It was working a few days ago and I did not update/change any of the SFML files.
Even if I put sf::Sleep( 0.5 ) inside my applications main loop, it still returns 0.
Any idea how this could be caused?

I'm using Linux 64bit ( Ubuntu ) together with g++ and SFML 2.0.

Pages: [1]
anything