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

Author Topic: By default, renders are too fast [LINUX]  (Read 3434 times)

0 Members and 2 Guests are viewing this topic.

gavintlgold

  • Newbie
  • *
  • Posts: 21
    • View Profile
By default, renders are too fast [LINUX]
« on: May 23, 2011, 10:25:45 pm »
When I compile and run SFML games and examples on my machine, they loop too fast for the window to render them. This can be solved by limiting the framerate to 1000, but by default it's broken.

I know this doesn't happen on my laptop, so perhaps it's an NVIDIA-only problem? In any case, the examples do not work properly on my box, and neither does any of my code, until I force a framerate limit or vsync it.

I consider this a bug with SFML, since it only occurs on some systems and the examples are affected by it.

The simplest way to solve this is to default the frame limiter to 1000 but that doesn't seem like the most ideal solution. Ideally, SFML would wait until the window thread is done drawing before continuing on to the next loop, allowing an FPS as high as the system can allow, but no higher.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
By default, renders are too fast [LINUX]
« Reply #1 on: May 23, 2011, 10:52:05 pm »
Quote
they loop too fast for the window to render them

I've never heard of this kind of issue. The driver/hardware renders as fast as it can, it can't loop more than that since the call to Display() will block the execution until everything's rendered.
This might rather be a bug in the driver.
Laurent Gomila - SFML developer

gavintlgold

  • Newbie
  • *
  • Posts: 21
    • View Profile
By default, renders are too fast [LINUX]
« Reply #2 on: May 23, 2011, 11:29:08 pm »
I have heard NVIDIA's drivers can be quite hacky at times.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
By default, renders are too fast [LINUX]
« Reply #3 on: May 23, 2011, 11:30:39 pm »
No I think you mean ATI.

ATI is known for their bad drivers while NVIDIA is known for their good drivers :P
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

gavintlgold

  • Newbie
  • *
  • Posts: 21
    • View Profile
By default, renders are too fast [LINUX]
« Reply #4 on: May 24, 2011, 12:19:06 am »
Well NVIDIA's drivers are efficient, but do things strangely at times. For instance NVIDIA's vsync caps the framerate at 60fps no matter what, instead of scaling up to 120, 240, etc.

I don't think there are any closed-source graphics drivers that work perfectly on Linux, unfortunately :(

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
By default, renders are too fast [LINUX]
« Reply #5 on: May 26, 2011, 09:04:17 am »
I cannot reproduce the issue on neither driver.

gavintlgold

  • Newbie
  • *
  • Posts: 21
    • View Profile
By default, renders are too fast [LINUX]
« Reply #6 on: May 26, 2011, 08:54:19 pm »
I'm running an AMD Athlon 64 X2 Dual Core 5400+ and an NVIDIA GeForce GTX280 on Ubuntu 11.04.

I don't game much on my Linux side, but I've never encountered problems with the driver (for example, Ogre3D works without issues, and Compiz is fine).

GLXGears works, as do all the screensavers, and any OpenGL game not made by SFML.