diff options
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java index 89907ba15..76e0bc15c 100644 --- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java +++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java @@ -570,9 +570,13 @@ public abstract class X11GLXContext extends GLContextImpl { if (initSwapGroupImpl(glXExt)>0) { final NativeSurface ns = drawable.getNativeSurface(); try { + final IntBuffer maxGroupsNIO = Buffers.newDirectIntBuffer(maxGroups.length - maxGroups_offset); + final IntBuffer maxBarriersNIO = Buffers.newDirectIntBuffer(maxBarriers.length - maxBarriers_offset); + if( glXExt.glXQueryMaxSwapGroupsNV(ns.getDisplayHandle(), ns.getScreenIndex(), - maxGroups, maxGroups_offset, - maxBarriers, maxBarriers_offset) ) { + maxGroupsNIO, maxBarriersNIO) ) { + maxGroupsNIO.get(maxGroups, maxGroups_offset, maxGroupsNIO.remaining()); + maxBarriersNIO.get(maxGroups, maxGroups_offset, maxBarriersNIO.remaining()); res = true; } } catch (Throwable t) { hasSwapGroupNV=-1; } |