All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jogamp.opengl.macosx.cgl.CGL Maven / Gradle / Ivy

The newest version!
/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/opengl/GLEmitter.java on Sat Oct 10 03:20:25 CEST 2015 ----! */

package jogamp.opengl.macosx.cgl;

import java.util.*;
import com.jogamp.opengl.*;
import com.jogamp.opengl.fixedfunc.*;
import jogamp.opengl.*;
import com.jogamp.common.util.Function;
import jogamp.nativewindow.macosx.OSXUtil;
import com.jogamp.gluegen.runtime.*;
import com.jogamp.common.os.*;
import com.jogamp.common.nio.*;
import java.nio.*;

 /**
  * Provides access to the MacOSX-specific OpenGL vendor extensions.
  * See {@link GLBase} for more information.
  */
public class CGL {

  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAAllRenderers = 0x1;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFADoubleBuffer = 0x5;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAStereo = 0x6;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAAuxBuffers = 0x7;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAColorSize = 0x8;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAAlphaSize = 0xb;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFADepthSize = 0xc;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAStencilSize = 0xd;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAAccumSize = 0xe;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAMinimumPolicy = 0x33;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAMaximumPolicy = 0x34;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAOffScreen = 0x35;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAFullScreen = 0x36;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFASampleBuffers = 0x37;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFASamples = 0x38;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAAuxDepthStencil = 0x39;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAColorFloat = 0x3a;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAMultisample = 0x3b;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFASupersample = 0x3c;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFASampleAlpha = 0x3d;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFARendererID = 0x46;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFASingleRenderer = 0x47;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFANoRecovery = 0x48;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAAccelerated = 0x49;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAClosestPolicy = 0x4a;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFARobust = 0x4b;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFABackingStore = 0x4c;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAMPSafe = 0x4e;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAWindow = 0x50;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAMultiScreen = 0x51;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFACompliant = 0x53;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFADisplayMask = 0x54;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAPBuffer = 0x5a;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFARemotePBuffer = 0x5b;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAAcceleratedCompute = 0x61;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAOpenGLProfile = 0x63;
  /** Defined as part of enum type "CGLPixelFormatAttribute" - CType: int */
  public static final int kCGLPFAVirtualScreenCount = 0x80;
  /** Defined as part of enum type "CGLOpenGLProfile" - CType: int */
  public static final int kCGLOGLPVersion_Legacy = 0x1000;
  /** Defined as part of enum type "CGLOpenGLProfile" - CType: int */
  public static final int kCGLOGLPVersion_GL3_Core = 0x3200;
  /** Defined as part of enum type "CGLOpenGLProfile" - CType: int */
  public static final int kCGLOGLPVersion_GL4_Core = 0x4100;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAAllRenderers = 0x1;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFADoubleBuffer = 0x5;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAStereo = 0x6;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAAuxBuffers = 0x7;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAColorSize = 0x8;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAAlphaSize = 0xb;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFADepthSize = 0xc;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAStencilSize = 0xd;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAAccumSize = 0xe;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAMinimumPolicy = 0x33;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAMaximumPolicy = 0x34;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAOffScreen = 0x35;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAFullScreen = 0x36;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFASampleBuffers = 0x37;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFASamples = 0x38;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAAuxDepthStencil = 0x39;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAColorFloat = 0x3a;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAMultisample = 0x3b;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFASupersample = 0x3c;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFASampleAlpha = 0x3d;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFARendererID = 0x46;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFASingleRenderer = 0x47;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFANoRecovery = 0x48;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAAccelerated = 0x49;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAClosestPolicy = 0x4a;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFARobust = 0x4b;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFABackingStore = 0x4c;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAMPSafe = 0x4e;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAWindow = 0x50;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAMultiScreen = 0x51;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFACompliant = 0x53;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAScreenMask = 0x54;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAPixelBuffer = 0x5a;
  /** Defined as part of enum type "NSOpenGLPixelFormatAttribute" - CType: int */
  public static final int NSOpenGLPFAVirtualScreenCount = 0x80;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLNoError = 0x0;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadAttribute = 0x2710;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadProperty = 0x2711;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadPixelFormat = 0x2712;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadRendererInfo = 0x2713;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadContext = 0x2714;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadDrawable = 0x2715;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadDisplay = 0x2716;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadState = 0x2717;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadValue = 0x2718;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadMatch = 0x2719;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadEnumeration = 0x271a;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadOffScreen = 0x271b;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadFullScreen = 0x271c;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadWindow = 0x271d;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadAddress = 0x271e;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadCodeModule = 0x271f;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadAlloc = 0x2720;
  /** Defined as part of enum type "CGLError" - CType: int */
  public static final int kCGLBadConnection = 0x2721;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPSwapRectangle = 0xc8;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPSwapInterval = 0xde;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPDispatchTableSize = 0xe0;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPClientStorage = 0xe2;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPSurfaceTexture = 0xe4;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPSurfaceOrder = 0xeb;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPSurfaceOpacity = 0xec;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPSurfaceBackingSize = 0x130;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPSurfaceSurfaceVolatile = 0x132;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPReclaimResources = 0x134;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPCurrentRendererID = 0x135;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPGPUVertexProcessing = 0x136;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPGPUFragmentProcessing = 0x137;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPHasDrawable = 0x13a;
  /** Defined as part of enum type "CGLContextParameter" - CType: int */
  public static final int kCGLCPMPSwapsInFlight = 0x13b;

