X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fcglapi.py;h=89e89172c3ded08e1ab59904d5880ffb017e625a;hb=HEAD;hp=9f92a3ecbfbec59a8132cb6ded549e571155ed0d;hpb=8bf847a552e2854aa8b5726d76754a7647784e0c;p=apitrace diff --git a/specs/cglapi.py b/specs/cglapi.py index 9f92a3e..89e8917 100644 --- a/specs/cglapi.py +++ b/specs/cglapi.py @@ -23,7 +23,10 @@ # ##########################################################################/ -"""CGL API description.""" +"""CGL API description. + +http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CGL_OpenGL/Reference/reference.html +""" from stdapi import * @@ -75,10 +78,14 @@ CGLPixelFormatAttribute = Enum("CGLPixelFormatAttribute", [ "kCGLPFARemotePBuffer", "kCGLPFAAllowOfflineRenderers", "kCGLPFAAcceleratedCompute", + "kCGLPFAOpenGLProfile", "kCGLPFAVirtualScreenCount", "kCGLPFARobust", "kCGLPFAMPSafe", "kCGLPFAMultiScreen", + + "kCGLOGLPVersion_Legacy", + "kCGLOGLPVersion_3_2_Core", ]) CGLRendererProperty = Enum("CGLRendererProperty", [ @@ -173,21 +180,21 @@ CGLError = Enum("CGLError", [ CGLContextObj = Opaque("CGLContextObj") -cglapi = API("CGL") +cglapi = Module("CGL") -cglapi.add_functions([ +cglapi.addFunctions([ # CGLCurrent.h, libGL.dylib Function(CGLError, "CGLSetCurrentContext", [(CGLContextObj, "ctx")]), Function(CGLContextObj, "CGLGetCurrentContext", []), # OpenGL.h, OpenGL framework - Function(CGLError, "CGLChoosePixelFormat", [(OpaquePointer(Const(CGLPixelFormatAttribute)), "attribs"), (OpaquePointer(CGLPixelFormatObj), "pix"), (OpaquePointer(GLint), "npix")]), + Function(CGLError, "CGLChoosePixelFormat", [(Array(Const(CGLPixelFormatAttribute), "_AttribList_size(attribs)"), "attribs"), Out(Pointer(CGLPixelFormatObj), "pix"), Out(Pointer(GLint), "npix")]), Function(CGLError, "CGLDestroyPixelFormat", [(CGLPixelFormatObj, "pix")]), - Function(CGLError, "CGLDescribePixelFormat", [(CGLPixelFormatObj, "pix"), (GLint, "pix_num"), (CGLPixelFormatAttribute, "attrib"), (OpaquePointer(GLint), "value")]), + Function(CGLError, "CGLDescribePixelFormat", [(CGLPixelFormatObj, "pix"), (GLint, "pix_num"), (CGLPixelFormatAttribute, "attrib"), Out(Pointer(GLint), "value")]), Function(Void, "CGLReleasePixelFormat", [(CGLPixelFormatObj, "pix")]), Function(CGLPixelFormatObj, "CGLRetainPixelFormat", [(CGLPixelFormatObj, "pix")]), Function(GLuint, "CGLGetPixelFormatRetainCount", [(CGLPixelFormatObj, "pix")]), - Function(CGLError, "CGLQueryRendererInfo", [(GLuint, "display_mask"), (OpaquePointer(CGLRendererInfoObj), "rend"), (OpaquePointer(GLint), "nrend")]), + Function(CGLError, "CGLQueryRendererInfo", [(GLuint, "display_mask"), Out(Pointer(CGLRendererInfoObj), "rend"), Out(Pointer(GLint), "nrend")]), Function(CGLError, "CGLDestroyRendererInfo", [(CGLRendererInfoObj, "rend")]), Function(CGLError, "CGLDescribeRenderer", [(CGLRendererInfoObj, "rend"), (GLint, "rend_num"), (CGLRendererProperty, "prop"), (OpaquePointer(GLint), "value")]), Function(CGLError, "CGLCreateContext", [(CGLPixelFormatObj, "pix"), (CGLContextObj, "share"), Out(Pointer(CGLContextObj), "ctx")]), @@ -214,19 +221,19 @@ cglapi.add_functions([ Function(CGLError, "CGLFlushDrawable", [(CGLContextObj, "ctx")]), Function(CGLError, "CGLEnable", [(CGLContextObj, "ctx"), (CGLContextEnable, "pname")]), Function(CGLError, "CGLDisable", [(CGLContextObj, "ctx"), (CGLContextEnable, "pname")]), - Function(CGLError, "CGLIsEnabled", [(CGLContextObj, "ctx"), (CGLContextEnable, "pname"), Out(Pointer(GLint), "enable")]), - Function(CGLError, "CGLSetParameter", [(CGLContextObj, "ctx"), (CGLContextParameter, "pname"), (OpaquePointer(Const(GLint)), "params")]), - Function(CGLError, "CGLGetParameter", [(CGLContextObj, "ctx"), (CGLContextParameter, "pname"), Out(OpaquePointer(GLint), "params")]), + Function(CGLError, "CGLIsEnabled", [(CGLContextObj, "ctx"), (CGLContextEnable, "pname"), Out(Pointer(GLint), "enable")], sideeffects=False), + Function(CGLError, "CGLSetParameter", [(CGLContextObj, "ctx"), (CGLContextParameter, "pname"), (Array(Const(GLint), 1), "params")]), + Function(CGLError, "CGLGetParameter", [(CGLContextObj, "ctx"), (CGLContextParameter, "pname"), Out(Array(GLint, 1), "params")], sideeffects=False), Function(CGLError, "CGLSetVirtualScreen", [(CGLContextObj, "ctx"), (GLint, "screen")]), - Function(CGLError, "CGLGetVirtualScreen", [(CGLContextObj, "ctx"), Out(Pointer(GLint), "screen")]), + Function(CGLError, "CGLGetVirtualScreen", [(CGLContextObj, "ctx"), Out(Pointer(GLint), "screen")], sideeffects=False), Function(CGLError, "CGLSetGlobalOption", [(CGLGlobalOption, "pname"), (OpaquePointer(Const(GLint)), "params")]), Function(CGLError, "CGLGetGlobalOption", [(CGLGlobalOption, "pname"), Out(OpaquePointer(GLint), "params")]), Function(CGLError, "CGLSetOption", [(CGLGlobalOption, "pname"), (GLint, "param")]), - Function(CGLError, "CGLGetOption", [(CGLGlobalOption, "pname"), Out(Pointer(GLint), "param")]), + Function(CGLError, "CGLGetOption", [(CGLGlobalOption, "pname"), Out(Pointer(GLint), "param")], sideeffects=False), Function(CGLError, "CGLLockContext", [(CGLContextObj, "ctx")]), Function(CGLError, "CGLUnlockContext", [(CGLContextObj, "ctx")]), - Function(Void, "CGLGetVersion", [Out(Pointer(GLint), "majorvers"), Out(Pointer(GLint), "minorvers")]), - Function(Const(CString), "CGLErrorString", [(CGLError, "error")]), + Function(Void, "CGLGetVersion", [Out(Pointer(GLint), "majorvers"), Out(Pointer(GLint), "minorvers")], sideeffects=False), + Function(ConstCString, "CGLErrorString", [(CGLError, "error")], sideeffects=False), # CGLIOSurface.h, OpenGL framework Function(CGLError, "CGLTexImageIOSurface2D", [(CGLContextObj, "ctx"), (GLenum, "target"), (GLenum, "internal_format"), (GLsizei, "width"), (GLsizei, "height"), (GLenum, "format"), (GLenum, "type"), (IOSurfaceRef, "ioSurface"), (GLuint, "plane")]),