com.jogamp.common.nio.Buffers.nativeOrder()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(13.4k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中com.jogamp.common.nio.Buffers.nativeOrder()方法的一些代码示例,展示了Buffers.nativeOrder()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Buffers.nativeOrder()方法的具体详情如下:
包路径:com.jogamp.common.nio.Buffers
类名称:Buffers
方法名:nativeOrder

Buffers.nativeOrder介绍

[英]Helper routine to set a ByteBuffer to the native byte order, if that operation is supported by the underlying NIO implementation.
[中]帮助程序例程,用于将ByteBuffer设置为本机字节顺序(如果底层NIO实现支持该操作)。

代码示例

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/**
 * Allocates a new direct ByteBuffer with the specified number of
 * elements. The returned buffer will have its byte order set to
 * the host platform's native byte order.
 */
public static ByteBuffer newDirectByteBuffer(final int numElements) {
  return nativeOrder(ByteBuffer.allocateDirect(numElements));
}

代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt

/** Entry point to C language function: <code> EGLStreamKHR eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor) </code> <br>Part of <code>EGL_KHR_stream_cross_process_fd</code><br>   */
public ByteBuffer eglCreateStreamFromFileDescriptorKHR(long dpy, int file_descriptor)  {
 final long __addr_ = _table._addressof_eglCreateStreamFromFileDescriptorKHR;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "eglCreateStreamFromFileDescriptorKHR"));
 }
 final ByteBuffer _res;
 _res = dispatch_eglCreateStreamFromFileDescriptorKHR0(dpy, file_descriptor, __addr_);
 if (_res == null) return null;
 Buffers.nativeOrder(_res);
 return _res;
}

代码示例来源:origin: org.jogamp.joal/joal

/** Entry point (through function pointer) to C language function: <br> <code>ALCcontext *  alcGetThreadContext(void)</code><br>   */
public ALCcontext alcGetThreadContext()  {
 final long __addr_ = alExtProcAddressTable._addressof_alcGetThreadContext;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "alcGetThreadContext"));
 }
 final ByteBuffer _res;
 _res = dispatch_alcGetThreadContext1(__addr_);
 if (_res == null) return null;
 return ALCcontext.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: org.jogamp.joal/joal

/** Entry point (through function pointer) to C language function: <br> <code>ALCdevice *  alcLoopbackOpenDeviceSOFT(const ALCchar *  deviceName)</code><br>   */
public ALCdevice alcLoopbackOpenDeviceSOFT(String deviceName)  {
 final long __addr_ = alExtProcAddressTable._addressof_alcLoopbackOpenDeviceSOFT;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "alcLoopbackOpenDeviceSOFT"));
 }
 final ByteBuffer _res;
 _res = dispatch_alcLoopbackOpenDeviceSOFT1(deviceName, __addr_);
 if (_res == null) return null;
 return ALCdevice.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: org.jogamp.joal/joal

/** Entry point (through function pointer) to C language function: <br> <code>ALCcontext *  alcGetCurrentContext(void)</code><br>   */
public ALCcontext alcGetCurrentContext()  {
 final long __addr_ = alcProcAddressTable._addressof_alcGetCurrentContext;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "alcGetCurrentContext"));
 }
 final ByteBuffer _res;
 _res = dispatch_alcGetCurrentContext1(__addr_);
 if (_res == null) return null;
 return ALCcontext.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: org.jogamp.joal/joal

/** Entry point (through function pointer) to C language function: <br> <code>ALCdevice *  alcOpenDevice(const ALCchar *  devicename)</code><br>   */
public ALCdevice alcOpenDevice(String devicename)  {
 final long __addr_ = alcProcAddressTable._addressof_alcOpenDevice;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "alcOpenDevice"));
 }
 final ByteBuffer _res;
 _res = dispatch_alcOpenDevice1(devicename, __addr_);
 if (_res == null) return null;
 return ALCdevice.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/** Entry point to C language function: <code> EGLClientBuffer eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor) </code> <br>Part of <code>EGL_KHR_stream_cross_process_fd</code>   */
public ByteBuffer eglCreateStreamFromFileDescriptorKHR(long dpy, int file_descriptor)  {
 final long __addr_ = _context.getEGLExtProcAddressTable()._addressof_eglCreateStreamFromFileDescriptorKHR;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "eglCreateStreamFromFileDescriptorKHR"));
 }
 final ByteBuffer _res;
 _res = dispatch_eglCreateStreamFromFileDescriptorKHR0(dpy, file_descriptor, __addr_);
 if (_res == null) return null;
 Buffers.nativeOrder(_res);
 return _res;
}

代码示例来源:origin: org.jogamp.joal/joal

