From da8717097df2afba3fc7e9ef648ce6bc4ebd4f9f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 7 May 2013 23:28:08 +0200 Subject: GLX: Put native ByteBuffer to native-order in 'glXGetVisualFromFBConfig' and minor edits (final, same 'nativeOrder()' call style) --- make/config/jogl/glx-CustomJavaCode.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'make/config/jogl/glx-CustomJavaCode.java') diff --git a/make/config/jogl/glx-CustomJavaCode.java b/make/config/jogl/glx-CustomJavaCode.java index ed126a5c9..f3e743930 100644 --- a/make/config/jogl/glx-CustomJavaCode.java +++ b/make/config/jogl/glx-CustomJavaCode.java @@ -6,10 +6,9 @@ if (__addr_ == 0) { throw new GLException("Method \"glXGetVisualFromFBConfig\" not available"); } - java.nio.ByteBuffer _res; - _res = dispatch_glXGetVisualFromFBConfig(dpy, config, __addr_); + final java.nio.ByteBuffer _res = dispatch_glXGetVisualFromFBConfig(dpy, config, __addr_); if (_res == null) return null; - return XVisualInfo.create(_res); + return XVisualInfo.create(Buffers.nativeOrder(_res)); } /** Entry point to C language function: - Alias for:
XVisualInfo * glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config); */ @@ -29,11 +28,9 @@ if (__addr_ == 0) { throw new GLException("Method \"glXChooseFBConfig\" not available"); } - final ByteBuffer _res; - _res = dispatch_glXChooseFBConfig(dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), nitems, Buffers.getDirectBufferByteOffset(nitems), __addr_); + final ByteBuffer _res = dispatch_glXChooseFBConfig(dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), nitems, Buffers.getDirectBufferByteOffset(nitems), __addr_); if (_res == null) return null; - Buffers.nativeOrder(_res); - return PointerBuffer.wrap(_res); + return PointerBuffer.wrap(Buffers.nativeOrder(_res)); } /** Entry point to C language function: GLXFBConfig * glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems);
Part of CORE FUNC @@ -52,8 +49,7 @@ if (__addr_ == 0) { throw new GLException("Method \"glXChooseVisual\" not available"); } - final ByteBuffer _res; - _res = dispatch_glXChooseVisual(dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), __addr_); + final ByteBuffer _res = dispatch_glXChooseVisual(dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), __addr_); if (_res == null) return null; return XVisualInfo.create(Buffers.nativeOrder(_res)); } -- cgit v1.2.3