On VSync

I’ve noticed that, by default, vertical synchronization is enabled when running the various jME tests. I’m wondering if this should be the default behaviour, or should we allow the system to render as fast as possible? Either way, we should explicitly call Window.setVSyncEnabled(boolean) when creating the window.



Actually, now that I think about it, perhaps DisplaySystem should have a method setVSyncEnabled(boolean). Then the user would have control over the behaviour, and we could simply default to off. If there are no objections/better ideas, I’ll go ahead and make the change then.

Done. DisplaySystem#setVSyncEnabled(boolean) makes its best effort to enable/disable vertical monitor synchronization. (And, y’know, DisplaySystem is up to v1.10 now! 8-O)

Actually, by default jME uses what is set on the OpenGL settings of Windows. So, if you have vsync enabled, it will be used, otherwise, it won’t.



However, giving control is fine with me, but the windows settings will still override.