[...]I also have a question: First I tried to use Display.sync(60), but i noticed a little lag in the scrolling of the map.
Now I have changed it and removed Display.sync(60) to use only Display.setVSyncEnabled(true);
When I use Display.setVSyncEnabled(true); it still is vsynced and incredibly smooth and thats why i wonder why use Display.sync(60) when you can get
vsync,and isnt the result of vsync the same as Display.sync(60) ?
[...]
setVSyncEnabled(true) will only gently ask for vsync. Its up to the driver to enable it. On the driver side you can set vsync to: always on, on by default, off by default and always off. Only if its #2 or #3 you can en/disable it with an api call.
The best thing you can do is trying to enable vsync and using sync (or sync2/3) as backup.
Say you want 60fps, then you have 16.666666 msec per frame. The used timer has msec precision therefore you should try the next rounded down value, which is 16. 16msec per frame means 62.5 fps, which is just fine. Its only a fart faster and there is enough room for timing differences (pc<->display)... so it shouldnt drop a frame if vsnyc is enabled.