From aacc8afdca0b1376f91dcc68aa3ae3b39c7aba51 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 1 Sep 2015 02:05:50 +0200 Subject: Bug 1202: Fix vsync regression on OSX when using CALayer On OSX using CALayer for onscreen rendering, the drawable is utilizing an offscreen FBO. Hence we need to move the vsync-skip-operation criteria, i.e. skip if offscreen, down to the implementation. --- src/jogl/classes/jogamp/opengl/egl/EGLContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/jogamp/opengl/egl/EGLContext.java') diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java index a9d025e01..28448d537 100644 --- a/src/jogl/classes/jogamp/opengl/egl/EGLContext.java +++ b/src/jogl/classes/jogamp/opengl/egl/EGLContext.java @@ -433,7 +433,8 @@ public class EGLContext extends GLContextImpl { @Override protected final Integer setSwapIntervalImpl2(final int interval) { - if( hasRendererQuirk(GLRendererQuirks.NoSetSwapInterval) ) { + if( !drawable.getChosenGLCapabilities().isOnscreen() || + hasRendererQuirk(GLRendererQuirks.NoSetSwapInterval) ) { return null; } final int useInterval; -- cgit v1.2.3