/** Entry point (through function pointer) to C language function: <br> <code>ALCdevice *  alcCaptureOpenDevice(const ALCchar *  devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize)</code><br>   */
public ALCdevice alcCaptureOpenDevice(String devicename, int frequency, int format, int buffersize)  {
 final long __addr_ = alcProcAddressTable._addressof_alcCaptureOpenDevice;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "alcCaptureOpenDevice"));
 }
 final ByteBuffer _res;
 _res = dispatch_alcCaptureOpenDevice1(devicename, frequency, format, buffersize, __addr_);
 if (_res == null) return null;
 return ALCdevice.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: org.jogamp.joal/joal

/** Entry point (through function pointer) to C language function: <br> <code>ALCdevice *  alcGetContextsDevice(ALCcontext *  context)</code><br>   */
public ALCdevice alcGetContextsDevice(ALCcontext context)  {
 final long __addr_ = alcProcAddressTable._addressof_alcGetContextsDevice;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "alcGetContextsDevice"));
 }
 final ByteBuffer _res;
 _res = dispatch_alcGetContextsDevice1(((context == null) ? null : context.getBuffer()), __addr_);
 if (_res == null) return null;
 return ALCdevice.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/** Interface to C language function: <br> <code> XRenderPictFormat *  XRenderFindVisualFormat(Display *  dpy, const Visual *  visual) </code>    */
