I am encountering a screen tear issue using OpenGL on Windows 10. . I am doing a ray marching demo (rendering just 2 triangles and ray marching and shading terrain in fragment shader). Rendering with GTX 860M, the app does not have an issue with staying at 60 FPS (at least at lower resolution). A screen tearing is present however (and the following video was rendered at especially low resolution to make sure this has nothing to do with the complexity of the fragment shader code): Screen tearing video at YouTube.
What I've tried:
I am creating the OpenGL context using the recommended settings. I have tried manually turning VSync on using (wglSwapIntervalEXT(1)), although that should be the default behavior. I have tried placing glFinish before the SwapBuffers call, i.e.:
while (isRunning)
{
ProcessMessages(window, &context);
App::Update(&context);
glFinish();
SwapBuffers(windowHandle);
}
I have tried setting VSync to "Always on" in the Nvidia control panel. I have also tried creating the window using GLFW instead of WinApi. I have tried creating the window both in fullscreen and resizable mode.
I haven't seen any improvement though.