]> git.cworth.org Git - apitrace/blobdiff - specs/glxapi.py
Merge branch 'trace-threads'
[apitrace] / specs / glxapi.py
index 361e89a66dc6a3dd86bf97abd17c785b9fbbc563..f13d592bd8b85044ff5ab843a964bb4a1335a040 100644 (file)
@@ -35,6 +35,7 @@ Visual = Opaque("Visual *")
 Font = Alias("Font", UInt32)
 Pixmap = Alias("Pixmap", UInt32)
 Window = Alias("Window", UInt32)
+Colormap = Alias("Colormap", UInt32)
 
 GLXContext = Opaque("GLXContext")
 GLXPixmap = Alias("GLXPixmap", UInt32)
@@ -67,23 +68,23 @@ Bool = FakeEnum(Int, [
 ])
 
 GLXAttrib = FakeEnum(Int, [
-    "GLX_USE_GL",
-    "GLX_BUFFER_SIZE",
-    "GLX_LEVEL",
-    "GLX_RGBA",
-    "GLX_DOUBLEBUFFER",
-    "GLX_STEREO",
-    "GLX_AUX_BUFFERS",
-    "GLX_RED_SIZE",
-    "GLX_GREEN_SIZE",
-    "GLX_BLUE_SIZE",
-    "GLX_ALPHA_SIZE",
-    "GLX_DEPTH_SIZE",
-    "GLX_STENCIL_SIZE",
-    "GLX_ACCUM_RED_SIZE",
-    "GLX_ACCUM_GREEN_SIZE",
-    "GLX_ACCUM_BLUE_SIZE",
-    "GLX_ACCUM_ALPHA_SIZE",
+    #"GLX_USE_GL",             # 1
+    "GLX_BUFFER_SIZE",                 # 2
+    "GLX_LEVEL",               # 3
+    "GLX_RGBA",                # 4
+    "GLX_DOUBLEBUFFER",        # 5
+    "GLX_STEREO",              # 6
+    "GLX_AUX_BUFFERS",                 # 7
+    "GLX_RED_SIZE",            # 8
+    "GLX_GREEN_SIZE",          # 9
+    "GLX_BLUE_SIZE",           # 10
+    "GLX_ALPHA_SIZE",          # 11
+    "GLX_DEPTH_SIZE",          # 12
+    "GLX_STENCIL_SIZE",        # 13
+    "GLX_ACCUM_RED_SIZE",      # 14
+    "GLX_ACCUM_GREEN_SIZE",    # 15
+    "GLX_ACCUM_BLUE_SIZE",     # 16
+    "GLX_ACCUM_ALPHA_SIZE",    # 17
 
     "GLX_CONFIG_CAVEAT",               # 0x20
     "GLX_X_VISUAL_TYPE",               # 0x22
@@ -94,6 +95,10 @@ GLXAttrib = FakeEnum(Int, [
     "GLX_TRANSPARENT_BLUE_VALUE",      # 0x27
     "GLX_TRANSPARENT_ALPHA_VALUE",     # 0x28
 
+    "GLX_CONTEXT_MAJOR_VERSION_ARB",      # 0x2091
+    "GLX_CONTEXT_MINOR_VERSION_ARB",      # 0x2092
+    "GLX_CONTEXT_FLAGS_ARB",              # 0x2094
+
     "GLX_BIND_TO_TEXTURE_RGB_EXT",        # 0x20D0
     "GLX_BIND_TO_TEXTURE_RGBA_EXT",       # 0x20D1
     "GLX_BIND_TO_MIPMAP_TEXTURE_EXT",     # 0x20D2
@@ -157,6 +162,8 @@ GLXAttrib = FakeEnum(Int, [
     "GLX_PBUFFER_HEIGHT",              # 0x8040
     "GLX_PBUFFER_WIDTH",               # 0x8041
 
+    "GLX_CONTEXT_PROFILE_MASK_ARB",      # 0x9126
+
     "GLX_SAMPLE_BUFFERS",              # 100000
     "GLX_SAMPLES",                     # 100001
 
@@ -302,7 +309,7 @@ glxapi.add_functions([
                                            Out(Pointer(ULong), "mask")]),
 
     # GLX_ARB_create_context
-    Function(GLXContext, "glXCreateContextAttribsARB", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXContext, "share_context"), (Bool, "direct"), (OpaquePointer(Const(Int)), "attrib_list")]),
+    Function(GLXContext, "glXCreateContextAttribsARB", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXContext, "share_context"), (Bool, "direct"), (Array(Const(GLXAttrib), "__AttribList_size(attrib_list)"), "attrib_list")]),
 
     # GLX_SGI_swap_control
     Function(Int, "glXSwapIntervalSGI", [(Int, "interval")]),
@@ -327,15 +334,15 @@ glxapi.add_functions([
     Function(Void, "glXFreeContextEXT", [(Display, "dpy"), (GLXContext, "context")]),
 
     # GLX_SGIX_fbconfig
-    Function(Int, "glXGetFBConfigAttribSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "attribute"), (OpaquePointer(Int), "value")]),
-    Function(OpaquePointer(GLXFBConfigSGIX), "glXChooseFBConfigSGIX", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "attrib_list"), (OpaquePointer(Int), "nelements")]),
+    Function(Int, "glXGetFBConfigAttribSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "attribute"), Out(Pointer(Int), "value")]),
+    Function(OpaquePointer(GLXFBConfigSGIX), "glXChooseFBConfigSGIX", [(Display, "dpy"), (Int, "screen"), (Array(Int, "__AttribList_size(attrib_list)"), "attrib_list"), (OpaquePointer(Int), "nelements")]),
     Function(GLXPixmap, "glXCreateGLXPixmapWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Pixmap, "pixmap")]),
     Function(GLXContext, "glXCreateContextWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "render_type"), (GLXContext, "share_list"), (Bool, "direct")]),
     Function(OpaquePointer(XVisualInfo), "glXGetVisualFromFBConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config")]),
-    Function(GLXFBConfigSGIX, "glXGetFBConfigFromVisualSGIX", [(Display, "dpy"), (OpaquePointer(XVisualInfo), "vis")]),
+    Function(GLXFBConfigSGIX, "glXGetFBConfigFromVisualSGIX", [(Display, "dpy"), Out(Pointer(XVisualInfo), "vis")]),
 
     # GLX_SGIX_pbuffer
-    Function(GLXPbufferSGIX, "glXCreateGLXPbufferSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (UInt, "width"), (UInt, "height"), (OpaquePointer(Int), "attrib_list")]),
+    Function(GLXPbufferSGIX, "glXCreateGLXPbufferSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (UInt, "width"), (UInt, "height"), (Array(Int, "__AttribList_size(attrib_list)"), "attrib_list")]),
     Function(Void, "glXDestroyGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf")]),
     Function(Int, "glXQueryGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf"), (Int, "attribute"), (OpaquePointer(UInt), "value")]),
     Function(Void, "glXSelectEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (ULong, "mask")]),
@@ -368,7 +375,7 @@ glxapi.add_functions([
     Function(Void, "glXCopySubBufferMESA", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height")]),
 
     # GLX_MESA_pixmap_colormap
-    #Function(GLXPixmap, "glXCreateGLXPixmapMESA", [(Display, "dpy"), (OpaquePointer(XVisualInfo), "visual"), (Pixmap, "pixmap"), (Colormap, "cmap")]),
+    Function(GLXPixmap, "glXCreateGLXPixmapMESA", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"), (Pixmap, "pixmap"), (Colormap, "cmap")]),
 
     # GLX_MESA_release_buffers
     Function(Bool, "glXReleaseBuffersMESA", [(Display, "dpy"), (GLXDrawable, "drawable")]),
@@ -376,6 +383,10 @@ glxapi.add_functions([
     # GLX_MESA_set_3dfx_mode
     Function(Bool, "glXSet3DfxModeMESA", [(Int, "mode")]),
 
+    # GLX_MESA_swap_control
+    Function(Int, "glXSwapIntervalMESA", [(UInt, "interval")]),
+    Function(Int, "glXGetSwapIntervalMESA", []),
+
     # GLX_OML_sync_control
     Function(Bool, "glXGetSyncValuesOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
     Function(Bool, "glXGetMscRateOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int32), "numerator"), (OpaquePointer(Int32), "denominator")]),
@@ -402,7 +413,7 @@ glxapi.add_functions([
 
     # 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"), (OpaquePointer(Const(Int)), "attrib_list")]),
+    #Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (Array(Const(Int), "__AttribList_size(attrib_list)"), "attrib_list")]),
 
     # GLX_NV_video_output
     #Function(Int, "glXGetVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (Int, "numVideoDevices"), (OpaquePointer(GLXVideoDeviceNV), "pVideoDevice")]),