public class CGL
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CGL.Functions
Contains the function pointers loaded from
GL.getFunctionProvider(). |
| Modifier and Type | Field and Description |
|---|---|
static int |
kCGL0Bit
Depth and stencil buffer depths.
|
static int |
kCGL10Bit
Depth and stencil buffer depths.
|
static int |
kCGL128Bit
Depth and stencil buffer depths.
|
static int |
kCGL12Bit
Depth and stencil buffer depths.
|
static int |
kCGL16Bit
Depth and stencil buffer depths.
|
static int |
kCGL1Bit
Depth and stencil buffer depths.
|
static int |
kCGL24Bit
Depth and stencil buffer depths.
|
static int |
kCGL2Bit
Depth and stencil buffer depths.
|
static int |
kCGL32Bit
Depth and stencil buffer depths.
|
static int |
kCGL3Bit
Depth and stencil buffer depths.
|
static int |
kCGL48Bit
Depth and stencil buffer depths.
|
static int |
kCGL4Bit
Depth and stencil buffer depths.
|
static int |
kCGL5Bit
Depth and stencil buffer depths.
|
static int |
kCGL64Bit
Depth and stencil buffer depths.
|
static int |
kCGL6Bit
Depth and stencil buffer depths.
|
static int |
kCGL8Bit
Depth and stencil buffer depths.
|
static int |
kCGL96Bit
Depth and stencil buffer depths.
|
static int |
kCGLARGB12121212Bit
Color and accumulation buffer formats.
|
static int |
kCGLARGB1555Bit
Color and accumulation buffer formats.
|
static int |
kCGLARGB2101010Bit
Color and accumulation buffer formats.
|
static int |
kCGLARGB4444Bit
Color and accumulation buffer formats.
|
static int |
kCGLARGB8888Bit
Color and accumulation buffer formats.
|
static int |
kCGLBadAddress
CGL error return values.
|
static int |
kCGLBadAlloc
CGL error return values.
|
static int |
kCGLBadAttribute
CGL error return values.
|
static int |
kCGLBadCodeModule
CGL error return values.
|
static int |
kCGLBadConnection
CGL error return values.
|
static int |
kCGLBadContext
CGL error return values.
|
static int |
kCGLBadDisplay
CGL error return values.
|
static int |
kCGLBadDrawable
CGL error return values.
|
static int |
kCGLBadEnumeration
CGL error return values.
|
static int |
kCGLBadFullScreen
CGL error return values.
|
static int |
kCGLBadMatch
CGL error return values.
|
static int |
kCGLBadOffScreen
CGL error return values.
|
static int |
kCGLBadPixelFormat
CGL error return values.
|
static int |
kCGLBadProperty
CGL error return values.
|
static int |
kCGLBadRendererInfo
CGL error return values.
|
static int |
kCGLBadState
CGL error return values.
|
static int |
kCGLBadValue
CGL error return values.
|
static int |
kCGLBadWindow
CGL error return values.
|
static int |
kCGLCEDisplayListOptimization
|
static int |
kCGLCEMPEngine
|
static int |
kCGLCERasterization
|
static int |
kCGLCEStateValidation
|
static int |
kCGLCESurfaceBackingSize
|
static int |
kCGLCESwapLimit
|
static int |
kCGLCESwapRectangle
|
static int |
kCGLCPClientStorage
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPCurrentRendererID
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPDispatchTableSize
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPGPUFragmentProcessing
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPGPUVertexProcessing
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPHasDrawable
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPMPSwapsInFlight
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPReclaimResources
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPSurfaceBackingSize
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPSurfaceOpacity
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPSurfaceOrder
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPSurfaceSurfaceVolatile
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPSurfaceTexture
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPSwapInterval
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLCPSwapRectangle
Parameter names for
SetParameter and GetParameter. |
static int |
kCGLDoubleBufferBit
Buffer modes.
|
static int |
kCGLGOClearFormatCache
Option names for
SetGlobalOption and GetGlobalOption. |
static int |
kCGLGOFormatCacheSize
Option names for
SetGlobalOption and GetGlobalOption. |
static int |
kCGLGOResetLibrary
Option names for
SetGlobalOption and GetGlobalOption. |
static int |
kCGLGORetainRenderers
Option names for
SetGlobalOption and GetGlobalOption. |
static int |
kCGLGOUseBuildCache
Option names for
SetGlobalOption and GetGlobalOption. |
static int |
kCGLGOUseErrorHandler
Option names for
SetGlobalOption and GetGlobalOption. |
static int |
kCGLMonoscopicBit
Buffer modes.
|
static int |
kCGLMultisampleBit
Sampling modes.
|
static int |
kCGLNoError
CGL error return values.
|
static int |
kCGLOGLPVersion_3_2_Core
OpenGL Implementation Profiles.
|
static int |
kCGLOGLPVersion_Legacy
OpenGL Implementation Profiles.
|
static int |
kCGLPFAAccelerated
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAAcceleratedCompute
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAAccumSize
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAAllowOfflineRenderers
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAAllRenderers
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAAlphaSize
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAAuxBuffers
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAAuxDepthStencil
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFABackingStore
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFABackingVolatile
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAClosestPolicy
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAColorFloat
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAColorSize
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFACompliant
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFADepthSize
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFADisplayMask
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFADoubleBuffer
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAFullScreen
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAMaximumPolicy
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAMinimumPolicy
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAMPSafe
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAMultisample
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAMultiScreen
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFANoRecovery
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAOffScreen
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAOpenGLProfile
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAPBuffer
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFARemotePBuffer
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFARendererID
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFARobust
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFASampleAlpha
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFASampleBuffers
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFASamples
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFASingleRenderer
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAStencilSize
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAStereo
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFASupersample
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFASupportsAutomaticGraphicsSwitching
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFATripleBuffer
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAVirtualScreenCount
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLPFAWindow
Attribute names for
ChoosePixelFormat and DescribePixelFormat. |
static int |
kCGLRGB101010_A8Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB101010Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB121212Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB161616Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB444A8Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB444Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB555A8Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB555Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB565A8Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB565Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB888A8Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGB888Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGBA16161616Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGBAFloat128Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGBAFloat256Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGBAFloat64Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGBFloat128Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGBFloat256Bit
Color and accumulation buffer formats.
|
static int |
kCGLRGBFloat64Bit
Color and accumulation buffer formats.
|
static int |
kCGLRPAccelerated
Property names for
DescribeRenderer. |
static int |
kCGLRPAcceleratedCompute
Property names for
DescribeRenderer. |
static int |
kCGLRPAccumModes
Property names for
DescribeRenderer. |
static int |
kCGLRPBackingStore
Property names for
DescribeRenderer. |
static int |
kCGLRPBufferModes
Property names for
DescribeRenderer. |
static int |
kCGLRPColorModes
Property names for
DescribeRenderer. |
static int |
kCGLRPCompliant
Property names for
DescribeRenderer. |
static int |
kCGLRPDepthModes
Property names for
DescribeRenderer. |
static int |
kCGLRPDisplayMask
Property names for
DescribeRenderer. |
static int |
kCGLRPFullScreen
Property names for
DescribeRenderer. |
static int |
kCGLRPGPUFragProcCapable
Property names for
DescribeRenderer. |
static int |
kCGLRPGPUVertProcCapable
Property names for
DescribeRenderer. |
static int |
kCGLRPMaxAuxBuffers
Property names for
DescribeRenderer. |
static int |
kCGLRPMaxSampleBuffers
Property names for
DescribeRenderer. |
static int |
kCGLRPMaxSamples
Property names for
DescribeRenderer. |
static int |
kCGLRPMPSafe
Property names for
DescribeRenderer. |
static int |
kCGLRPMultiScreen
Property names for
DescribeRenderer. |
static int |
kCGLRPOffScreen
Property names for
DescribeRenderer. |
static int |
kCGLRPOnline
Property names for
DescribeRenderer. |
static int |
kCGLRPRendererCount
Property names for
DescribeRenderer. |
static int |
kCGLRPRendererID
Property names for
DescribeRenderer. |
static int |
kCGLRPRobust
Property names for
DescribeRenderer. |
static int |
kCGLRPSampleAlpha
Property names for
DescribeRenderer. |
static int |
kCGLRPSampleModes
Property names for
DescribeRenderer. |
static int |
kCGLRPStencilModes
Property names for
DescribeRenderer. |
static int |
kCGLRPTextureMemory
Property names for
DescribeRenderer. |
static int |
kCGLRPTextureMemoryMegabytes
Property names for
DescribeRenderer. |
static int |
kCGLRPVideoMemory
Property names for
DescribeRenderer. |
static int |
kCGLRPVideoMemoryMegabytes
Property names for
DescribeRenderer. |
static int |
kCGLRPWindow
Property names for
DescribeRenderer. |
static int |
kCGLSingleBufferBit
Buffer modes.
|
static int |
kCGLStereoscopicBit
Buffer modes.
|
static int |
kCGLSupersampleBit
Sampling modes.
|
static int |
kCGLTripleBufferBit
Buffer modes.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
CGLChoosePixelFormat(int[] attribs,
org.lwjgl.PointerBuffer pix,
int[] npix)
Array version of:
ChoosePixelFormat |
static int |
CGLChoosePixelFormat(java.nio.IntBuffer attribs,
org.lwjgl.PointerBuffer pix,
java.nio.IntBuffer npix)
Creates a pixel format object that satisfies the constraints of the specified buffer and renderer attributes.
|
static int |
CGLClearDrawable(long ctx)
Disassociates a rendering context from any drawable objects attached to it.
|
static int |
CGLCopyContext(long src,
long dst,
int mask)
Copies the specified state variables from one rendering context to another.
|
static int |
CGLCreateContext(long pix,
long share,
org.lwjgl.PointerBuffer ctx)
Creates a CGL rendering context.
|
static int |
CGLCreatePBuffer(int width,
int height,
int target,
int internalFormat,
int max_level,
org.lwjgl.PointerBuffer pbuffer)
Creates a pixel buffer of the specified size, compatible with the specified texture target.
|
static int |
CGLDescribePBuffer(long obj,
int[] width,
int[] height,
int[] target,
int[] internalFormat,
int[] mipmap)
Array version of:
DescribePBuffer |
static int |
CGLDescribePBuffer(long obj,
java.nio.IntBuffer width,
java.nio.IntBuffer height,
java.nio.IntBuffer target,
java.nio.IntBuffer internalFormat,
java.nio.IntBuffer mipmap)
Retrieves information that describes the specified pixel buffer object.
|
static int |
CGLDescribePixelFormat(long pix,
int pix_num,
int attrib,
int[] value)
Array version of:
DescribePixelFormat |
static int |
CGLDescribePixelFormat(long pix,
int pix_num,
int attrib,
java.nio.IntBuffer value)
Retrieves the values of an attribute associated with a pixel format object.
|
static int |
CGLDescribeRenderer(long rend,
int rend_num,
int prop,
int[] value)
Array version of:
DescribeRenderer |
static int |
CGLDescribeRenderer(long rend,
int rend_num,
int prop,
java.nio.IntBuffer value)
Obtains the value associated with a renderer property.
|
static int |
CGLDestroyContext(long ctx)
Frees the resources associated with a rendering context.
|
static int |
CGLDestroyPBuffer(long pbuffer)
Releases the resources associated with a pixel buffer object.
|
static int |
CGLDestroyPixelFormat(long pix)
Frees the memory associated with a pixel format object.
|
static int |
CGLDestroyRendererInfo(long rend)
Frees resources associated with a renderer information object.
|
static int |
CGLDisable(long ctx,
int pname)
Disables an option for a rendering context.
|
static int |
CGLEnable(long ctx,
int pname)
Enables an option for a rendering context.
|
static java.lang.String |
CGLErrorString(int error)
Returns a string that describes the specified result code.
|
static int |
CGLFlushDrawable(long ctx)
Copies the back buffer of a double-buffered context to the front buffer.
|
static int |
CGLGetContextRetainCount(long ctx)
Returns the current retain count of a CGL rendering context.
|
static long |
CGLGetCurrentContext()
Returns the current rendering context.
|
static int |
CGLGetGlobalOption(int pname,
int[] params)
Array version of:
GetGlobalOption |
static int |
CGLGetGlobalOption(int pname,
java.nio.IntBuffer params)
Retrieves the value of a global option.
|
static int |
CGLGetOffScreen(long ctx,
int[] width,
int[] height,
int[] rowbytes,
org.lwjgl.PointerBuffer baseaddr)
Array version of:
GetOffScreen |
static int |
CGLGetOffScreen(long ctx,
java.nio.IntBuffer width,
java.nio.IntBuffer height,
java.nio.IntBuffer rowbytes,
org.lwjgl.PointerBuffer baseaddr)
Retrieves an offscreen buffer and its parameters for a specified rendering context.
|
static int |
CGLGetParameter(long ctx,
int pname,
int[] params)
Array version of:
GetParameter |
static int |
CGLGetParameter(long ctx,
int pname,
java.nio.IntBuffer params)
Retrieves the value of a rendering context parameter.
|
static int |
CGLGetPBuffer(long ctx,
org.lwjgl.PointerBuffer pbuffer,
int[] face,
int[] level,
int[] screen)
Array version of:
GetPBuffer |
static int |
CGLGetPBuffer(long ctx,
org.lwjgl.PointerBuffer pbuffer,
java.nio.IntBuffer face,
java.nio.IntBuffer level,
java.nio.IntBuffer screen)
Retrieves a pixel buffer and its parameters for a specified rendering context.
|
static int |
CGLGetPBufferRetainCount(long pbuffer)
Returns the retain count of a pixel buffer object.
|
static long |
CGLGetPixelFormat(long ctx)
Retrieves the current pixel format associated with a CGL rendering context.
|
static int |
CGLGetPixelFormatRetainCount(long pix)
Returns the retain count of a pixel format object.
|
static long |
CGLGetShareGroup(long ctx)
Returns the sharegroup of the specified rendering context.
|
static void |
CGLGetVersion(int[] majorvers,
int[] minorvers)
Array version of:
GetVersion |
static void |
CGLGetVersion(java.nio.IntBuffer majorvers,
java.nio.IntBuffer minorvers)
Gets the major and minor version numbers of the CGL library.
|
static int |
CGLGetVirtualScreen(long ctx,
int[] screen)
Array version of:
GetVirtualScreen |
static int |
CGLGetVirtualScreen(long ctx,
java.nio.IntBuffer screen)
Gets the current virtual screen number associated with a rendering context.
|
static int |
CGLIsEnabled(long ctx,
int pname,
int[] enable)
Array version of:
IsEnabled |
static int |
CGLIsEnabled(long ctx,
int pname,
java.nio.IntBuffer enable)
Reports whether an option is enabled for a rendering context.
|
static int |
CGLLockContext(long context)
Locks a CGL rendering context.
|
static int |
CGLQueryRendererInfo(int display_mask,
org.lwjgl.PointerBuffer rend,
int[] nrend)
Array version of:
QueryRendererInfo |
static int |
CGLQueryRendererInfo(int display_mask,
org.lwjgl.PointerBuffer rend,
java.nio.IntBuffer nrend)
Creates a renderer information object that contains properties and values for renderers able to drive all the specified displays in a given display
mask.
|
static void |
CGLReleaseContext(long ctx)
Decrements the retain count on a CGL rendering context.
|
static void |
CGLReleasePBuffer(long pbuffer)
Releases the resources associated with a pixel buffer object.
|
static void |
CGLReleasePixelFormat(long pix)
Decrements the reference count of a pixel format object.
|
static long |
CGLRetainContext(long ctx)
Increments the retain count on a CGL rendering context.
|
static long |
CGLRetainPBuffer(long pbuffer)
Increments the retain count on a pixel buffer object.
|
static long |
CGLRetainPixelFormat(long pix)
Increments the receiver's reference count.
|
static int |
CGLSetCurrentContext(long context)
Sets the specified rendering context as the current rendering context.
|
static int |
CGLSetFullScreen(long ctx)
Attaches a rendering context to its full-screen drawable object.
|
static int |
CGLSetFullScreenOnDisplay(long ctx,
int display_mask)
Attaches a rendering context to a full-screen drawable object." +
|
static int |
CGLSetGlobalOption(int pname,
int param)
Sets the value of a global option.
|
static int |
CGLSetGlobalOption(int pname,
int[] params)
Array version of:
SetGlobalOption |
static int |
CGLSetGlobalOption(int pname,
java.nio.IntBuffer params)
Sets the value of a global option.
|
static int |
CGLSetOffScreen(long ctx,
int width,
int height,
int rowbytes,
java.nio.ByteBuffer baseaddr)
Attaches a rendering context to an offscreen buffer.
|
static int |
CGLSetParameter(long ctx,
int pname,
int param)
Sets the value of a rendering context parameter.
|
static int |
CGLSetParameter(long ctx,
int pname,
int[] params)
Array version of:
SetParameter |
static int |
CGLSetParameter(long ctx,
int pname,
java.nio.IntBuffer params)
Sets the value of a rendering context parameter.
|
static int |
CGLSetPBuffer(long ctx,
long pbuffer,
int face,
int level,
int screen)
Attaches a pixel buffer object to a rendering context.
|
static int |
CGLSetVirtualScreen(long ctx,
int screen)
Forces subsequent OpenGL commands to the specified virtual screen.
|
static int |
CGLTexImagePBuffer(long ctx,
long pbuffer,
int source)
Binds the contents of a pixel buffer to a data source for a texture object.
|
static int |
CGLUnlockContext(long context)
Unlocks a CGL rendering context.
|
static int |
CGLUpdateContext(long ctx)
Synchronizes new renderer state to that of the application context
|
static int |
nCGLChoosePixelFormat(long attribs,
long pix,
long npix)
Unsafe version of:
ChoosePixelFormat |
static int |
nCGLCreateContext(long pix,
long share,
long ctx)
Unsafe version of:
CreateContext |
static int |
nCGLCreatePBuffer(int width,
int height,
int target,
int internalFormat,
int max_level,
long pbuffer)
Unsafe version of:
CreatePBuffer |
static int |
nCGLDescribePBuffer(long obj,
long width,
long height,
long target,
long internalFormat,
long mipmap)
Unsafe version of:
DescribePBuffer |
static int |
nCGLDescribePixelFormat(long pix,
int pix_num,
int attrib,
long value)
Unsafe version of:
DescribePixelFormat |
static int |
nCGLDescribeRenderer(long rend,
int rend_num,
int prop,
long value)
Unsafe version of:
DescribeRenderer |
static long |
nCGLErrorString(int error)
Unsafe version of:
ErrorString |
static int |
nCGLGetGlobalOption(int pname,
long params)
Unsafe version of:
GetGlobalOption |
static int |
nCGLGetOffScreen(long ctx,
long width,
long height,
long rowbytes,
long baseaddr)
Unsafe version of:
GetOffScreen |
static int |
nCGLGetParameter(long ctx,
int pname,
long params)
Unsafe version of:
GetParameter |
static int |
nCGLGetPBuffer(long ctx,
long pbuffer,
long face,
long level,
long screen)
Unsafe version of:
GetPBuffer |
static void |
nCGLGetVersion(long majorvers,
long minorvers)
Unsafe version of:
GetVersion |
static int |
nCGLGetVirtualScreen(long ctx,
long screen)
Unsafe version of:
GetVirtualScreen |
static int |
nCGLIsEnabled(long ctx,
int pname,
long enable)
Unsafe version of:
IsEnabled |
static int |
nCGLQueryRendererInfo(int display_mask,
long rend,
long nrend)
Unsafe version of:
QueryRendererInfo |
static int |
nCGLSetGlobalOption(int pname,
long params)
Unsafe version of:
SetGlobalOption |
static int |
nCGLSetOffScreen(long ctx,
int width,
int height,
int rowbytes,
long baseaddr)
Unsafe version of:
SetOffScreen |
static int |
nCGLSetParameter(long ctx,
int pname,
long params)
Unsafe version of:
SetParameter |
public static final int kCGLPFAAllRenderers
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFATripleBuffer
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFADoubleBuffer
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAStereo
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAColorSize
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAAlphaSize
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFADepthSize
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAStencilSize
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAMinimumPolicy
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAMaximumPolicy
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFASampleBuffers
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFASamples
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAColorFloat
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAMultisample
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFASupersample
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFASampleAlpha
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFARendererID
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFASingleRenderer
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFANoRecovery
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAAccelerated
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAClosestPolicy
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFABackingStore
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFABackingVolatile
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFADisplayMask
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAAllowOfflineRenderers
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAAcceleratedCompute
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAOpenGLProfile
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFASupportsAutomaticGraphicsSwitching
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAVirtualScreenCount
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAAuxBuffers
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAAccumSize
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAOffScreen
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAAuxDepthStencil
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAWindow
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFACompliant
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAPBuffer
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFARemotePBuffer
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFARobust
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAMPSafe
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAMultiScreen
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLPFAFullScreen
ChoosePixelFormat and DescribePixelFormat.public static final int kCGLRPOffScreen
DescribeRenderer.public static final int kCGLRPRendererID
DescribeRenderer.public static final int kCGLRPAccelerated
DescribeRenderer.public static final int kCGLRPBackingStore
DescribeRenderer.public static final int kCGLRPWindow
DescribeRenderer.public static final int kCGLRPCompliant
DescribeRenderer.public static final int kCGLRPDisplayMask
DescribeRenderer.public static final int kCGLRPBufferModes
DescribeRenderer.public static final int kCGLRPColorModes
DescribeRenderer.public static final int kCGLRPAccumModes
DescribeRenderer.public static final int kCGLRPDepthModes
DescribeRenderer.public static final int kCGLRPStencilModes
DescribeRenderer.public static final int kCGLRPMaxAuxBuffers
DescribeRenderer.public static final int kCGLRPMaxSampleBuffers
DescribeRenderer.public static final int kCGLRPMaxSamples
DescribeRenderer.public static final int kCGLRPSampleModes
DescribeRenderer.public static final int kCGLRPSampleAlpha
DescribeRenderer.public static final int kCGLRPVideoMemory
DescribeRenderer.public static final int kCGLRPTextureMemory
DescribeRenderer.public static final int kCGLRPGPUVertProcCapable
DescribeRenderer.public static final int kCGLRPGPUFragProcCapable
DescribeRenderer.public static final int kCGLRPRendererCount
DescribeRenderer.public static final int kCGLRPOnline
DescribeRenderer.public static final int kCGLRPAcceleratedCompute
DescribeRenderer.public static final int kCGLRPVideoMemoryMegabytes
DescribeRenderer.public static final int kCGLRPTextureMemoryMegabytes
DescribeRenderer.public static final int kCGLRPRobust
DescribeRenderer.public static final int kCGLRPMPSafe
DescribeRenderer.public static final int kCGLRPMultiScreen
DescribeRenderer.public static final int kCGLRPFullScreen
DescribeRenderer.public static final int kCGLCESwapRectangle
public static final int kCGLCESwapLimit
public static final int kCGLCERasterization
public static final int kCGLCEStateValidation
public static final int kCGLCESurfaceBackingSize
public static final int kCGLCEDisplayListOptimization
public static final int kCGLCEMPEngine
public static final int kCGLCPSwapRectangle
SetParameter and GetParameter.public static final int kCGLCPSwapInterval
SetParameter and GetParameter.public static final int kCGLCPDispatchTableSize
SetParameter and GetParameter.public static final int kCGLCPClientStorage
SetParameter and GetParameter.public static final int kCGLCPSurfaceTexture
SetParameter and GetParameter.public static final int kCGLCPSurfaceOrder
SetParameter and GetParameter.public static final int kCGLCPSurfaceOpacity
SetParameter and GetParameter.public static final int kCGLCPSurfaceBackingSize
SetParameter and GetParameter.public static final int kCGLCPSurfaceSurfaceVolatile
SetParameter and GetParameter.public static final int kCGLCPReclaimResources
SetParameter and GetParameter.public static final int kCGLCPCurrentRendererID
SetParameter and GetParameter.public static final int kCGLCPGPUVertexProcessing
SetParameter and GetParameter.public static final int kCGLCPGPUFragmentProcessing
SetParameter and GetParameter.public static final int kCGLCPHasDrawable
SetParameter and GetParameter.public static final int kCGLCPMPSwapsInFlight
SetParameter and GetParameter.public static final int kCGLGOFormatCacheSize
SetGlobalOption and GetGlobalOption.public static final int kCGLGOClearFormatCache
SetGlobalOption and GetGlobalOption.public static final int kCGLGORetainRenderers
SetGlobalOption and GetGlobalOption.public static final int kCGLGOResetLibrary
SetGlobalOption and GetGlobalOption.public static final int kCGLGOUseErrorHandler
SetGlobalOption and GetGlobalOption.public static final int kCGLGOUseBuildCache
SetGlobalOption and GetGlobalOption.public static final int kCGLOGLPVersion_Legacy
public static final int kCGLOGLPVersion_3_2_Core
public static final int kCGLNoError
public static final int kCGLBadAttribute
public static final int kCGLBadProperty
public static final int kCGLBadPixelFormat
public static final int kCGLBadRendererInfo
public static final int kCGLBadContext
public static final int kCGLBadDrawable
public static final int kCGLBadDisplay
public static final int kCGLBadState
public static final int kCGLBadValue
public static final int kCGLBadMatch
public static final int kCGLBadEnumeration
public static final int kCGLBadOffScreen
public static final int kCGLBadFullScreen
public static final int kCGLBadWindow
public static final int kCGLBadAddress
public static final int kCGLBadCodeModule
public static final int kCGLBadAlloc
public static final int kCGLBadConnection
public static final int kCGLMonoscopicBit
public static final int kCGLStereoscopicBit
public static final int kCGLSingleBufferBit
public static final int kCGLDoubleBufferBit
public static final int kCGLTripleBufferBit
public static final int kCGL0Bit
public static final int kCGL1Bit
public static final int kCGL2Bit
public static final int kCGL3Bit
public static final int kCGL4Bit
public static final int kCGL5Bit
public static final int kCGL6Bit
public static final int kCGL8Bit
public static final int kCGL10Bit
public static final int kCGL12Bit
public static final int kCGL16Bit
public static final int kCGL24Bit
public static final int kCGL32Bit
public static final int kCGL48Bit
public static final int kCGL64Bit
public static final int kCGL96Bit
public static final int kCGL128Bit
public static final int kCGLRGB444Bit
public static final int kCGLARGB4444Bit
public static final int kCGLRGB444A8Bit
public static final int kCGLRGB555Bit
public static final int kCGLARGB1555Bit
public static final int kCGLRGB555A8Bit
public static final int kCGLRGB565Bit
public static final int kCGLRGB565A8Bit
public static final int kCGLRGB888Bit
public static final int kCGLARGB8888Bit
public static final int kCGLRGB888A8Bit
public static final int kCGLRGB101010Bit
public static final int kCGLARGB2101010Bit
public static final int kCGLRGB101010_A8Bit
public static final int kCGLRGB121212Bit
public static final int kCGLARGB12121212Bit
public static final int kCGLRGB161616Bit
public static final int kCGLRGBA16161616Bit
public static final int kCGLRGBFloat64Bit
public static final int kCGLRGBAFloat64Bit
public static final int kCGLRGBFloat128Bit
public static final int kCGLRGBAFloat128Bit
public static final int kCGLRGBFloat256Bit
public static final int kCGLRGBAFloat256Bit
public static final int kCGLSupersampleBit
public static final int kCGLMultisampleBit
public static long CGLGetCurrentContext()
NULL.public static int CGLSetCurrentContext(long context)
There can be only one current rendering context. Subsequent OpenGL rendering calls operate on the current rendering context to modify the drawable object associated with it.
You can use AGL macros to bypass the current rendering context mechanism and maintain your own current rendering context.
A context is current on a per-thread basis. Multiple threads must serialize calls into the same context.
context - the rendering context to set as the current rendering context. Pass NULL to release the current rendering context without assigning a new one.public static long CGLGetShareGroup(long ctx)
ctx - a rendering contextpublic static int nCGLChoosePixelFormat(long attribs,
long pix,
long npix)
ChoosePixelFormatpublic static int CGLChoosePixelFormat(java.nio.IntBuffer attribs,
org.lwjgl.PointerBuffer pix,
java.nio.IntBuffer npix)
attribs - a 0 terminated array that contains a list of buffer and renderer attributes. Attributes can be Boolean or integer. If an attribute is integer, you
must supply the desired value immediately following the attribute. If the attribute is Boolean, do not supply a value because its presence in the
attributes array implies a true value. One of:pix - the memory address of a pixel format object. On return, points to a new pixel format object that contains pixel format information and a list of
virtual screens. If there are no pixel formats or virtual screens that satisfy the constraints of the buffer and renderer attributes, the value of
pix is set to NULL.npix - on return, points to the number of virtual screens referenced by pix. If pix is NULL, the value of npix is set to 0.public static int CGLDestroyPixelFormat(long pix)
ReleasePixelFormat.pix - the pixel format object to destroypublic static int nCGLDescribePixelFormat(long pix,
int pix_num,
int attrib,
long value)
DescribePixelFormatpublic static int CGLDescribePixelFormat(long pix,
int pix_num,
int attrib,
java.nio.IntBuffer value)
pix - the pixel format object to querypix_num - the virtual screen number whose attribute value you want to retrieve. This value must be between 0 and the number of virtual screens minus one.attrib - the attribute whose value you want to obtain. One of:value - on return, points to the value of the attributepublic static void CGLReleasePixelFormat(long pix)
The system retains the pixel format object when you call the function CreateContext, so you can release a pixel format object immediately
after passing it to the context creation function.
Each call to CGLReleasePixelFormat decreases the reference count by 1. If the reference count reaches 0, the pixel format object is destroyed.
pix - the pixel format object whose reference count should be decrementedpublic static long CGLRetainPixelFormat(long pix)
Each call to CGLRetainPixelFormat increases the reference count by 1. Each call to CGLRetainPixelFormat must be matched with a call to
ReleasePixelFormat.
pix - the pixel format object whose reference count should be incrementedpublic static int CGLGetPixelFormatRetainCount(long pix)
pix - a pixel format objectpublic static int nCGLQueryRendererInfo(int display_mask,
long rend,
long nrend)
QueryRendererInfopublic static int CGLQueryRendererInfo(int display_mask,
org.lwjgl.PointerBuffer rend,
java.nio.IntBuffer nrend)
display_mask - a bit field that contains the bitwise OR of OpenGL display masks returned by the CGDisplayIDToOpenGLDisplayMask function. If you want to obtain
information for all renderers in the system you must call CGLQueryRendererInfo once for each display bit.rend - the memory address of a renderer information object. On return, points to a renderer information object that describes all renderers that are able
to drive the displays specified by the display_mask parameter. If display_mask does not specify any displays, the value of
rend is set to NULL. You must call DestroyRendererInfo when you no longer need this object.nrend - on return, points to the number of renderers described in the renderer information object. If display_mask does not specify any displays,
the value of nrend is set to 0.public static int CGLDestroyRendererInfo(long rend)
rend - the renderer information object to destroypublic static int nCGLDescribeRenderer(long rend,
int rend_num,
int prop,
long value)
DescribeRendererpublic static int CGLDescribeRenderer(long rend,
int rend_num,
int prop,
java.nio.IntBuffer value)
rend - an opaque renderer information object that contains a description of the renderer capabilities you want to inspect. You can obtain a renderer
information object by calling the function QueryRendererInfo. You must call DestroyRendererInfo when you no longer need this
object.rend_num - the index of the renderer inside the renderer information object — a value between 0 and the number of renderers minus one. The number of renderers
can be obtained by calling DescribeRenderer, passing in rend, renderer number 0, and the renderer property
RPRendererCount.prop - the renderer property whose value you want to obtain. One of:value - on return, points to the value of the requested propertypublic static int nCGLCreateContext(long pix,
long share,
long ctx)
CreateContextpublic static int CGLCreateContext(long pix,
long share,
org.lwjgl.PointerBuffer ctx)
pix - a pixel format object created by calling the function ChoosePixelFormatshare - the rendering context with which to share the OpenGL object state — including texture objects, programs and shader display lists, vertex array
objects, vertex buffer objects, pixel buffer objects, and frame buffer objects — and the object state associated which each of these object types.
Pass NULL to indicate that no sharing is to take place.ctx - the memory address of a context object. On return, points to a new context object with the buffers and attributes specified by the pix
parameter. If the context can not be created as specified, the value of ctx is set to NULL.public static int CGLDestroyContext(long ctx)
Starting in Mac OS 10.5, CGL rendering contexts are reference counted. For compatibility reasons, calling CGLDestroyContext clears the drawable
associated with the rendering context. Calling CGLDestroyContext is the equivalent of calling both ClearDrawable and
ReleaseContext.
ctx - the rendering context to destroypublic static int CGLCopyContext(long src,
long dst,
int mask)
src - the source rendering contextdst - the destination rendering contextmask - a mask that specifies the state variables to copy. Pass a bit field that contains the bitwise OR of the state variable names that you want to copy.
Use the symbolic mask constants that are passed to the OpenGL function PushAttrib. To copy as many state variables
as possible, supply the constant ALL_ATTRIB_BITS.public static long CGLRetainContext(long ctx)
Each call to CGLRetainContext increases the retain count by 1. To prevent memory leaks, each retain call must be balanced with a call to
ReleaseContext.
ctx - the rendering context to be retainedpublic static void CGLReleaseContext(long ctx)
Each call to CGLReleaseContext decreases the retain count by 1.
When the retain count reaches 0, all resources associated with the rendering context are freed. If the rendering context that you pass is the current
rendering context and it is freed, the current context is set to NULL and there is no current rendering context after the function executes. After the
context is freed, you must make sure you do not use the destroyed rendering context. This includes using CGL macros in which the rendering context is
explicitly passed to OpenGL.
ctx - the rendering context to be releasedpublic static int CGLGetContextRetainCount(long ctx)
ctx - the CGL rendering context whose retain count you wish to discoverpublic static long CGLGetPixelFormat(long ctx)
The pixel format object is not retained before being returned to your application. If your application needs to maintain this object, it should call
RetainPixelFormat.
ctx - the CGL rendering context whose format you want to receivepublic static int nCGLCreatePBuffer(int width,
int height,
int target,
int internalFormat,
int max_level,
long pbuffer)
CreatePBufferpublic static int CGLCreatePBuffer(int width,
int height,
int target,
int internalFormat,
int max_level,
org.lwjgl.PointerBuffer pbuffer)
This function does not have any knowledge of OpenGL contexts or pixel format objects and does not specifically allocate the storage needed for the
actual pixel buffer. These operations occur when you call the function SetPBuffer.
You can determine the dimensional limits of a pixel buffer by calling the OpenGL function glGetInteger. You can find the maximum size supported by querying GL_MAX_VIEWPORT_DIMS and the minimum size by querying GL_MIN_PBUFFER_VIEWPORT_DIMS_APPLE, which returns two integer values (similar to GL_MAX_VIEWPORT_DIMS). All pixel buffer dimensions that you request with the function aglCreatePBuffer should fall within these limits (inclusively) and should comply with any limitations imposed by the texture target you select.
The maximum viewport size supported in OS X is quite large. You should take into consideration the amount of video or system memory required to support the requested pixel buffer size, including additional memory needed for multiple buffers and options such as multisampling.
Starting in OS X v10.5, pixel buffer objects are reference counted. Pixel buffer objects are created with a reference count of 1 and are destroyed when the last reference to the object is released.
Deprecated in OS X v10.7.
width - the width, in pixels, of the pixel bufferheight - the height, in pixels, of the pixel buffertarget - a constant that specifies the type of the pixel buffer target texture. One of:TEXTURE_2D | TEXTURE_CUBE_MAP | TEXTURE_RECTANGLE |
internalFormat - a constant that specifies the internal color format of the pixel buffer. The format controls whether the alpha channel of the pixel buffer is used
for texturing operations. One of:RGB | GL11.GL_RGBA |
max_level - the maximum level of mipmap detail allowable. Pass 0 for a pixel buffer that is not using mipmaps. The value passed should never exceed the actual
maximum number of mipmap levels that can be represented with the given width and height.pbuffer - on return, points to a new pixel buffer objectpublic static int CGLDestroyPBuffer(long pbuffer)
Starting in OS X v10.5, pixel buffer objects are reference counted. Calling this function is equivalent to calling ReleasePBuffer.
Deprecated in OS X v10.7.
pbuffer - the pixel buffer object whose resources you want to releasepublic static int nCGLDescribePBuffer(long obj,
long width,
long height,
long target,
long internalFormat,
long mipmap)
DescribePBufferpublic static int CGLDescribePBuffer(long obj,
java.nio.IntBuffer width,
java.nio.IntBuffer height,
java.nio.IntBuffer target,
java.nio.IntBuffer internalFormat,
java.nio.IntBuffer mipmap)
The width, height, texture target, and internal texture color format of a pixel buffer object are set at its creation and cannot be changed without
destroying and recreating the object. The level is set when the pixel buffer object is attached to a rendering context by calling the function
SetPBuffer.
Deprecated in OS X v10.7.
obj - a pointer to the pixel buffer objectwidth - on return, points to the width, in pixels, of the pixel bufferheight - on return, points to the height, in pixels, of the pixel buffertarget - on return, points to a constant that specifies the pixel buffer texture targetinternalFormat - on return, points to a constant that specifies the internal color format of the pixel buffermipmap - on return, points to the mipmap level of the pixel buffer or 0 if it doesn't use mipmapspublic static int CGLTexImagePBuffer(long ctx,
long pbuffer,
int source)
You must generate and bind a texture name (using standard OpenGL texturing calls) that is compatible with the pixel buffer texture target. Don't supply a texture object that was used previously for nonpixel buffer texturing operations unless you first call glDeleteTextures to regenerate the texture name.
If you modify the content of a pixel buffer that uses mipmap levels, you must call this function again before drawing with the pixel buffer, to ensure that the content is synchronized with OpenGL. For pixel buffers without mipmaps, simply rebind to the texture object to synchronize content.
No OpenGL texturing calls that modify a pixel buffer texture content are permitted (such as glTexSubImage2D or glCopyTexImage2D) with the pixel buffer texture as the destination. It is permitted to use texturing commands to read data from a pixel buffer texture, such as glCopyTexImage2D, with the pixel buffer texture as the source. It is also legal to use OpenGL functions such as glReadPixels to read the contents of a pixel buffer directly through the pixel buffer context.
Note that texturing with the CGLTexImagePBuffer function can fail to produce the intended results without error in the same way other OpenGL texturing commands can normally fail. The function fails if you set an incompatible filter mode, do not enable the proper texture target, or other conditions described in the OpenGL specification.
You don't need to share a context to use a pixel buffer object as a texture source. You can use independent pixel format objects and OpenGL contexts for both the pixel buffer and the target drawable object without sharing resources, and still texture using a pixel buffer in the target context.
Deprecated in OS X v10.7.
ctx - a rendering context, which is the target context for the texture operation. This is the context that you plan to render content to. This is not the
context attached to the pixel buffer.pbuffer - a pixel buffer objectsource - the source buffer to get the texture from, which should be a valid OpenGL buffer such as GL_FRONT or GL_BACK and should be compatible with the
buffer and renderer attributes that you used to create the rendering context attached to the pixel buffer. This means that the pixel buffer must
possess the buffer in question for the texturing operation to succeed.public static long CGLRetainPBuffer(long pbuffer)
Each call to CGLRetainPBuffer increases the retain count by 1. To prevent the pixel buffer object from being leaked, each retain call must be matched
with a call to ReleasePBuffer.
Deprecated in OS X v10.7.
pbuffer - the pixel buffer object whose retain count you wish to incrementpublic static void CGLReleasePBuffer(long pbuffer)
Starting in OS X v10.5, pixel buffer objects are reference counted. Calling this function is equivalent to calling CGLReleasePBuffer.
Deprecated in OS X v10.7.
pbuffer - the pixel buffer object whose resources you want to releasepublic static int CGLGetPBufferRetainCount(long pbuffer)
Deprecated in OS X v10.7.
pbuffer - the pixel buffer object whose retain count you wish to retrievepublic static int nCGLSetOffScreen(long ctx,
int width,
int height,
int rowbytes,
long baseaddr)
SetOffScreenpublic static int CGLSetOffScreen(long ctx,
int width,
int height,
int rowbytes,
java.nio.ByteBuffer baseaddr)
Before calling this function, you must set up the rendering context using a pixel format object created with the kCGLPFAOffScreen attribute. For more information about kCGLPFAOffScreen, see Buffer and Renderer Attributes.
After calling this function, subsequent OpenGL drawing is rendered into the offscreen buffer and the viewport of the rendering context is set to the full size of the offscreen area.
To exit offscreen mode, call ClearDrawable.
To obtain functionality similar to offscreen mode on renderers that do not support it, attach the context to a hidden window and use the OpenGL function glReadPixels.
Deprecated in OS X v10.7.
ctx - a rendering contextwidth - the width, in pixels, of the offscreen bufferheight - the height, in pixels, of the offscreen bufferrowbytes - the number of bytes per row of the offscreen buffer, which must be greater than or equal to width times bytes per pixelbaseaddr - a pointer to a block of memory to use as the offscreen buffer. The size of the memory must be at least rowbytes*height bytes.public static int nCGLGetOffScreen(long ctx,
long width,
long height,
long rowbytes,
long baseaddr)
GetOffScreenpublic static int CGLGetOffScreen(long ctx,
java.nio.IntBuffer width,
java.nio.IntBuffer height,
java.nio.IntBuffer rowbytes,
org.lwjgl.PointerBuffer baseaddr)
Deprecated in OS X v10.7.
ctx - a rendering contextwidth - on return, points to the width, in pixels, of the offscreen buffer. If the rendering context is not attached to an offscreen drawable object, the
value of width is set to 0.height - on return, points to the height, in pixels, of the offscreen buffer. If the rendering context is not attached to an offscreen drawable object, the
value of height is set to 0.rowbytes - on return, points to the number of bytes per row of the offscreen buffer. If the context is not attached to an offscreen drawable object, the value
of rowbytes is set to 0.baseaddr - on return, points to the base address of the offscreen buffer. If the context is not attached to an offscreen drawable object, the value of
baseaddr is set to NULL.public static int CGLSetFullScreen(long ctx)
Before calling this function, you must set up the rendering context using a pixel format object created with the kCGLPFAFullScreen attribute (see
Buffer and Renderer Attributes). Some OpenGL renderers, such as the software renderer, do not support full-screen mode. After you call the function
ChoosePixelFormat with the full-screen attribute, you need to check whether the pixel format object is created successfully.
You must capture the display prior to entering full-screen mode and release it after exiting. After calling this function, subsequent OpenGL drawing is rendered into the entire screen. For more information, see OpenGL Programming Guide for Mac.
To exit full-screen mode, call ClearDrawable.
Deprecated in OS X v10.7. Use SetFullScreenOnDisplay instead.
ctx - a rendering contextpublic static int CGLSetFullScreenOnDisplay(long ctx,
int display_mask)
This function obtains a drawable object that covers an entire screen and attaches it to the rendering context. A full-screen rendering context may allow the underlying renderer to provide better performance compared to a context associated with a window that partially covers the screen.
Prior to calling this function, your application should ensure that the context is capable of rendering to this display by querying the appropriate
renderer properties. For more information, see QueryRendererInfo. Note that some renderers, including the software renderer, do not support
full-screen mode.
You must capture the screen prior to entering full-screen mode and release it after exiting. After calling this function, subsequent OpenGL drawing is rendered into the entire screen. For more information, see OpenGL Programming Guide for Mac.
To exit full-screen mode, call ClearDrawable.
In OS X v10.6 or later, this function is not deprecated, but is usually not necessary. If your application creates a window that completely covers the screen, the system implicitly creates a full-screen instance, for the same potential performance benefit.
Deprecated in OS X v10.7.
ctx - a rendering contextdisplay_mask - a bit field that contains the OpenGL display mask for the screen you wish the context to coverpublic static int CGLSetPBuffer(long ctx,
long pbuffer,
int face,
int level,
int screen)
The first time you call this function for a specific pixel buffer object, the system creates the necessary buffers. The buffers are created to support the attributes dictated by the pixel format object used to create the rendering context and by the parameters used to create the pixel buffer object. The storage requirements for pixel buffer objects, which can be quite large, are very similar to the requirements for windows or views with OpenGL contexts attached. All drawable objects compete for the same scarce resources. This function can fail is there is not enough contiguous VRAM for each buffer. It's best to code defensively with a scheme that reduces resource consumption without causing the application to resort to failure. Unless, of course, failure is the only viable alternative.
The ability to attach a pixel buffer to a context is supported only on renderers that export GL_APPLE_pixel_buffer in the GL_EXTENSIONS string. Before calling this function, you should programmatically determine if it’s possible to attach a pixel buffer to a context by querying GL_EXTENSIONS in the context and looking for GL_APPLE_pixel_buffer. If that extension is not present, the renderer won’t allow setting the pixel buffer.
In order of performance, these are the renderers you should consider using when setting up a rendering context to attach to a pixel buffer:
Deprecated in OS X v10.7.
ctx - the rendering context to attach the pixel buffer topbuffer - a pixel buffer objectface - the cube map face to draw if the pixel buffer texture target type is TEXTURE_CUBE_MAP; otherwise pass 0.level - the mipmap level to draw. This must not exceed the maximum mipmap level set when the pixel buffer object was created. Pass 0 for a texture target
that does not support mipmaps.screen - a virtual screen value. The virtual screen determines the renderer OpenGL uses to draw to the pixel buffer object. For best performance, for a
pixel buffer used as a texture source, you should supply the virtual screen value that results in using the same renderer used by the context
that's the texturing target.public static int nCGLGetPBuffer(long ctx,
long pbuffer,
long face,
long level,
long screen)
GetPBufferpublic static int CGLGetPBuffer(long ctx,
org.lwjgl.PointerBuffer pbuffer,
java.nio.IntBuffer face,
java.nio.IntBuffer level,
java.nio.IntBuffer screen)
Deprecated in OS X v10.7.
ctx - a rendering contextpbuffer - on return, points to the pixel buffer object attached to the rendering contextface - on return, points to the cube map face that is set if the pixel buffer texture target type is TEXTURE_CUBE_MAP; otherwise 0 for all other
texture target types.level - on return, points to the current mipmap level for drawingscreen - on return, points to the current virtual screen number, as set by the last valid call to SetPBufferpublic static int CGLClearDrawable(long ctx)
ctx - a rendering contextpublic static int CGLFlushDrawable(long ctx)
To create a double-buffered context, specify the PFADoubleBuffer attribute when you create the pixel format object for the rendering
context. If the backing store attribute is set to false, the buffers can be exchanged rather than copied. This is often the case in full-screen mode. If
the receiver is not a double-buffered context, this call does nothing.
If you set the swap interval attribute (CPSwapInterval) appropriately, the copy takes place during the vertical retrace of the display,
rather than immediately after CGLFlushDrawable is called. An implicit Flush operation is performed by CGLFlushDrawable
before it returns. For optimal performance, an application should not call glFlush immediately before calling CGLFlushDrawable. Subsequent OpenGL
commands can be issued immediately after calling CGLFlushDrawable, but are not executed until the buffer copy is completed.
ctx - the context objectpublic static int CGLEnable(long ctx,
int pname)
ctx - a rendering contextpname - the option to enable. One of:CESwapRectangle | CESwapLimit | CERasterization | CEStateValidation | CESurfaceBackingSize |
CEDisplayListOptimization | CEMPEngine |
public static int CGLDisable(long ctx,
int pname)
ctx - a rendering contextpname - the option to disable. One of:CESwapRectangle | CESwapLimit | CERasterization | CEStateValidation | CESurfaceBackingSize |
CEDisplayListOptimization | CEMPEngine |
public static int nCGLIsEnabled(long ctx,
int pname,
long enable)
IsEnabledpublic static int CGLIsEnabled(long ctx,
int pname,
java.nio.IntBuffer enable)
ctx - a rendering contextpname - the option to query. One of:CESwapRectangle | CESwapLimit | CERasterization | CEStateValidation | CESurfaceBackingSize |
CEDisplayListOptimization | CEMPEngine |
enable - on return, enable is set to true if the option is enabledpublic static int nCGLSetParameter(long ctx,
int pname,
long params)
SetParameterpublic static int CGLSetParameter(long ctx,
int pname,
java.nio.IntBuffer params)
ctx - a rendering contextpname - the parameter whose value you want to set. One of:params - a pointer to the value to set the parameter topublic static int CGLSetParameter(long ctx,
int pname,
int param)
ctx - a rendering contextpname - the parameter whose value you want to set. One of:public static int nCGLGetParameter(long ctx,
int pname,
long params)
GetParameterpublic static int CGLGetParameter(long ctx,
int pname,
java.nio.IntBuffer params)
ctx - a rendering contextpname - the parameter whose value you want to retrieve. One of:params - on return, points to the value of the parameterpublic static int CGLSetVirtualScreen(long ctx,
int screen)
Setting the virtual screen forces the renderer associated with the virtual screen to process OpenGL commands issued to the specified context. Changing the virtual screen changes the current renderer. You should use this function only when it is necessary to override the default behavior. The current virtual screen is normally set automatically. Because the current virtual screen determines which OpenGL renderer is processing commands, the return values of all glGetXXX functions can be affected by the current virtual screen.
ctx - a rendering contextscreen - a virtual screen number, which must be a value between 0 and the number of virtual screens minus one. The number of virtual screens available in a
context can be obtained by calling the function DescribePixelFormat, passing in the pixel format object used to create the rendering
context, 0 for the virtual screen number (pix_num parameter), and the attribute constant PFAVirtualScreenCount.public static int nCGLGetVirtualScreen(long ctx,
long screen)
GetVirtualScreenpublic static int CGLGetVirtualScreen(long ctx,
java.nio.IntBuffer screen)
The current virtual screen can change when a drawable object is moved or resized across graphics device boundaries. A change in the current virtual screen can affect the return values of some OpenGL functions and in most cases also means that the renderer has changed.
ctx - a rendering contextscreen - on return, points to the virtual screen associated with the context. The value is always 0 on a single-display system and –1 if the function fails
for any reason.public static int CGLUpdateContext(long ctx)
ctx - a rendering contextpublic static int nCGLSetGlobalOption(int pname,
long params)
SetGlobalOptionpublic static int CGLSetGlobalOption(int pname,
java.nio.IntBuffer params)
pname - the name of the option whose value you want to set. One of:GOFormatCacheSize | GOClearFormatCache | GORetainRenderers | GOResetLibrary | GOUseErrorHandler |
GOUseBuildCache |
params - the value to set the option topublic static int CGLSetGlobalOption(int pname,
int param)
pname - the name of the option whose value you want to set. One of:GOFormatCacheSize | GOClearFormatCache | GORetainRenderers | GOResetLibrary | GOUseErrorHandler |
GOUseBuildCache |
public static int nCGLGetGlobalOption(int pname,
long params)
GetGlobalOptionpublic static int CGLGetGlobalOption(int pname,
java.nio.IntBuffer params)
pname - the name of the option whose value you want to get. One of:GOFormatCacheSize | GOClearFormatCache | GORetainRenderers | GOResetLibrary | GOUseErrorHandler |
GOUseBuildCache |
params - on return, a pointer to the value of the optionpublic static int CGLLockContext(long context)
The function CGLLockContext blocks the thread it is on until all other threads have unlocked the same context using the function
UnlockContext. You can use CGLLockContext recursively. Context-specific CGL calls by themselves do not require locking, but you can
guarantee serial processing for a group of calls by surrounding them with CGLLockContext and CGLUnlockContext. Keep in mind that calls from the OpenGL
API (the API provided by the Architecture Review Board) require locking.
Applications that use NSOpenGL classes with multithreading can lock contexts using the functions CGLLockContext and CGLUnlockContext. To perform rendering in a thread other than the main one, you can lock the context that you want to access and safely execute OpenGL commands. The locking calls must be placed around all OpenGL calls in all threads.
context - a rendering contextpublic static int CGLUnlockContext(long context)
context - the CGL context to unlockpublic static void nCGLGetVersion(long majorvers,
long minorvers)
GetVersionpublic static void CGLGetVersion(java.nio.IntBuffer majorvers,
java.nio.IntBuffer minorvers)
majorvers - on return, points to the major version number of the CGL libraryminorvers - on return, points to the minor version number of the CGL librarypublic static long nCGLErrorString(int error)
ErrorString@Nullable public static java.lang.String CGLErrorString(int error)
error - the CGL result code constant returned from a CGL function. One of:public static int CGLChoosePixelFormat(int[] attribs,
org.lwjgl.PointerBuffer pix,
int[] npix)
ChoosePixelFormatpublic static int CGLDescribePixelFormat(long pix,
int pix_num,
int attrib,
int[] value)
DescribePixelFormatpublic static int CGLQueryRendererInfo(int display_mask,
org.lwjgl.PointerBuffer rend,
int[] nrend)
QueryRendererInfopublic static int CGLDescribeRenderer(long rend,
int rend_num,
int prop,
int[] value)
DescribeRendererpublic static int CGLDescribePBuffer(long obj,
int[] width,
int[] height,
int[] target,
int[] internalFormat,
int[] mipmap)
DescribePBufferpublic static int CGLGetOffScreen(long ctx,
int[] width,
int[] height,
int[] rowbytes,
org.lwjgl.PointerBuffer baseaddr)
GetOffScreenpublic static int CGLGetPBuffer(long ctx,
org.lwjgl.PointerBuffer pbuffer,
int[] face,
int[] level,
int[] screen)
GetPBufferpublic static int CGLIsEnabled(long ctx,
int pname,
int[] enable)
IsEnabledpublic static int CGLSetParameter(long ctx,
int pname,
int[] params)
SetParameterpublic static int CGLGetParameter(long ctx,
int pname,
int[] params)
GetParameterpublic static int CGLGetVirtualScreen(long ctx,
int[] screen)
GetVirtualScreenpublic static int CGLSetGlobalOption(int pname,
int[] params)
SetGlobalOptionpublic static int CGLGetGlobalOption(int pname,
int[] params)
GetGlobalOptionpublic static void CGLGetVersion(int[] majorvers,
int[] minorvers)
GetVersionCopyright LWJGL. All Rights Reserved. License terms.