0
\$\begingroup\$

I wrote a little game of a bouncing ball, using SFML and Box2D.

On Windows, the graphics animate smoothly. However, on my Linux machine, the animation stutters randomly. To be precise, I get a horizontal video tearing effect.

I use the Intel graphics driver. I tried multiple solutions I found online to solve video tearing but I haven't been able to solve this. I've never had video tearing before (even in other OpenGL apps): It appears now for the first time.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ What were these "multiple solutions online"? \$\endgroup\$
    – Anko
    Oct 13, 2014 at 11:24

1 Answer 1

1
\$\begingroup\$

If you've got tearing, then you most likely forgot to enable vertical synchronisation (and it's not enabled by default or forced on your system).

Try calling sf::Window::setVerticalSyncEnabled(true); before your main loop.

\$\endgroup\$
3
  • \$\begingroup\$ Unfortunately this doesn't help. I've tried modifying my graphic card's driver too and nothing seemed to helped. I'm starting to think this can't be helped, but more importantly this is not really a game development issue anymore, but a Linux/SFML issue. I am leaving the question however because someone might be able to help. \$\endgroup\$
    – Ariel
    Jun 16, 2014 at 19:42
  • 2
    \$\begingroup\$ Have you tried any other OpenGL programs or games not related to SFML? Do they show similar issues? \$\endgroup\$
    – Mario
    Jun 16, 2014 at 21:41
  • \$\begingroup\$ Yes and I haven't experienced this \$\endgroup\$
    – Ariel
    Jun 17, 2014 at 8:52

Not the answer you're looking for? Browse other questions tagged .