LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Maykin53 on October 01, 2013, 11:20:05

Title: Using native Display is choppy or has artefacts (LWJGLCanvas is fine)
Post by: Maykin53 on October 01, 2013, 11:20:05
Hi all.

I'm running into a problem on Windows 7. When I use LWJGL's native display window in (in either full-screen mode or windowed mode), I sometimes run into situations (seemingly at random) where the the display will be choppy or contain artefacts. However, when I use LWJGLCanvas (with the exact same code otherwise), everything is smooth.

I've tried the following:

1. Full-screen Display with vertical sync enabled = occasionally choppy (most noticeable when the camera moves)
2. Full-screen Display with a timed-sync (60 frames) or no sync = rendering artefacts, such as a wave of lines in the top half of the screen (as if the display isn't keeping up with the monitor's refresh rate or something) - again most noticeable when the camera moves
3. Windowed mode with any of the 3 sync options = occasionally choppy (as with test case '1')
4. LWJGL Canvas in a Swing JFrame = completely smooth regardless of the sync method and at all times during gameplay


In addition, I've tried both of the following timing methods:


public long getTime() throws Exception
{
return (Sys.getTime()*1000)/Sys.getTimerResolution();
}



private static long RESOLUTION = 1000000;

public long getTime() throws Exception
{
return (System.nanoTime()/EPcEngineTimer.RESOLUTION);
}


What's strange is that this issue only occurs for me when using the native display on Windows 7.
Has anyone else experienced any related issues on Windows 7 or have any advice?

Many thanks.
Title: Re: Using native Display is choppy or has artefacts (LWJGLCanvas is fine)
Post by: Cornix on October 01, 2013, 11:28:45
I might have had the same problem (or similar problem) as you. Try changing some of the settings in your graphics card. It helped me back then and might do the trick for you as well.
Title: Re: Using native Display is choppy or has artefacts (LWJGLCanvas is fine)
Post by: Maykin53 on October 02, 2013, 08:51:45
Thanks for the reply Cornix. I tried fiddling with the graphics settings but unfortunately no dice.

It ended up being the NVIDIA graphics driver; when I rolled it back to an earlier version the problem no longer occurred.
Hopefully they fix it soon.