/** * Returns the GLX error value, i.e. 0 for no error. In case of an error values.get(values.getPosition()) contains the attributes index causing the error. *
* Entry point to C language function: int glXGetFBConfigAttrib(Display * dpy, GLXFBConfig config, int attribute, int * value);
Part of GLX_VERSION_1_3
*
XVisualInfo * glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config);
*/
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(com.jogamp.common.nio.Buffers.class, dpy, config, __addr_);
if (_res == null) return null;
return XVisualInfo.create(Buffers.nativeOrder(_res));
}
/** Entry point to C language function: - Alias for: XVisualInfo * glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config);
*/
private static native java.nio.ByteBuffer dispatch_glXGetVisualFromFBConfig(Class clazzBuffers, long dpy, long config, long procAddr);
/** Entry point to C language function: GLXFBConfig * glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems);
GLXFBConfig * glXChooseFBConfig(Display * dpy, int screen, const int * attribList, int * nitems);
GLXFBConfig * glXGetFBConfigs(Display * dpy, int screen, int * nelements);
GLX_VERSION_1_3
@param nelements a direct only {@link java.nio.IntBuffer} */
public static PointerBuffer glXGetFBConfigs(long dpy, int screen, IntBuffer nelements) {
if (!Buffers.isDirect(nelements))
throw new GLException("Argument \"nelements\" is not a direct buffer");
final long __addr_ = glxProcAddressTable._addressof_glXGetFBConfigs;
if (__addr_ == 0) {
throw new GLException(String.format("Method \"%s\" not available", "glXGetFBConfigs"));
}
final ByteBuffer _res = dispatch_glXGetFBConfigs(com.jogamp.common.nio.Buffers.class, dpy, screen, nelements, Buffers.getDirectBufferByteOffset(nelements), __addr_);
if (_res == null) return null;
return PointerBuffer.wrap(Buffers.nativeOrder(_res));
}
/** Entry point to C language function: GLXFBConfig * glXGetFBConfigs(Display * dpy, int screen, int * nelements);
GLX_VERSION_1_3
@param nelements a direct only {@link java.nio.IntBuffer} */
private static native ByteBuffer dispatch_glXGetFBConfigs(Class clazzBuffers, long dpy, int screen, Object nelements, int nelements_byte_offset, long procAddress);
/** Entry point to C language function: XVisualInfo * glXChooseVisual(Display * dpy, int screen, int * attribList);
GLX_VERSION_1_X
@param attribList a direct only {@link java.nio.IntBuffer} */
public static XVisualInfo glXChooseVisual(long dpy, int screen, IntBuffer attribList) {
if (!Buffers.isDirect(attribList))
throw new GLException("Argument \"attribList\" is not a direct buffer");
final long __addr_ = glxProcAddressTable._addressof_glXChooseVisual;
if (__addr_ == 0) {
throw new GLException("Method \"glXChooseVisual\" not available");
}
final ByteBuffer _res = dispatch_glXChooseVisual(com.jogamp.common.nio.Buffers.class, dpy, screen, attribList, Buffers.getDirectBufferByteOffset(attribList), __addr_);
if (_res == null) return null;
return XVisualInfo.create(Buffers.nativeOrder(_res));
}
/** Entry point to C language function: XVisualInfo * glXChooseVisual(Display * dpy, int screen, int * attribList);
GLX_VERSION_1_X
@param attribList a direct only {@link java.nio.IntBuffer} */
private static native ByteBuffer dispatch_glXChooseVisual(Class clazzBuffers, long dpy, int screen, Object attribList, int attribList_byte_offset, long procAddress);