From 3c71e9b96fcc53e50180c806acbecbbcf4c77d0c Mon Sep 17 00:00:00 2001 From: Malcolm Still Date: Wed, 11 Jan 2017 21:30:33 +0000 Subject: [PATCH] Moving the LockSurface after waiting for the page flip stops the rendering glitches on Linux/KMS. --- src/OpenTK/Platform/Linux/LinuxGraphicsContext.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/OpenTK/Platform/Linux/LinuxGraphicsContext.cs b/src/OpenTK/Platform/Linux/LinuxGraphicsContext.cs index d6959544..779fd36d 100644 --- a/src/OpenTK/Platform/Linux/LinuxGraphicsContext.cs +++ b/src/OpenTK/Platform/Linux/LinuxGraphicsContext.cs @@ -67,9 +67,6 @@ namespace OpenTK.Platform.Linux { base.SwapBuffers(); - bo_next = LockSurface(); - int fb = GetFramebuffer(bo_next); - if (is_flip_queued) { // Todo: if we don't wait for the page flip, @@ -84,6 +81,8 @@ namespace OpenTK.Platform.Linux } } + bo_next = LockSurface(); + int fb = GetFramebuffer(bo_next); QueueFlip(fb); }