aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-10-30 17:04:42 +0100
committerSven Gothel <[email protected]>2012-10-30 17:04:42 +0100
commit5deb97e50abf0c19dc37aa69add1dfa2447825ad (patch)
tree6eacdf16cfdabeae53ebf358c95eab9929c68d80 /src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java
parentadea26fedc2fcd99685a73ac3301ccaeadc2fd99 (diff)
GLX/GLXExt Robustness: Use NIODirectOnly for all bindings. For these internal APIs, critical array is not required, hence redundant.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXContext.java8
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; }