  /** Interface to C language function: 
CGLError CGLChoosePixelFormat(CGLPixelFormatAttribute * attribs, CGLPixelFormatObj * pix, GLint * npix)
@param attribs a direct only {@link java.nio.IntBuffer} @param pix a direct only {@link com.jogamp.common.nio.PointerBuffer} @param npix a direct only {@link java.nio.IntBuffer} */ public static int CGLChoosePixelFormat(IntBuffer attribs, PointerBuffer pix, IntBuffer npix) { if (!Buffers.isDirect(attribs)) throw new GLException("Argument \"attribs\" is not a direct buffer"); if (!Buffers.isDirect(pix)) throw new GLException("Argument \"pix\" is not a direct buffer"); if (!Buffers.isDirect(npix)) throw new GLException("Argument \"npix\" is not a direct buffer"); return CGLChoosePixelFormat0(attribs, Buffers.getDirectBufferByteOffset(attribs), pix != null ? pix.getBuffer() : null, Buffers.getDirectBufferByteOffset(pix), npix, Buffers.getDirectBufferByteOffset(npix)); } /** Entry point to C language function: CGLError CGLChoosePixelFormat(CGLPixelFormatAttribute * attribs, CGLPixelFormatObj * pix, GLint * npix)
@param attribs a direct only {@link java.nio.IntBuffer} @param pix a direct only {@link com.jogamp.common.nio.PointerBuffer} @param npix a direct only {@link java.nio.IntBuffer} */ private static native int CGLChoosePixelFormat0(Object attribs, int attribs_byte_offset, Object pix, int pix_byte_offset, Object npix, int npix_byte_offset); /** Interface to C language function:
CGLError CGLDestroyPixelFormat(CGLPixelFormatObj pix)
*/ public static native int CGLDestroyPixelFormat(long pix); /** Interface to C language function:
CGLPixelFormatObj CGLGetPixelFormat(CGLContextObj ctx)
*/ public static native long CGLGetPixelFormat(long ctx); /** Interface to C language function:
CGLError CGLCreateContext(CGLPixelFormatObj pix, CGLContextObj share, CGLContextObj * ctx)
@param ctx a direct only {@link com.jogamp.common.nio.PointerBuffer} */ public static int CGLCreateContext(long pix, long share, PointerBuffer ctx) { if (!Buffers.isDirect(ctx)) throw new GLException("Argument \"ctx\" is not a direct buffer"); return CGLCreateContext0(pix, share, ctx != null ? ctx.getBuffer() : null, Buffers.getDirectBufferByteOffset(ctx)); } /** Entry point to C language function: CGLError CGLCreateContext(CGLPixelFormatObj pix, CGLContextObj share, CGLContextObj * ctx)
@param ctx a direct only {@link com.jogamp.common.nio.PointerBuffer} */ private static native int CGLCreateContext0(long pix, long share, Object ctx, int ctx_byte_offset); /** Interface to C language function:
void CGLReleaseContext(CGLContextObj ctx)
*/ public static native void CGLReleaseContext(long ctx); /** Interface to C language function:
CGLError CGLDestroyContext(CGLContextObj ctx)
*/ public static native int CGLDestroyContext(long ctx); /** Interface to C language function:
CGLError CGLLockContext(CGLContextObj ctx)
*/ public static native int CGLLockContext(long ctx); /** Interface to C language function:
CGLError CGLUnlockContext(CGLContextObj ctx)
*/ public static native int CGLUnlockContext(long ctx); /** Interface to C language function:
CGLError CGLSetCurrentContext(CGLContextObj ctx)
*/ public static native int CGLSetCurrentContext(long ctx); /** Interface to C language function:
CGLContextObj CGLGetCurrentContext(void)
*/ public static native long CGLGetCurrentContext(); /** Interface to C language function:
CGLError CGLFlushDrawable(CGLContextObj ctx)
*/ public static native int CGLFlushDrawable(long ctx); /** Interface to C language function:
CGLError CGLSetParameter(CGLContextObj ctx, CGLContextParameter pname, const int * params)
@param pname valid values are: kCGLCPSwapRectangle, kCGLCPSwapInterval, kCGLCPDispatchTableSize, kCGLCPClientStorage, kCGLCPSurfaceTexture, kCGLCPSurfaceOrder, kCGLCPSurfaceOpacity, kCGLCPSurfaceBackingSize, kCGLCPSurfaceSurfaceVolatile, kCGLCPReclaimResources, kCGLCPCurrentRendererID, kCGLCPGPUVertexProcessing, kCGLCPGPUFragmentProcessing, kCGLCPHasDrawable, kCGLCPMPSwapsInFlight @param params a direct only {@link java.nio.IntBuffer} */ public static int CGLSetParameter(long ctx, int pname, IntBuffer params) { if (!Buffers.isDirect(params)) throw new GLException("Argument \"params\" is not a direct buffer"); return CGLSetParameter0(ctx, pname, params, Buffers.getDirectBufferByteOffset(params)); } /** Entry point to C language function: CGLError CGLSetParameter(CGLContextObj ctx, CGLContextParameter pname, const int * params)
@param pname valid values are: kCGLCPSwapRectangle, kCGLCPSwapInterval, kCGLCPDispatchTableSize, kCGLCPClientStorage, kCGLCPSurfaceTexture, kCGLCPSurfaceOrder, kCGLCPSurfaceOpacity, kCGLCPSurfaceBackingSize, kCGLCPSurfaceSurfaceVolatile, kCGLCPReclaimResources, kCGLCPCurrentRendererID, kCGLCPGPUVertexProcessing, kCGLCPGPUFragmentProcessing, kCGLCPHasDrawable, kCGLCPMPSwapsInFlight @param params a direct only {@link java.nio.IntBuffer} */ private static native int CGLSetParameter0(long ctx, int pname, Object params, int params_byte_offset); /** Interface to C language function:
CGLError CGLCopyContext(CGLContextObj src, CGLContextObj dst, int mask)
*/ public static native int CGLCopyContext(long src, long dst, int mask); /** Interface to C language function:
CGLShareGroupObj CGLGetShareGroup(CGLContextObj ctx)
*/ public static native long CGLGetShareGroup(long ctx); /** Interface to C language function:
CGLError CGLCreatePBuffer(GLsizei width, GLsizei height, GLenum target, GLenum internalFormat, GLint max_level, CGLPBufferObj * pbuffer)
@param pbuffer a direct only {@link com.jogamp.common.nio.PointerBuffer} */ public static int CGLCreatePBuffer(int width, int height, int target, int internalFormat, int max_level, PointerBuffer pbuffer) { if (!Buffers.isDirect(pbuffer)) throw new GLException("Argument \"pbuffer\" is not a direct buffer"); return CGLCreatePBuffer0(width, height, target, internalFormat, max_level, pbuffer != null ? pbuffer.getBuffer() : null, Buffers.getDirectBufferByteOffset(pbuffer)); } /** Entry point to C language function: CGLError CGLCreatePBuffer(GLsizei width, GLsizei height, GLenum target, GLenum internalFormat, GLint max_level, CGLPBufferObj * pbuffer)
@param pbuffer a direct only {@link com.jogamp.common.nio.PointerBuffer} */ private static native int CGLCreatePBuffer0(int width, int height, int target, int internalFormat, int max_level, Object pbuffer, int pbuffer_byte_offset); /** Interface to C language function:
CGLError CGLDestroyPBuffer(CGLPBufferObj pbuffer)
*/ public static native int CGLDestroyPBuffer(long pbuffer); /** Interface to C language function:
CGLError CGLSetPBuffer(CGLContextObj ctx, CGLPBufferObj pbuffer, GLenum face, GLint level, GLint screen)
*/ public static native int CGLSetPBuffer(long ctx, long pbuffer, int face, int level, int screen); /** Interface to C language function:
void CGLQueryPixelFormat(CGLPixelFormatObj fmt, int * iattrs, int niattrs, int * ivalues)
@param iattrs a direct only {@link java.nio.IntBuffer} @param ivalues a direct only {@link java.nio.IntBuffer} */ public static void CGLQueryPixelFormat(long fmt, IntBuffer iattrs, int niattrs, IntBuffer ivalues) { if (!Buffers.isDirect(iattrs)) throw new GLException("Argument \"iattrs\" is not a direct buffer"); if (!Buffers.isDirect(ivalues)) throw new GLException("Argument \"ivalues\" is not a direct buffer"); CGLQueryPixelFormat0(fmt, iattrs, Buffers.getDirectBufferByteOffset(iattrs), niattrs, ivalues, Buffers.getDirectBufferByteOffset(ivalues)); } /** Entry point to C language function: void CGLQueryPixelFormat(CGLPixelFormatObj fmt, int * iattrs, int niattrs, int * ivalues)
@param iattrs a direct only {@link java.nio.IntBuffer} @param ivalues a direct only {@link java.nio.IntBuffer} */ private static native void CGLQueryPixelFormat0(long fmt, Object iattrs, int iattrs_byte_offset, int niattrs, Object ivalues, int ivalues_byte_offset); /** Interface to C language function:
NSOpenGLPixelFormat * createPixelFormat(int * iattrs, int niattrs, int * ivalues)
@param iattrs a direct only {@link java.nio.IntBuffer} @param ivalues a direct only {@link java.nio.IntBuffer} */ public static long createPixelFormat(IntBuffer iattrs, int niattrs, IntBuffer ivalues) { if (!Buffers.isDirect(iattrs)) throw new GLException("Argument \"iattrs\" is not a direct buffer"); if (!Buffers.isDirect(ivalues)) throw new GLException("Argument \"ivalues\" is not a direct buffer"); return createPixelFormat0(iattrs, Buffers.getDirectBufferByteOffset(iattrs), niattrs, ivalues, Buffers.getDirectBufferByteOffset(ivalues)); } /** Entry point to C language function: NSOpenGLPixelFormat * createPixelFormat(int * iattrs, int niattrs, int * ivalues)
@param iattrs a direct only {@link java.nio.IntBuffer} @param ivalues a direct only {@link java.nio.IntBuffer} */ private static native long createPixelFormat0(Object iattrs, int iattrs_byte_offset, int niattrs, Object ivalues, int ivalues_byte_offset); /** Interface to C language function:
void queryPixelFormat(NSOpenGLPixelFormat * fmt, int * iattrs, int niattrs, int * ivalues)
@param iattrs a direct only {@link java.nio.IntBuffer} @param ivalues a direct only {@link java.nio.IntBuffer} */ public static void queryPixelFormat(long fmt, IntBuffer iattrs, int niattrs, IntBuffer ivalues) { if (!Buffers.isDirect(iattrs)) throw new GLException("Argument \"iattrs\" is not a direct buffer"); if (!Buffers.isDirect(ivalues)) throw new GLException("Argument \"ivalues\" is not a direct buffer"); queryPixelFormat0(fmt, iattrs, Buffers.getDirectBufferByteOffset(iattrs), niattrs, ivalues, Buffers.getDirectBufferByteOffset(ivalues)); } /** Entry point to C language function: void queryPixelFormat(NSOpenGLPixelFormat * fmt, int * iattrs, int niattrs, int * ivalues)
@param iattrs a direct only {@link java.nio.IntBuffer} @param ivalues a direct only {@link java.nio.IntBuffer} */ private static native void queryPixelFormat0(long fmt, Object iattrs, int iattrs_byte_offset, int niattrs, Object ivalues, int ivalues_byte_offset); /** Interface to C language function:
void deletePixelFormat(NSOpenGLPixelFormat * fmt)
*/ public static native void deletePixelFormat(long fmt); /** Interface to C language function:
NSOpenGLContext * getCurrentContext(void)
*/ public static native long getCurrentContext(); /** Interface to C language function:
CGLContextObj getCGLContext(NSOpenGLContext * ctx)
*/ public static native long getCGLContext(long ctx); /** Interface to C language function:
NSView * getNSView(NSOpenGLContext * ctx)
*/ public static native long getNSView(long ctx); /** Interface to C language function:
NSOpenGLContext * createContext(NSOpenGLContext * shareContext, NSView * nsView, Bool incompleteView, NSOpenGLPixelFormat * pixelFormat, Bool opaque, int * viewNotReady)
@param viewNotReady a direct only {@link java.nio.IntBuffer} */ public static long createContext(long shareContext, long nsView, boolean incompleteView, long pixelFormat, boolean opaque, IntBuffer viewNotReady) { if (!Buffers.isDirect(viewNotReady)) throw new GLException("Argument \"viewNotReady\" is not a direct buffer"); return createContext0(shareContext, nsView, incompleteView, pixelFormat, opaque, viewNotReady, Buffers.getDirectBufferByteOffset(viewNotReady)); } /** Entry point to C language function: NSOpenGLContext * createContext(NSOpenGLContext * shareContext, NSView * nsView, Bool incompleteView, NSOpenGLPixelFormat * pixelFormat, Bool opaque, int * viewNotReady)
@param viewNotReady a direct only {@link java.nio.IntBuffer} */ private static native long createContext0(long shareContext, long nsView, boolean incompleteView, long pixelFormat, boolean opaque, Object viewNotReady, int viewNotReady_byte_offset); /** Interface to C language function:
void setContextView(NSOpenGLContext * ctx, NSView * view)
*/ public static native void setContextView(long ctx, long view); /** Interface to C language function:
void clearDrawable(NSOpenGLContext * ctx)
*/ public static native void clearDrawable(long ctx); /** Interface to C language function:
Bool makeCurrentContext(NSOpenGLContext * ctx)
*/ public static native boolean makeCurrentContext(long ctx); /** Interface to C language function:
Bool clearCurrentContext(NSOpenGLContext * ctx)
*/ public static native boolean clearCurrentContext(long ctx); /** Interface to C language function:
Bool deleteContext(NSOpenGLContext * ctx, Bool releaseOnMainThread)
*/ public static native boolean deleteContext(long ctx, boolean releaseOnMainThread); /** Interface to C language function:
Bool flushBuffer(NSOpenGLContext * ctx)
*/ public static native boolean flushBuffer(long ctx); /** Interface to C language function:
void setContextOpacity(NSOpenGLContext * ctx, int opacity)
*/ public static native void setContextOpacity(long ctx, int opacity); /** Interface to C language function:
void updateContext(NSOpenGLContext * ctx)
*/ public static native void updateContext(long ctx); /** Interface to C language function:
void copyContext(NSOpenGLContext * dest, NSOpenGLContext * src, int mask)
*/ public static native void copyContext(long dest, long src, int mask); /** Interface to C language function:
void * updateContextRegister(NSOpenGLContext * ctx, NSView * view)
*/ public static native long updateContextRegister(long ctx, long view); /** Interface to C language function:
Bool updateContextNeedsUpdate(void * updater)
*/ public static native boolean updateContextNeedsUpdate(long updater); /** Interface to C language function:
void updateContextUnregister(void * updater)
*/ public static native void updateContextUnregister(long updater); /** Interface to C language function:
NSOpenGLPixelBuffer * createPBuffer(int renderTarget, int internalFormat, int width, int height)
*/ public static native long createPBuffer(int renderTarget, int internalFormat, int width, int height); /** Interface to C language function:
Bool destroyPBuffer(NSOpenGLPixelBuffer * pBuffer)
*/ public static native boolean destroyPBuffer(long pBuffer); /** Interface to C language function:
void setContextPBuffer(NSOpenGLContext * ctx, NSOpenGLPixelBuffer * pBuffer)
*/ public static native void setContextPBuffer(long ctx, long pBuffer); /** Interface to C language function:
void setContextTextureImageToPBuffer(NSOpenGLContext * ctx, NSOpenGLPixelBuffer * pBuffer, GLenum colorBuffer)
*/ public static native void setContextTextureImageToPBuffer(long ctx, long pBuffer, int colorBuffer); /** Interface to C language function:
Bool isNSOpenGLPixelBuffer(uint64_t object)
*/ public static native boolean isNSOpenGLPixelBuffer(long object); /** Interface to C language function:
NSOpenGLLayer * createNSOpenGLLayer(NSOpenGLContext * ctx, int gl3ShaderProgramName, NSOpenGLPixelFormat * fmt, NSOpenGLPixelBuffer * p, uint32_t texID, Bool opaque, int texWidth, int texHeight, int winWidth, int winHeight)
*/ private static native long createNSOpenGLLayerImpl(long ctx, int gl3ShaderProgramName, long fmt, long p, int texID, boolean opaque, int texWidth, int texHeight, int winWidth, int winHeight); /** Interface to C language function:
void setNSOpenGLLayerEnabled(NSOpenGLLayer * layer, Bool enable)
*/ private static native void setNSOpenGLLayerEnabledImpl(long layer, boolean enable); /** Interface to C language function:
void setNSOpenGLLayerSwapInterval(NSOpenGLLayer * layer, int interval)
*/ public static native void setNSOpenGLLayerSwapInterval(long layer, int interval); /** Interface to C language function:
void waitUntilNSOpenGLLayerIsReady(NSOpenGLLayer * layer, long to_micros)
*/ public static native void waitUntilNSOpenGLLayerIsReady(long layer, long to_micros); /** Interface to C language function:
void setNSOpenGLLayerNeedsDisplayFBO(NSOpenGLLayer * layer, uint32_t texID)
*/ public static native void setNSOpenGLLayerNeedsDisplayFBO(long layer, int texID); /** Interface to C language function:
void setNSOpenGLLayerNeedsDisplayPBuffer(NSOpenGLLayer * layer, NSOpenGLPixelBuffer * p)
*/ public static native void setNSOpenGLLayerNeedsDisplayPBuffer(long layer, long p); /** Interface to C language function:
void releaseNSOpenGLLayer(NSOpenGLLayer * glLayer)
*/ private static native void releaseNSOpenGLLayerImpl(long glLayer); /** Interface to C language function:
void * getProcAddress(const char * procName)
*/ public static native long getProcAddress(String procName); /** Interface to C language function:
void setSwapInterval(NSOpenGLContext * ctx, int interval)
*/ public static native void setSwapInterval(long ctx, int interval); /** Interface to C language function:
Bool setGammaRamp(int tableSize, float * redRamp, float * greenRamp, float * blueRamp)
@param redRamp a direct only {@link java.nio.FloatBuffer} @param greenRamp a direct only {@link java.nio.FloatBuffer} @param blueRamp a direct only {@link java.nio.FloatBuffer} */ public static boolean setGammaRamp(int tableSize, FloatBuffer redRamp, FloatBuffer greenRamp, FloatBuffer blueRamp) { if (!Buffers.isDirect(redRamp)) throw new GLException("Argument \"redRamp\" is not a direct buffer"); if (!Buffers.isDirect(greenRamp)) throw new GLException("Argument \"greenRamp\" is not a direct buffer"); if (!Buffers.isDirect(blueRamp)) throw new GLException("Argument \"blueRamp\" is not a direct buffer"); return setGammaRamp0(tableSize, redRamp, Buffers.getDirectBufferByteOffset(redRamp), greenRamp, Buffers.getDirectBufferByteOffset(greenRamp), blueRamp, Buffers.getDirectBufferByteOffset(blueRamp)); } /** Entry point to C language function: Bool setGammaRamp(int tableSize, float * redRamp, float * greenRamp, float * blueRamp)
@param redRamp a direct only {@link java.nio.FloatBuffer} @param greenRamp a direct only {@link java.nio.FloatBuffer} @param blueRamp a direct only {@link java.nio.FloatBuffer} */ private static native boolean setGammaRamp0(int tableSize, Object redRamp, int redRamp_byte_offset, Object greenRamp, int greenRamp_byte_offset, Object blueRamp, int blueRamp_byte_offset); /** Interface to C language function:
void resetGammaRamp()
*/ public static native void resetGammaRamp(); // --- Begin CustomJavaCode .cfg declarations /** * Creates the NSOpenGLLayer for FBO/PBuffer w/ optional GL3 shader program *

* The NSOpenGLLayer will immediatly create a OpenGL context sharing the given ctx, * which will be used to render the texture offthread. *

*

* The NSOpenGLLayer starts in enabled mode, * you may enable/disable it via {@link #setNSOpenGLLayerEnabled(long, boolean)}. *

*/ public static long createNSOpenGLLayer(final long ctx, final int gl3ShaderProgramName, final long fmt, final long p, final int texID, final boolean opaque, final int texWidth, final int texHeight, final int winWidth, final int winHeight) { return createNSOpenGLLayerImpl(ctx, gl3ShaderProgramName, fmt, p, texID, opaque, texWidth, texHeight, winWidth, winHeight); } /** * Enable or disable NSOpenGLLayer. * *

* If disabled, the NSOpenGLLayer will not be displayed, i.e. rendered. *

*/ public static void setNSOpenGLLayerEnabled(final long nsOpenGLLayer, final boolean enable) { setNSOpenGLLayerEnabledImpl(nsOpenGLLayer, enable); } /** * Releases the NSOpenGLLayer */ public static void releaseNSOpenGLLayer(final long nsOpenGLLayer) { releaseNSOpenGLLayerImpl(nsOpenGLLayer); } // ---- End CustomJavaCode .cfg declarations } // end of class CGL




© 2015 - 2024 Weber Informatics LLC | Privacy Policy