regal/include/GL/RegalCGL.h
2014-02-08 10:33:34 -06:00

621 lines
26 KiB
C

/* NOTE: Do not edit this file, it is generated by a script:
Export.py --api gl 4.4 --api wgl 4.4 --api glx 4.4 --api cgl 1.4 --api egl 1.0 --outdir .
*/
/*
Copyright (c) 2011-2013 NVIDIA Corporation
Copyright (c) 2011-2013 Cass Everitt
Copyright (c) 2012-2013 Scott Nations
Copyright (c) 2012 Mathias Schott
Copyright (c) 2012-2013 Nigel Stewart
Copyright (c) 2012-2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
Intended formatting conventions:
$ astyle --style=allman --indent=spaces=2 --indent-switches
*/
#include <GL/Regal.h>
#ifndef __REGAL_CGL_H__
#define __REGAL_CGL_H__
#include <stddef.h>
#include <stdint.h>
#if REGAL_SYS_OSX
typedef struct _CGLContextObject * CGLContextObj;
typedef struct _CGLPixelFormatObject * CGLPixelFormatObj;
typedef struct _CGLRendererInfoObject * CGLRendererInfoObj;
typedef struct _CGLPBufferObject * CGLPBufferObj;
typedef void * CGLShareGroupObj;
typedef struct __IOSurface * IOSurfaceRef;
typedef void * CGSConnectionID;
typedef int CGSWindowID;
typedef int CGSSurfaceID;
#endif // REGAL_SYS_OSX
#ifdef __cplusplus
extern "C" {
#endif
#if REGAL_SYS_OSX
typedef enum _CGLPixelFormatAttribute {
kCGLPFAAllRenderers = 1,
kCGLPFATripleBuffer = 3,
kCGLPFADoubleBuffer = 5,
kCGLPFAStereo = 6,
kCGLPFAAuxBuffers = 7,
kCGLPFAColorSize = 8,
kCGLPFAAlphaSize = 11,
kCGLPFADepthSize = 12,
kCGLPFAStencilSize = 13,
kCGLPFAAccumSize = 14,
kCGLPFAMinimumPolicy = 51,
kCGLPFAMaximumPolicy = 52,
kCGLPFAOffScreen = 53,
kCGLPFAFullScreen = 54,
kCGLPFASampleBuffers = 55,
kCGLPFASamples = 56,
kCGLPFAAuxDepthStencil = 57,
kCGLPFAColorFloat = 58,
kCGLPFAMultisample = 59,
kCGLPFASupersample = 60,
kCGLPFASampleAlpha = 61,
kCGLPFARendererID = 70,
kCGLPFASingleRenderer = 71,
kCGLPFANoRecovery = 72,
kCGLPFAAccelerated = 73,
kCGLPFAClosestPolicy = 74,
kCGLPFARobust = 75,
kCGLPFABackingStore = 76,
kCGLPFAMPSafe = 78,
kCGLPFAWindow = 80,
kCGLPFAMultiScreen = 81,
kCGLPFACompliant = 83,
kCGLPFADisplayMask = 84,
kCGLPFAPBuffer = 90,
kCGLPFARemotePBuffer = 91,
kCGLPFAAllowOfflineRenderers = 96,
kCGLPFAAcceleratedCompute = 97,
kCGLPFAOpenGLProfile = 99,
kCGLPFAVirtualScreenCount = 128,
} CGLPixelFormatAttribute;
typedef enum _CGLRendererProperty {
kCGLRPOffScreen = 53,
kCGLRPFullScreen = 54,
kCGLRPRendererID = 70,
kCGLRPAccelerated = 73,
kCGLRPRobust = 75,
kCGLRPBackingStore = 76,
kCGLRPMPSafe = 78,
kCGLRPWindow = 80,
kCGLRPMultiScreen = 81,
kCGLRPCompliant = 83,
kCGLRPDisplayMask = 84,
kCGLRPBufferModes = 100,
kCGLRPColorModes = 103,
kCGLRPAccumModes = 104,
kCGLRPDepthModes = 105,
kCGLRPStencilModes = 106,
kCGLRPMaxAuxBuffers = 107,
kCGLRPMaxSampleBuffers = 108,
kCGLRPMaxSamples = 109,
kCGLRPSampleModes = 110,
kCGLRPSampleAlpha = 111,
kCGLRPVideoMemory = 120,
kCGLRPTextureMemory = 121,
kCGLRPGPUVertProcCapable = 122,
kCGLRPGPUFragProcCapable = 123,
kCGLRPRendererCount = 128,
kCGLRPOnline = 129,
kCGLRPAcceleratedCompute = 130,
kCGLRPVideoMemoryMegabytes = 131,
kCGLRPTextureMemoryMegabytes = 132,
} CGLRendererProperty;
typedef enum _CGLContextEnable {
kCGLCESwapRectangle = 201,
kCGLCESwapLimit = 203,
kCGLCERasterization = 221,
kCGLCEStateValidation = 301,
kCGLCESurfaceBackingSize = 305,
kCGLCEDisplayListOptimization = 307,
kCGLCEMPEngine = 313,
kCGLCECrashOnRemovedFunctions = 316,
} CGLContextEnable;
typedef enum _CGLContextParameter {
kCGLCPSwapRectangle = 200,
kCGLCPSwapInterval = 222,
kCGLCPDispatchTableSize = 224,
kCGLCPClientStorage = 226,
kCGLCPSurfaceTexture = 228,
kCGLCPSurfaceOrder = 235,
kCGLCPSurfaceOpacity = 236,
kCGLCPSurfaceBackingSize = 304,
kCGLCPSurfaceSurfaceVolatile = 306,
kCGLCPReclaimResources = 308,
kCGLCPCurrentRendererID = 309,
kCGLCPGPUVertexProcessing = 310,
kCGLCPGPUFragmentProcessing = 311,
kCGLCPHasDrawable = 314,
kCGLCPMPSwapsInFlight = 315,
} CGLContextParameter;
typedef enum _CGLGlobalOption {
kCGLGOFormatCacheSize = 501,
kCGLGOClearFormatCache = 502,
kCGLGORetainRenderers = 503,
kCGLGOResetLibrary = 504,
kCGLGOUseErrorHandler = 505,
kCGLGOUseBuildCache = 506,
} CGLGlobalOption;
typedef enum _CGLOpenGLProfile {
kCGLOGLPVersion_Legacy = 4096,
kCGLOGLPVersion_3_2_Core = 12800,
} CGLOpenGLProfile;
typedef enum _CGLError {
kCGLNoError = 0,
kCGLBadAttribute = 10000,
kCGLBadProperty = 10001,
kCGLBadPixelFormat = 10002,
kCGLBadRendererInfo = 10003,
kCGLBadContext = 10004,
kCGLBadDrawable = 10005,
kCGLBadDisplay = 10006,
kCGLBadState = 10007,
kCGLBadValue = 10008,
kCGLBadMatch = 10009,
kCGLBadEnumeration = 10010,
kCGLBadOffScreen = 10011,
kCGLBadFullScreen = 10012,
kCGLBadWindow = 10013,
kCGLBadAddress = 10014,
kCGLBadCodeModule = 10015,
kCGLBadAlloc = 10016,
kCGLBadConnection = 10017,
} CGLError;
#endif // REGAL_SYS_OSX
#if REGAL_SYS_OSX
#define kCGL0Bit 0x1
#define kCGLMonoscopicBit 0x1
#define kCGLSupersampleBit 0x1
#define kCGL4Bit 0x10 /* 16 */
#define kCGLTripleBufferBit 0x10 /* 16 */
#define kCGL10Bit 0x100 /* 256 */
#define kCGLRGB444A8Bit 0x100 /* 256 */
#define kCGL32Bit 0x1000 /* 4096 */
#define kCGLRGB565Bit 0x1000 /* 4096 */
#define kCGL128Bit 0x10000 /* 65536 */
#define kCGLRGB888A8Bit 0x10000 /* 65536 */
#define kCGLRGB121212Bit 0x100000 /* 1048576 */
#define kCGLRGBFloat64Bit 0x1000000 /* 16777216 */
#define kCGLRGBFloat256Bit 0x10000000 /* 268435456 */
#define kCGL1Bit 0x2
#define kCGLMultisampleBit 0x2
#define kCGLStereoscopicBit 0x2
#define kCGL5Bit 0x20 /* 32 */
#define kCGL12Bit 0x200 /* 512 */
#define kCGLRGB555Bit 0x200 /* 512 */
#define kCGL48Bit 0x2000 /* 8192 */
#define kCGLRGB565A8Bit 0x2000 /* 8192 */
#define kCGLRGB101010Bit 0x20000 /* 131072 */
#define kCGLARGB12121212Bit 0x200000 /* 2097152 */
#define kCGLRGBAFloat64Bit 0x2000000 /* 33554432 */
#define kCGLRGBAFloat256Bit 0x20000000 /* 536870912 */
#define kCGL2Bit 0x4
#define kCGLSingleBufferBit 0x4
#define kCGL6Bit 0x40 /* 64 */
#define kCGLRGB444Bit 0x40 /* 64 */
#define kCGL16Bit 0x400 /* 1024 */
#define kCGLARGB1555Bit 0x400 /* 1024 */
#define kCGL64Bit 0x4000 /* 16384 */
#define kCGLRGB888Bit 0x4000 /* 16384 */
#define kCGLARGB2101010Bit 0x40000 /* 262144 */
#define kCGLRGB161616Bit 0x400000 /* 4194304 */
#define kCGLRGBFloat128Bit 0x4000000 /* 67108864 */
#define kCGL3Bit 0x8
#define kCGLDoubleBufferBit 0x8
#define kCGL8Bit 0x80 /* 128 */
#define kCGLARGB4444Bit 0x80 /* 128 */
#define kCGL24Bit 0x800 /* 2048 */
#define kCGLRGB555A8Bit 0x800 /* 2048 */
#define kCGL96Bit 0x8000 /* 32768 */
#define kCGLARGB8888Bit 0x8000 /* 32768 */
#define kCGLRGB101010_A8Bit 0x80000 /* 524288 */
#define kCGLRGBA16161616Bit 0x800000 /* 8388608 */
#define kCGLRGBAFloat128Bit 0x8000000 /* 134217728 */
/**
** CGL_VERSION_1_0
**/
#if (defined(CGL_VERSION_1_0) || defined(REGAL_NO_ENUM) || defined(REGAL_NO_CGL_VERSION_1_0)) && !defined(REGAL_NO_ENUM_CGL_VERSION_1_0)
#define REGAL_NO_ENUM_CGL_VERSION_1_0
#endif
#if (defined(CGL_VERSION_1_0) || defined(REGAL_NO_TYPEDEF) || defined(REGAL_NO_CGL_VERSION_1_0)) && !defined(REGAL_NO_TYPEDEF_CGL_VERSION_1_0)
#define REGAL_NO_TYPEDEF_CGL_VERSION_1_0
#endif
#if (defined(CGL_VERSION_1_0) || !defined(REGAL_NAMESPACE) || defined(REGAL_NO_CGL_VERSION_1_0)) && !defined(REGAL_NO_NAMESPACE_CGL_VERSION_1_0)
#define REGAL_NO_NAMESPACE_CGL_VERSION_1_0
#endif
#if (defined(CGL_VERSION_1_0) || !defined(REGAL_PLUGIN_MODE) || defined(REGAL_NO_CGL_VERSION_1_0)) && !defined(REGAL_NO_PLUGIN_CGL_VERSION_1_0)
#define REGAL_NO_PLUGIN_CGL_VERSION_1_0
#endif
#if (defined(CGL_VERSION_1_0) || defined(REGAL_NO_DECLARATION) || defined(REGAL_NO_CGL_VERSION_1_0)) && !defined(REGAL_NO_DECLARATION_CGL_VERSION_1_0)
#define REGAL_NO_DECLARATION_CGL_VERSION_1_0
#endif
#ifndef CGL_VERSION_1_0
#define CGL_VERSION_1_0 1
#endif
#ifndef REGAL_NO_TYPEDEF_CGL_VERSION_1_0
typedef CGLError (REGAL_CALL *PFNCGLCHOOSEPIXELFORMATPROC)(const CGLPixelFormatAttribute *attribs, CGLPixelFormatObj *pix, GLint *npix);
typedef CGLError (REGAL_CALL *PFNCGLCLEARDRAWABLEPROC)(CGLContextObj ctx);
typedef CGLError (REGAL_CALL *PFNCGLCOPYCONTEXTPROC)(CGLContextObj src, CGLContextObj dst, GLbitfield mask);
typedef CGLError (REGAL_CALL *PFNCGLCREATECONTEXTPROC)(CGLPixelFormatObj pix, CGLContextObj share, CGLContextObj *ctx);
typedef CGLError (REGAL_CALL *PFNCGLDESCRIBEPIXELFORMATPROC)(CGLPixelFormatObj pix, GLint pix_num, CGLPixelFormatAttribute attrib, GLint *value);
typedef CGLError (REGAL_CALL *PFNCGLDESCRIBERENDERERPROC)(CGLRendererInfoObj rend, GLint rend_num, CGLRendererProperty prop, GLint *value);
typedef CGLError (REGAL_CALL *PFNCGLDESTROYCONTEXTPROC)(CGLContextObj ctx);
typedef CGLError (REGAL_CALL *PFNCGLDESTROYPIXELFORMATPROC)(CGLPixelFormatObj pix);
typedef CGLError (REGAL_CALL *PFNCGLDESTROYRENDERERINFOPROC)(CGLRendererInfoObj rend);
typedef CGLError (REGAL_CALL *PFNCGLDISABLEPROC)(CGLContextObj ctx, CGLContextEnable pname);
typedef CGLError (REGAL_CALL *PFNCGLENABLEPROC)(CGLContextObj ctx, CGLContextEnable pname);
typedef CGLError (REGAL_CALL *PFNCGLFLUSHDRAWABLEPROC)(CGLContextObj ctx);
typedef CGLError (REGAL_CALL *PFNCGLGETOFFSCREENPROC)(CGLContextObj ctx, GLsizei *width, GLsizei *height, GLsizei *rowbytes, void **baseaddr);
typedef CGLError (REGAL_CALL *PFNCGLGETOPTIONPROC)(CGLGlobalOption pname, GLint *param);
typedef CGLError (REGAL_CALL *PFNCGLGETPARAMETERPROC)(CGLContextObj ctx, CGLContextParameter pname, GLint *params);
typedef CGLError (REGAL_CALL *PFNCGLGETVIRTUALSCREENPROC)(CGLContextObj ctx, GLint *screen);
typedef CGLError (REGAL_CALL *PFNCGLISENABLEDPROC)(CGLContextObj ctx, CGLContextEnable pname, GLint *enable);
typedef CGLError (REGAL_CALL *PFNCGLQUERYRENDERERINFOPROC)(GLuint display_mask, CGLRendererInfoObj *rend, GLint *nrend);
typedef CGLError (REGAL_CALL *PFNCGLSETFULLSCREENPROC)(CGLContextObj ctx);
typedef CGLError (REGAL_CALL *PFNCGLSETOFFSCREENPROC)(CGLContextObj ctx, GLsizei width, GLsizei height, GLsizei rowbytes, void *baseaddr);
typedef CGLError (REGAL_CALL *PFNCGLSETOPTIONPROC)(CGLGlobalOption pname, GLint param);
typedef CGLError (REGAL_CALL *PFNCGLSETPARAMETERPROC)(CGLContextObj ctx, CGLContextParameter pname, const GLint *params);
typedef CGLError (REGAL_CALL *PFNCGLSETVIRTUALSCREENPROC)(CGLContextObj ctx, GLint screen);
typedef const char *(REGAL_CALL *PFNCGLERRORSTRINGPROC)(CGLError error);
typedef void (REGAL_CALL *PFNCGLGETVERSIONPROC)(GLint *majorvers, GLint *minorvers);
#endif
#ifndef REGAL_NO_NAMESPACE_CGL_VERSION_1_0
#define CGLChoosePixelFormat rCGLChoosePixelFormat
#define CGLClearDrawable rCGLClearDrawable
#define CGLCopyContext rCGLCopyContext
#define CGLCreateContext rCGLCreateContext
#define CGLDescribePixelFormat rCGLDescribePixelFormat
#define CGLDescribeRenderer rCGLDescribeRenderer
#define CGLDestroyContext rCGLDestroyContext
#define CGLDestroyPixelFormat rCGLDestroyPixelFormat
#define CGLDestroyRendererInfo rCGLDestroyRendererInfo
#define CGLDisable rCGLDisable
#define CGLEnable rCGLEnable
#define CGLErrorString rCGLErrorString
#define CGLFlushDrawable rCGLFlushDrawable
#define CGLGetOffScreen rCGLGetOffScreen
#define CGLGetOption rCGLGetOption
#define CGLGetParameter rCGLGetParameter
#define CGLGetVersion rCGLGetVersion
#define CGLGetVirtualScreen rCGLGetVirtualScreen
#define CGLIsEnabled rCGLIsEnabled
#define CGLQueryRendererInfo rCGLQueryRendererInfo
#define CGLSetFullScreen rCGLSetFullScreen
#define CGLSetOffScreen rCGLSetOffScreen
#define CGLSetOption rCGLSetOption
#define CGLSetParameter rCGLSetParameter
#define CGLSetVirtualScreen rCGLSetVirtualScreen
#endif
#ifndef REGAL_NO_DECLARATION_CGL_VERSION_1_0
REGAL_DECL CGLError REGAL_CALL CGLChoosePixelFormat(const CGLPixelFormatAttribute *attribs, CGLPixelFormatObj *pix, GLint *npix);
REGAL_DECL CGLError REGAL_CALL CGLClearDrawable(CGLContextObj ctx);
REGAL_DECL CGLError REGAL_CALL CGLCopyContext(CGLContextObj src, CGLContextObj dst, GLbitfield mask);
REGAL_DECL CGLError REGAL_CALL CGLCreateContext(CGLPixelFormatObj pix, CGLContextObj share, CGLContextObj *ctx);
REGAL_DECL CGLError REGAL_CALL CGLDescribePixelFormat(CGLPixelFormatObj pix, GLint pix_num, CGLPixelFormatAttribute attrib, GLint *value);
REGAL_DECL CGLError REGAL_CALL CGLDescribeRenderer(CGLRendererInfoObj rend, GLint rend_num, CGLRendererProperty prop, GLint *value);
REGAL_DECL CGLError REGAL_CALL CGLDestroyContext(CGLContextObj ctx);
REGAL_DECL CGLError REGAL_CALL CGLDestroyPixelFormat(CGLPixelFormatObj pix);
REGAL_DECL CGLError REGAL_CALL CGLDestroyRendererInfo(CGLRendererInfoObj rend);
REGAL_DECL CGLError REGAL_CALL CGLDisable(CGLContextObj ctx, CGLContextEnable pname);
REGAL_DECL CGLError REGAL_CALL CGLEnable(CGLContextObj ctx, CGLContextEnable pname);
REGAL_DECL CGLError REGAL_CALL CGLFlushDrawable(CGLContextObj ctx);
REGAL_DECL CGLError REGAL_CALL CGLGetOffScreen(CGLContextObj ctx, GLsizei *width, GLsizei *height, GLsizei *rowbytes, void **baseaddr);
REGAL_DECL CGLError REGAL_CALL CGLGetOption(CGLGlobalOption pname, GLint *param);
REGAL_DECL CGLError REGAL_CALL CGLGetParameter(CGLContextObj ctx, CGLContextParameter pname, GLint *params);
REGAL_DECL CGLError REGAL_CALL CGLGetVirtualScreen(CGLContextObj ctx, GLint *screen);
REGAL_DECL CGLError REGAL_CALL CGLIsEnabled(CGLContextObj ctx, CGLContextEnable pname, GLint *enable);
REGAL_DECL CGLError REGAL_CALL CGLQueryRendererInfo(GLuint display_mask, CGLRendererInfoObj *rend, GLint *nrend);
REGAL_DECL CGLError REGAL_CALL CGLSetFullScreen(CGLContextObj ctx);
REGAL_DECL CGLError REGAL_CALL CGLSetOffScreen(CGLContextObj ctx, GLsizei width, GLsizei height, GLsizei rowbytes, void *baseaddr);
REGAL_DECL CGLError REGAL_CALL CGLSetOption(CGLGlobalOption pname, GLint param);
REGAL_DECL CGLError REGAL_CALL CGLSetParameter(CGLContextObj ctx, CGLContextParameter pname, const GLint *params);
REGAL_DECL CGLError REGAL_CALL CGLSetVirtualScreen(CGLContextObj ctx, GLint screen);
REGAL_DECL const char *REGAL_CALL CGLErrorString(CGLError error);
REGAL_DECL void REGAL_CALL CGLGetVersion(GLint *majorvers, GLint *minorvers);
#endif
/**
** CGL_VERSION_1_1
**/
#if (defined(CGL_VERSION_1_1) || defined(REGAL_NO_ENUM) || defined(REGAL_NO_CGL_VERSION_1_1)) && !defined(REGAL_NO_ENUM_CGL_VERSION_1_1)
#define REGAL_NO_ENUM_CGL_VERSION_1_1
#endif
#if (defined(CGL_VERSION_1_1) || defined(REGAL_NO_TYPEDEF) || defined(REGAL_NO_CGL_VERSION_1_1)) && !defined(REGAL_NO_TYPEDEF_CGL_VERSION_1_1)
#define REGAL_NO_TYPEDEF_CGL_VERSION_1_1
#endif
#if (defined(CGL_VERSION_1_1) || !defined(REGAL_NAMESPACE) || defined(REGAL_NO_CGL_VERSION_1_1)) && !defined(REGAL_NO_NAMESPACE_CGL_VERSION_1_1)
#define REGAL_NO_NAMESPACE_CGL_VERSION_1_1
#endif
#if (defined(CGL_VERSION_1_1) || !defined(REGAL_PLUGIN_MODE) || defined(REGAL_NO_CGL_VERSION_1_1)) && !defined(REGAL_NO_PLUGIN_CGL_VERSION_1_1)
#define REGAL_NO_PLUGIN_CGL_VERSION_1_1
#endif
#if (defined(CGL_VERSION_1_1) || defined(REGAL_NO_DECLARATION) || defined(REGAL_NO_CGL_VERSION_1_1)) && !defined(REGAL_NO_DECLARATION_CGL_VERSION_1_1)
#define REGAL_NO_DECLARATION_CGL_VERSION_1_1
#endif
#ifndef CGL_VERSION_1_1
#define CGL_VERSION_1_1 1
#endif
#ifndef REGAL_NO_TYPEDEF_CGL_VERSION_1_1
typedef CGLError (REGAL_CALL *PFNCGLCREATEPBUFFERPROC)(GLsizei width, GLsizei height, GLenum target, GLenum internalFormat, GLint max_level, CGLPBufferObj *pbuffer);
typedef CGLError (REGAL_CALL *PFNCGLDESCRIBEPBUFFERPROC)(CGLPBufferObj pbuffer, GLsizei *width, GLsizei *height, GLenum *target, GLenum *internalFormat, GLint *mipmap);
typedef CGLError (REGAL_CALL *PFNCGLDESTROYPBUFFERPROC)(CGLPBufferObj pbuffer);
typedef CGLError (REGAL_CALL *PFNCGLGETPBUFFERPROC)(CGLContextObj ctx, CGLPBufferObj *pbuffer, GLenum *face, GLint *level, GLint *screen);
typedef CGLError (REGAL_CALL *PFNCGLSETPBUFFERPROC)(CGLContextObj ctx, CGLPBufferObj pbuffer, GLenum face, GLint level, GLint screen);
typedef CGLError (REGAL_CALL *PFNCGLTEXIMAGEPBUFFERPROC)(CGLContextObj ctx, CGLPBufferObj pbuffer, GLenum source);
#endif
#ifndef REGAL_NO_NAMESPACE_CGL_VERSION_1_1
#define CGLCreatePBuffer rCGLCreatePBuffer
#define CGLDescribePBuffer rCGLDescribePBuffer
#define CGLDestroyPBuffer rCGLDestroyPBuffer
#define CGLGetPBuffer rCGLGetPBuffer
#define CGLSetPBuffer rCGLSetPBuffer
#define CGLTexImagePBuffer rCGLTexImagePBuffer
#endif
#ifndef REGAL_NO_DECLARATION_CGL_VERSION_1_1
REGAL_DECL CGLError REGAL_CALL CGLCreatePBuffer(GLsizei width, GLsizei height, GLenum target, GLenum internalFormat, GLint max_level, CGLPBufferObj *pbuffer);
REGAL_DECL CGLError REGAL_CALL CGLDescribePBuffer(CGLPBufferObj pbuffer, GLsizei *width, GLsizei *height, GLenum *target, GLenum *internalFormat, GLint *mipmap);
REGAL_DECL CGLError REGAL_CALL CGLDestroyPBuffer(CGLPBufferObj pbuffer);
REGAL_DECL CGLError REGAL_CALL CGLGetPBuffer(CGLContextObj ctx, CGLPBufferObj *pbuffer, GLenum *face, GLint *level, GLint *screen);
REGAL_DECL CGLError REGAL_CALL CGLSetPBuffer(CGLContextObj ctx, CGLPBufferObj pbuffer, GLenum face, GLint level, GLint screen);
REGAL_DECL CGLError REGAL_CALL CGLTexImagePBuffer(CGLContextObj ctx, CGLPBufferObj pbuffer, GLenum source);
#endif
/**
** CGL_VERSION_1_2
**/
#if (defined(CGL_VERSION_1_2) || defined(REGAL_NO_ENUM) || defined(REGAL_NO_CGL_VERSION_1_2)) && !defined(REGAL_NO_ENUM_CGL_VERSION_1_2)
#define REGAL_NO_ENUM_CGL_VERSION_1_2
#endif
#if (defined(CGL_VERSION_1_2) || defined(REGAL_NO_TYPEDEF) || defined(REGAL_NO_CGL_VERSION_1_2)) && !defined(REGAL_NO_TYPEDEF_CGL_VERSION_1_2)
#define REGAL_NO_TYPEDEF_CGL_VERSION_1_2
#endif
#if (defined(CGL_VERSION_1_2) || !defined(REGAL_NAMESPACE) || defined(REGAL_NO_CGL_VERSION_1_2)) && !defined(REGAL_NO_NAMESPACE_CGL_VERSION_1_2)
#define REGAL_NO_NAMESPACE_CGL_VERSION_1_2
#endif
#if (defined(CGL_VERSION_1_2) || !defined(REGAL_PLUGIN_MODE) || defined(REGAL_NO_CGL_VERSION_1_2)) && !defined(REGAL_NO_PLUGIN_CGL_VERSION_1_2)
#define REGAL_NO_PLUGIN_CGL_VERSION_1_2
#endif
#if (defined(CGL_VERSION_1_2) || defined(REGAL_NO_DECLARATION) || defined(REGAL_NO_CGL_VERSION_1_2)) && !defined(REGAL_NO_DECLARATION_CGL_VERSION_1_2)
#define REGAL_NO_DECLARATION_CGL_VERSION_1_2
#endif
#ifndef CGL_VERSION_1_2
#define CGL_VERSION_1_2 1
#endif
#ifndef REGAL_NO_TYPEDEF_CGL_VERSION_1_2
typedef CGLContextObj (REGAL_CALL *PFNCGLRETAINCONTEXTPROC)(CGLContextObj ctx);
typedef CGLError (REGAL_CALL *PFNCGLGETGLOBALOPTIONPROC)(CGLGlobalOption pname, GLint *params);
typedef CGLError (REGAL_CALL *PFNCGLLOCKCONTEXTPROC)(CGLContextObj ctx);
typedef CGLError (REGAL_CALL *PFNCGLSETGLOBALOPTIONPROC)(CGLGlobalOption pname, const GLint *params);
typedef CGLError (REGAL_CALL *PFNCGLUNLOCKCONTEXTPROC)(CGLContextObj ctx);
typedef CGLPBufferObj (REGAL_CALL *PFNCGLRETAINPBUFFERPROC)(CGLPBufferObj pbuffer);
typedef CGLPixelFormatObj (REGAL_CALL *PFNCGLGETPIXELFORMATPROC)(CGLContextObj ctx);
typedef CGLPixelFormatObj (REGAL_CALL *PFNCGLRETAINPIXELFORMATPROC)(CGLPixelFormatObj pix);
typedef GLuint (REGAL_CALL *PFNCGLGETCONTEXTRETAINCOUNTPROC)(CGLContextObj ctx);
typedef GLuint (REGAL_CALL *PFNCGLGETPBUFFERRETAINCOUNTPROC)(CGLPBufferObj pbuffer);
typedef GLuint (REGAL_CALL *PFNCGLGETPIXELFORMATRETAINCOUNTPROC)(CGLPixelFormatObj pix);
typedef void (REGAL_CALL *PFNCGLRELEASECONTEXTPROC)(CGLContextObj ctx);
typedef void (REGAL_CALL *PFNCGLRELEASEPBUFFERPROC)(CGLPBufferObj pbuffer);
typedef void (REGAL_CALL *PFNCGLRELEASEPIXELFORMATPROC)(CGLPixelFormatObj pix);
#endif
#ifndef REGAL_NO_NAMESPACE_CGL_VERSION_1_2
#define CGLGetContextRetainCount rCGLGetContextRetainCount
#define CGLGetGlobalOption rCGLGetGlobalOption
#define CGLGetPBufferRetainCount rCGLGetPBufferRetainCount
#define CGLGetPixelFormat rCGLGetPixelFormat
#define CGLGetPixelFormatRetainCount rCGLGetPixelFormatRetainCount
#define CGLLockContext rCGLLockContext
#define CGLReleaseContext rCGLReleaseContext
#define CGLReleasePBuffer rCGLReleasePBuffer
#define CGLReleasePixelFormat rCGLReleasePixelFormat
#define CGLRetainContext rCGLRetainContext
#define CGLRetainPBuffer rCGLRetainPBuffer
#define CGLRetainPixelFormat rCGLRetainPixelFormat
#define CGLSetGlobalOption rCGLSetGlobalOption
#define CGLUnlockContext rCGLUnlockContext
#endif
#ifndef REGAL_NO_DECLARATION_CGL_VERSION_1_2
REGAL_DECL CGLContextObj REGAL_CALL CGLRetainContext(CGLContextObj ctx);
REGAL_DECL CGLError REGAL_CALL CGLGetGlobalOption(CGLGlobalOption pname, GLint *params);
REGAL_DECL CGLError REGAL_CALL CGLLockContext(CGLContextObj ctx);
REGAL_DECL CGLError REGAL_CALL CGLSetGlobalOption(CGLGlobalOption pname, const GLint *params);
REGAL_DECL CGLError REGAL_CALL CGLUnlockContext(CGLContextObj ctx);
REGAL_DECL CGLPBufferObj REGAL_CALL CGLRetainPBuffer(CGLPBufferObj pbuffer);
REGAL_DECL CGLPixelFormatObj REGAL_CALL CGLGetPixelFormat(CGLContextObj ctx);
REGAL_DECL CGLPixelFormatObj REGAL_CALL CGLRetainPixelFormat(CGLPixelFormatObj pix);
REGAL_DECL GLuint REGAL_CALL CGLGetContextRetainCount(CGLContextObj ctx);
REGAL_DECL GLuint REGAL_CALL CGLGetPBufferRetainCount(CGLPBufferObj pbuffer);
REGAL_DECL GLuint REGAL_CALL CGLGetPixelFormatRetainCount(CGLPixelFormatObj pix);
REGAL_DECL void REGAL_CALL CGLReleaseContext(CGLContextObj ctx);
REGAL_DECL void REGAL_CALL CGLReleasePBuffer(CGLPBufferObj pbuffer);
REGAL_DECL void REGAL_CALL CGLReleasePixelFormat(CGLPixelFormatObj pix);
#endif
/**
** CGL_VERSION_1_3
**/
#if (defined(CGL_VERSION_1_3) || defined(REGAL_NO_ENUM) || defined(REGAL_NO_CGL_VERSION_1_3)) && !defined(REGAL_NO_ENUM_CGL_VERSION_1_3)
#define REGAL_NO_ENUM_CGL_VERSION_1_3
#endif
#if (defined(CGL_VERSION_1_3) || defined(REGAL_NO_TYPEDEF) || defined(REGAL_NO_CGL_VERSION_1_3)) && !defined(REGAL_NO_TYPEDEF_CGL_VERSION_1_3)
#define REGAL_NO_TYPEDEF_CGL_VERSION_1_3
#endif
#if (defined(CGL_VERSION_1_3) || !defined(REGAL_NAMESPACE) || defined(REGAL_NO_CGL_VERSION_1_3)) && !defined(REGAL_NO_NAMESPACE_CGL_VERSION_1_3)
#define REGAL_NO_NAMESPACE_CGL_VERSION_1_3
#endif
#if (defined(CGL_VERSION_1_3) || !defined(REGAL_PLUGIN_MODE) || defined(REGAL_NO_CGL_VERSION_1_3)) && !defined(REGAL_NO_PLUGIN_CGL_VERSION_1_3)
#define REGAL_NO_PLUGIN_CGL_VERSION_1_3
#endif
#if (defined(CGL_VERSION_1_3) || defined(REGAL_NO_DECLARATION) || defined(REGAL_NO_CGL_VERSION_1_3)) && !defined(REGAL_NO_DECLARATION_CGL_VERSION_1_3)
#define REGAL_NO_DECLARATION_CGL_VERSION_1_3
#endif
#ifndef CGL_VERSION_1_3
#define CGL_VERSION_1_3 1
#endif
#ifndef REGAL_NO_TYPEDEF_CGL_VERSION_1_3
typedef CGLContextObj (REGAL_CALL *PFNCGLGETCURRENTCONTEXTPROC)(void);
typedef CGLError (REGAL_CALL *PFNCGLGETSURFACEPROC)(CGLContextObj ctx, CGSConnectionID *conn, CGSWindowID *win, CGSSurfaceID *srf);
typedef CGLError (REGAL_CALL *PFNCGLSETCURRENTCONTEXTPROC)(CGLContextObj ctx);
typedef CGLError (REGAL_CALL *PFNCGLSETSURFACEPROC)(CGLContextObj ctx, CGSConnectionID conn, CGSWindowID win, CGSSurfaceID srf);
typedef CGLError (REGAL_CALL *PFNCGLTEXIMAGEIOSURFACE2DPROC)(CGLContextObj ctx, GLenum target, GLenum internal_format, GLsizei width, GLsizei height, GLenum format, GLenum type, IOSurfaceRef ioSurface, GLuint plane);
typedef CGLError (REGAL_CALL *PFNCGLUPDATECONTEXTPROC)(CGLContextObj ctx);
typedef CGLShareGroupObj (REGAL_CALL *PFNCGLGETSHAREGROUPPROC)(CGLContextObj ctx);
#endif
#ifndef REGAL_NO_NAMESPACE_CGL_VERSION_1_3
#define CGLGetCurrentContext rCGLGetCurrentContext
#define CGLGetShareGroup rCGLGetShareGroup
#define CGLGetSurface rCGLGetSurface
#define CGLSetCurrentContext rCGLSetCurrentContext
#define CGLSetSurface rCGLSetSurface
#define CGLTexImageIOSurface2D rCGLTexImageIOSurface2D
#define CGLUpdateContext rCGLUpdateContext
#endif
#ifndef REGAL_NO_DECLARATION_CGL_VERSION_1_3
REGAL_DECL CGLContextObj REGAL_CALL CGLGetCurrentContext(void);
REGAL_DECL CGLError REGAL_CALL CGLGetSurface(CGLContextObj ctx, CGSConnectionID *conn, CGSWindowID *win, CGSSurfaceID *srf);
REGAL_DECL CGLError REGAL_CALL CGLSetCurrentContext(CGLContextObj ctx);
REGAL_DECL CGLError REGAL_CALL CGLSetSurface(CGLContextObj ctx, CGSConnectionID conn, CGSWindowID win, CGSSurfaceID srf);
REGAL_DECL CGLError REGAL_CALL CGLTexImageIOSurface2D(CGLContextObj ctx, GLenum target, GLenum internal_format, GLsizei width, GLsizei height, GLenum format, GLenum type, IOSurfaceRef ioSurface, GLuint plane);
REGAL_DECL CGLError REGAL_CALL CGLUpdateContext(CGLContextObj ctx);
REGAL_DECL CGLShareGroupObj REGAL_CALL CGLGetShareGroup(CGLContextObj ctx);
#endif
#endif /* REGAL_SYS_OSX */
#ifdef __cplusplus
}
#endif
#endif /* __REGAL_CGL_H__ */