public static XRenderPictFormat XRenderFindVisualFormat(long dpy, long visual)  {
 final ByteBuffer _res;
 _res = XRenderFindVisualFormat1(dpy, visual);
 if (_res == null) return null;
 return XRenderPictFormat.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/** Entry point to C language function: <code> LPVOID wglAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority) </code> <br>Part of <code>WGL_NV_vertex_array_range</code>   */
public ByteBuffer wglAllocateMemoryNV(int size, float readfreq, float writefreq, float priority)  {
 final long __addr_ = _context.getWGLExtProcAddressTable()._addressof_wglAllocateMemoryNV;
 if (__addr_ == 0) {
  throw new GLException(String.format("Method \"%s\" not available", "wglAllocateMemoryNV"));
 }
 final ByteBuffer _res;
 _res = dispatch_wglAllocateMemoryNV0(size, readfreq, writefreq, priority, __addr_);
 if (_res == null) return null;
 Buffers.nativeOrder(_res);
 return _res;
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/** Entry point to C language function: <code> GLvoid *  glXAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority) </code> <br>Part of <code>GLX_NV_vertex_array_range</code>   */
public ByteBuffer glXAllocateMemoryNV(int size, float readfreq, float writefreq, float priority)  {
 final long __addr_ = _context.getGLXExtProcAddressTable()._addressof_glXAllocateMemoryNV;
 if (__addr_ == 0) {
  throw new GLException(String.format("Method \"%s\" not available", "glXAllocateMemoryNV"));
 }
 final ByteBuffer _res;
 _res = dispatch_glXAllocateMemoryNV0(size, readfreq, writefreq, priority, __addr_);
 if (_res == null) return null;
 Buffers.nativeOrder(_res);
 return _res;
}

代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt

/** Entry point to C language function: <code> const char *  glXQueryCurrentRendererStringMESA(int attribute) </code> <br>Part of <code>GLX_MESA_query_renderer</code><br>   */
public ByteBuffer glXQueryCurrentRendererStringMESA(int attribute)  {
 final long __addr_ = _context.getGLXExtProcAddressTable()._addressof_glXQueryCurrentRendererStringMESA;
 if (__addr_ == 0) {
  throw new GLException(String.format("Method \"%s\" not available", "glXQueryCurrentRendererStringMESA"));
 }
 final ByteBuffer _res;
 _res = dispatch_glXQueryCurrentRendererStringMESA0(attribute, __addr_);
 if (_res == null) return null;
 Buffers.nativeOrder(_res);
 return _res;
}

代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt

/** Entry point to C language function: <code> const char *  glXQueryRendererStringMESA(Display *  dpy, int screen, int renderer, int attribute) </code> <br>Part of <code>GLX_MESA_query_renderer</code><br>   */
public ByteBuffer glXQueryRendererStringMESA(long dpy, int screen, int renderer, int attribute)  {
 final long __addr_ = _context.getGLXExtProcAddressTable()._addressof_glXQueryRendererStringMESA;
 if (__addr_ == 0) {
  throw new GLException(String.format("Method \"%s\" not available", "glXQueryRendererStringMESA"));
 }
 final ByteBuffer _res;
 _res = dispatch_glXQueryRendererStringMESA0(dpy, screen, renderer, attribute, __addr_);
 if (_res == null) return null;
 Buffers.nativeOrder(_res);
 return _res;
}

代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt

/** Entry point to C language function: <code> void *  wglAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority) </code> <br>Part of <code>WGL_NV_vertex_array_range</code><br>   */
public ByteBuffer wglAllocateMemoryNV(int size, float readfreq, float writefreq, float priority)  {
 final long __addr_ = _context.getWGLExtProcAddressTable()._addressof_wglAllocateMemoryNV;
 if (__addr_ == 0) {
  throw new GLException(String.format("Method \"%s\" not available", "wglAllocateMemoryNV"));
 }
 final ByteBuffer _res;
 _res = dispatch_wglAllocateMemoryNV0(size, readfreq, writefreq, priority, __addr_);
 if (_res == null) return null;
 Buffers.nativeOrder(_res);
 return _res;
}

代码示例来源:origin: org.jogamp.joal/joal

/** Entry point (through function pointer) to C language function: <br> <code>ALCcontext *  alcCreateContext(ALCdevice *  device, const ALCint *  attrlist)</code><br>   */
public ALCcontext alcCreateContext(ALCdevice device, int[] attrlist, int attrlist_offset)  {
 if(attrlist != null && attrlist.length <= attrlist_offset)
  throw new ALException("array offset argument \"attrlist_offset\" (" + attrlist_offset + ") equals or exceeds array length (" + attrlist.length + ")");
 final long __addr_ = alcProcAddressTable._addressof_alcCreateContext;
 if (__addr_ == 0) {
  throw new UnsupportedOperationException(String.format("Method \"%s\" not available", "alcCreateContext"));
 }
 final ByteBuffer _res;
 _res = dispatch_alcCreateContext1(((device == null) ? null : device.getBuffer()), attrlist, Buffers.SIZEOF_INT * attrlist_offset, false, __addr_);
 if (_res == null) return null;
 return ALCcontext.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/** Interface to C language function: <br> <code> JAWT_DrawingSurface *  GetDrawingSurface(JNIEnv *  env, jobject target) </code>    */
public JAWT_DrawingSurface GetDrawingSurface(Object target)  {
 final ByteBuffer _res;
 _res = GetDrawingSurface0(getBuffer(), target);
 if (_res == null) return null;
 return JAWT_DrawingSurface.create(Buffers.nativeOrder(_res));
}
/** Entry point to C language function: <code> JAWT_DrawingSurface *  GetDrawingSurface(JNIEnv *  env, jobject target) </code>    */

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/** Interface to C language function: <br> - Alias for: <br> <code> XVisualInfo *  glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig(Display *  dpy, GLXFBConfig config); </code>    */
public static XVisualInfo glXGetVisualFromFBConfig(long dpy, long config)
{
 final long __addr_ = glxProcAddressTable._addressof_glXGetVisualFromFBConfig;
 if (__addr_ == 0) {
   throw new GLException("Method \"glXGetVisualFromFBConfig\" not available");
 }
 final java.nio.ByteBuffer _res = dispatch_glXGetVisualFromFBConfig(dpy, config, __addr_);
 if (_res == null) return null;
 return XVisualInfo.create(Buffers.nativeOrder(_res));
}

代码示例来源:origin: ch.unibas.cs.gravis/scalismo-native-stub

/** Interface to C language function: <br> <code> JAWT_DrawingSurfaceInfo *  GetDrawingSurfaceInfo(JAWT_DrawingSurface *  ds) </code>    */
public JAWT_DrawingSurfaceInfo GetDrawingSurfaceInfo()  {
 final ByteBuffer _res;
 _res = GetDrawingSurfaceInfo0(getBuffer());
 if (_res == null) return null;
 return JAWT_DrawingSurfaceInfo.create(Buffers.nativeOrder(_res));
}
/** Entry point to C language function: <code> JAWT_DrawingSurfaceInfo *  GetDrawingSurfaceInfo(JAWT_DrawingSurface *  ds) </code>    */

代码示例来源:origin: org.jogamp.jogl/jogl-all-noawt

/** Interface to C language function: <br> - Alias for: <br> <code> XVisualInfo *  glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig(Display *  dpy, GLXFBConfig config); </code>    */
public static XVisualInfo glXGetVisualFromFBConfig(long dpy, long config)
{
 final long __addr_ = glxProcAddressTable._addressof_glXGetVisualFromFBConfig;
 if (__addr_ == 0) {
   throw new GLException("Method \"glXGetVisualFromFBConfig\" not available");
 }
 final java.nio.ByteBuffer _res = dispatch_glXGetVisualFromFBConfig(dpy, config, __addr_);
 if (_res == null) return null;
 return XVisualInfo.create(Buffers.nativeOrder(_res));
}

相关文章