0
\$\begingroup\$

I'm making an game in libGDX and I have been noticing some image tearing when camera is moving. Note that it happens only when the game is maximized and the camera x position is less than screen width and camera y position is less than screen height. Here's a GIF showing what is the problementer image description here The color errors are not the problem here, it is the GIF fault

\$\endgroup\$
1
\$\begingroup\$

Disabling CPU sync and enabling vsync could fix your issue.

config.useCPUSynch = false;
config.vSyncEnabled = true;

There is more discussion of this over on reddit if that doesn't work.

\$\endgroup\$
  • \$\begingroup\$ config.useCPUSynch doesn't exist \$\endgroup\$ – cookie Nov 5 '16 at 15:23
0
\$\begingroup\$

I figured it out. It was to do with float rounding(or something to do with floats atleast). After casting them to ints it works without problems.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.