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 problem The color errors are not the problem here, it is the GIF fault
2 Answers
\$\begingroup\$
\$\endgroup\$
1
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.
-
\$\begingroup\$
config.useCPUSynch
doesn't exist \$\endgroup\$– user79822Commented Nov 5, 2016 at 15:23
\$\begingroup\$
\$\endgroup\$
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.