X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fglxapi.py;h=3e4ad57c0539492277c494d20b28b03bd63fb820;hb=66654031728218dff8a5a467fe73476d4e1d8b35;hp=07ff361cd3c41fada80a7222660550ad791a435b;hpb=d06fb348d5daabcb99f06f7b743f9b958c28bcf2;p=apitrace diff --git a/specs/glxapi.py b/specs/glxapi.py index 07ff361..3e4ad57 100644 --- a/specs/glxapi.py +++ b/specs/glxapi.py @@ -48,6 +48,8 @@ GLXWindow = Alias("GLXWindow", UInt32) GLXPbuffer = Alias("GLXPbuffer", UInt32) GLXPbufferSGIX = Alias("GLXPbufferSGIX", UInt32) GLXVideoSourceSGIX = Alias("GLXVideoSourceSGIX", UInt32) +GLXVideoDeviceNV = Alias("GLXVideoDeviceNV", UInt32) +GLXVideoCaptureDeviceNV = Alias("GLXVideoCaptureDeviceNV", UInt32) XVisualInfo = Struct("XVisualInfo", [ (Visual, "visual"), @@ -159,8 +161,11 @@ GLXEnum = FakeEnum(Int, [ "GLX_SAVED", # 0x8021 "GLX_WINDOW", # 0x8022 "GLX_PBUFFER", # 0x8023 - "GLX_PBUFFER_HEIGHT", # 0x8040 - "GLX_PBUFFER_WIDTH", # 0x8041 + "GLX_PBUFFER_HEIGHT", # 0x8040 + "GLX_PBUFFER_WIDTH", # 0x8041 + + "GLX_LOSE_CONTEXT_ON_RESET_ARB", # 0x8252 + "GLX_NO_RESET_NOTIFICATION_ARB", # 0x8261 "GLX_CONTEXT_PROFILE_MASK_ARB", # 0x9126 @@ -206,7 +211,7 @@ GLXbuffer = Flags(Int, [ "GLX_PBUFFER_CLOBBER_MASK", ]) -UnusedAttribs = AttribArray(GLXEnum, []) +UnusedAttribs = AttribArray(Const(GLXEnum), []) GLXCommonSizeAttribs = [ ('GLX_RED_SIZE', UInt), @@ -231,7 +236,6 @@ GLXVisualAttribs = AttribArray(GLXEnum, GLXCommonSizeAttribs + [ ('GLX_AUX_BUFFERS', UInt), ('GLX_SAMPLE_BUFFERS', UInt), ('GLX_SAMPLES', UInt)], - isConst = False ) GLXFBConfigCommonAttribs = GLXCommonSizeAttribs + [ @@ -263,17 +267,19 @@ GLXFBConfigGLXAttribs = GLXFBConfigCommonAttribs + [ ('GLX_VISUAL_ID', Int) # another XID ] -GLXFBConfigAttribs = AttribArray(GLXEnum, GLXFBConfigGLXAttribs) -GLXFBConfigSGIXAttribs = AttribArray(GLXEnum, GLXFBConfigCommonAttribs, isConst = False) +GLXFBConfigAttribs = AttribArray(Const(GLXEnum), GLXFBConfigGLXAttribs) +GLXFBConfigSGIXAttribs = AttribArray(GLXEnum, GLXFBConfigCommonAttribs) -GLXContextARBAttribs = AttribArray(GLXEnum, [ +GLXContextARBAttribs = AttribArray(Const(GLXEnum), [ + ('GLX_RENDER_TYPE', Flags(Int, ["GLX_RGBA_BIT", "GLX_COLOR_INDEX_BIT"])), ('GLX_CONTEXT_MAJOR_VERSION_ARB', Int), ('GLX_CONTEXT_MINOR_VERSION_ARB', Int), - ('GLX_CONTEXT_FLAGS_ARB', Flags(Int, ["GLX_CONTEXT_DEBUG_BIT_ARB", "GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB"])), - ('GLX_CONTEXT_PROFILE_MASK_ARB', Flags(Int, ["GLX_CONTEXT_CORE_PROFILE_BIT_ARB", "GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB"])) + ('GLX_CONTEXT_FLAGS_ARB', Flags(Int, ["GLX_CONTEXT_DEBUG_BIT_ARB", "GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB", "GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB"])), + ('GLX_CONTEXT_PROFILE_MASK_ARB', Flags(Int, ["GLX_CONTEXT_CORE_PROFILE_BIT_ARB", "GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB"])), + ('GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB', GLXEnum), ]) -GLXPbufferAttribs = AttribArray(GLXEnum, [ +GLXPbufferAttribs = AttribArray(Const(GLXEnum), [ ('GLX_PBUFFER_WIDTH', Int), ('GLX_PBUFFER_HEIGHT', Int), ('GLX_LARGEST_PBUFFER', Bool), @@ -284,7 +290,6 @@ GLXPbufferSGIXAttribs = AttribArray(GLXEnum, [ ('GLX_PRESERVED_CONTENTS_SGIX', Bool), ('GLX_LARGEST_PBUFFER', Bool), ('GLX_DIGITAL_MEDIA_PBUFFER_SGIX', Bool)], - isConst = False ) glxapi = Module("GLX") @@ -459,16 +464,16 @@ glxapi.addFunctions([ Function(Void, "glXReleaseTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (GLXEnum, "buffer")]), # GLX_NV_present_video - #Function(OpaquePointer(UInt), "glXEnumerateVideoDevicesNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "nelements")]), - #Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (UnusedAttribs, "attrib_list")]), + Function(Array(UInt, "(nelements ? *nelements : 0)"), "glXEnumerateVideoDevicesNV", [(Display, "dpy"), (Int, "screen"), Out(Pointer(Int), "nelements")]), + Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (UnusedAttribs, "attrib_list")]), # GLX_NV_video_output - #Function(Int, "glXGetVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (Int, "numVideoDevices"), (OpaquePointer(GLXVideoDeviceNV), "pVideoDevice")]), - #Function(Int, "glXReleaseVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice")]), - #Function(Int, "glXBindVideoImageNV", [(Display, "dpy"), (GLXVideoDeviceNV, "VideoDevice"), (GLXPbuffer, "pbuf"), (Int, "iVideoBuffer")]), - #Function(Int, "glXReleaseVideoImageNV", [(Display, "dpy"), (GLXPbuffer, "pbuf")]), - #Function(Int, "glXSendPbufferToVideoNV", [(Display, "dpy"), (GLXPbuffer, "pbuf"), (Int, "iBufferType"), (OpaquePointer(ULong), "pulCounterPbuffer"), (GLboolean, "bBlock")]), - #Function(Int, "glXGetVideoInfoNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice"), (OpaquePointer(ULong), "pulCounterOutputPbuffer"), (OpaquePointer(ULong), "pulCounterOutputVideo")]), + Function(Int, "glXGetVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (Int, "numVideoDevices"), Out(Array(GLXVideoDeviceNV, "numVideoDevices"), "pVideoDevice")]), + Function(Int, "glXReleaseVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice")]), + Function(Int, "glXBindVideoImageNV", [(Display, "dpy"), (GLXVideoDeviceNV, "VideoDevice"), (GLXPbuffer, "pbuf"), (Int, "iVideoBuffer")]), + Function(Int, "glXReleaseVideoImageNV", [(Display, "dpy"), (GLXPbuffer, "pbuf")]), + Function(Int, "glXSendPbufferToVideoNV", [(Display, "dpy"), (GLXPbuffer, "pbuf"), (Int, "iBufferType"), Out(Pointer(ULong), "pulCounterPbuffer"), (GLboolean, "bBlock")]), + Function(Int, "glXGetVideoInfoNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice"), Out(Pointer(ULong), "pulCounterOutputPbuffer"), Out(Pointer(ULong), "pulCounterOutputVideo")], sideeffects=False), # GLX_NV_swap_group Function(Bool, "glXJoinSwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLuint, "group")]), @@ -479,11 +484,11 @@ glxapi.addFunctions([ Function(Bool, "glXResetFrameCountNV", [(Display, "dpy"), (Int, "screen")]), # GLX_NV_video_capture - #Function(Int, "glXBindVideoCaptureDeviceNV", [(Display, "dpy"), (UInt, "video_capture_slot"), (GLXVideoCaptureDeviceNV, "device")]), - #Function(OpaquePointer(GLXVideoCaptureDeviceNV), "glXEnumerateVideoCaptureDevicesNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "nelements")]), - #Function(Void, "glXLockVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]), - #Function(Int, "glXQueryVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device"), (Int, "attribute"), (OpaquePointer(Int), "value")]), - #Function(Void, "glXReleaseVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]), + Function(Int, "glXBindVideoCaptureDeviceNV", [(Display, "dpy"), (UInt, "video_capture_slot"), (GLXVideoCaptureDeviceNV, "device")]), + Function(Array(GLXVideoCaptureDeviceNV, "(nelements ? *nelements : 0)"), "glXEnumerateVideoCaptureDevicesNV", [(Display, "dpy"), (Int, "screen"), Out(Pointer(Int), "nelements")]), + Function(Void, "glXLockVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]), + Function(Int, "glXQueryVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device"), (Int, "attribute"), Out(Pointer(Int), "value")], sideeffects=False), + Function(Void, "glXReleaseVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]), # GLX_EXT_swap_control Function(Void, "glXSwapIntervalEXT", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "interval")]),