1 ##########################################################################
3 # Copyright 2008-2009 VMware, Inc.
6 # Permission is hereby granted, free of charge, to any person obtaining a copy
7 # of this software and associated documentation files (the "Software"), to deal
8 # in the Software without restriction, including without limitation the rights
9 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 # copies of the Software, and to permit persons to whom the Software is
11 # furnished to do so, subject to the following conditions:
13 # The above copyright notice and this permission notice shall be included in
14 # all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 ##########################################################################/
26 """GLX API description."""
32 VisualID = Alias("VisualID", UInt32)
33 Display = Opaque("Display *")
34 Visual = Opaque("Visual *")
35 Font = Alias("Font", UInt32)
36 Pixmap = Alias("Pixmap", UInt32)
37 Window = Alias("Window", UInt32)
39 GLXContext = Opaque("GLXContext")
40 GLXPixmap = Alias("GLXPixmap", UInt32)
41 GLXDrawable = Alias("GLXDrawable", UInt32)
42 GLXFBConfig = Opaque("GLXFBConfig")
43 GLXFBConfigSGIX = Opaque("GLXFBConfigSGIX")
44 GLXFBConfigID = Alias("GLXFBConfigID", UInt32)
45 GLXContextID = Alias("GLXContextID", UInt32)
46 GLXWindow = Alias("GLXWindow", UInt32)
47 GLXPbuffer = Alias("GLXPbuffer", UInt32)
48 GLXPbufferSGIX = Alias("GLXPbufferSGIX", UInt32)
49 GLXVideoSourceSGIX = Alias("GLXVideoSourceSGIX", UInt32)
51 XVisualInfo = Struct("XVisualInfo", [
53 (VisualID, "visualid"),
58 (ULong, "green_mask"),
60 (Int, "colormap_size"),
61 (Int, "bits_per_rgb"),
64 Bool = FakeEnum(Int, [
69 GLXAttrib = FakeEnum(Int, [
84 "GLX_ACCUM_GREEN_SIZE",
85 "GLX_ACCUM_BLUE_SIZE",
86 "GLX_ACCUM_ALPHA_SIZE",
88 "GLX_CONFIG_CAVEAT", # 0x20
89 "GLX_X_VISUAL_TYPE", # 0x22
90 "GLX_TRANSPARENT_TYPE", # 0x23
91 "GLX_TRANSPARENT_INDEX_VALUE", # 0x24
92 "GLX_TRANSPARENT_RED_VALUE", # 0x25
93 "GLX_TRANSPARENT_GREEN_VALUE", # 0x26
94 "GLX_TRANSPARENT_BLUE_VALUE", # 0x27
95 "GLX_TRANSPARENT_ALPHA_VALUE", # 0x28
97 "GLX_BIND_TO_TEXTURE_RGB_EXT", # 0x20D0
98 "GLX_BIND_TO_TEXTURE_RGBA_EXT", # 0x20D1
99 "GLX_BIND_TO_MIPMAP_TEXTURE_EXT", # 0x20D2
100 "GLX_BIND_TO_TEXTURE_TARGETS_EXT", # 0x20D3
101 "GLX_Y_INVERTED_EXT", # 0x20D4
102 "GLX_TEXTURE_FORMAT_EXT", # 0x20D5
103 "GLX_TEXTURE_TARGET_EXT", # 0x20D6
104 "GLX_MIPMAP_TEXTURE_EXT", # 0x20D7
105 "GLX_TEXTURE_FORMAT_NONE_EXT", # 0x20D8
106 "GLX_TEXTURE_FORMAT_RGB_EXT", # 0x20D9
107 "GLX_TEXTURE_FORMAT_RGBA_EXT", # 0x20DA
108 "GLX_TEXTURE_1D_EXT", # 0x20DB
109 "GLX_TEXTURE_2D_EXT", # 0x20DC
110 "GLX_TEXTURE_RECTANGLE_EXT", # 0x20DD
111 "GLX_FRONT_LEFT_EXT", # 0x20DE
112 "GLX_FRONT_RIGHT_EXT", # 0x20DF
113 "GLX_BACK_LEFT_EXT", # 0x20E0
114 "GLX_BACK_RIGHT_EXT", # 0x20E1
115 "GLX_AUX0_EXT", # 0x20E2
116 "GLX_AUX1_EXT", # 0x20E3
117 "GLX_AUX2_EXT", # 0x20E4
118 "GLX_AUX3_EXT", # 0x20E5
119 "GLX_AUX4_EXT", # 0x20E6
120 "GLX_AUX5_EXT", # 0x20E7
121 "GLX_AUX6_EXT", # 0x20E8
122 "GLX_AUX7_EXT", # 0x20E9
123 "GLX_AUX8_EXT", # 0x20EA
124 "GLX_AUX9_EXT", # 0x20EB
127 "GLX_SLOW_CONFIG", # 0x8001
128 "GLX_TRUE_COLOR", # 0x8002
129 "GLX_DIRECT_COLOR", # 0x8003
130 "GLX_PSEUDO_COLOR", # 0x8004
131 "GLX_STATIC_COLOR", # 0x8005
132 "GLX_GRAY_SCALE", # 0x8006
133 "GLX_STATIC_GRAY", # 0x8007
134 "GLX_TRANSPARENT_RGB", # 0x8008
135 "GLX_TRANSPARENT_INDEX", # 0x8009
136 "GLX_VISUAL_ID", # 0x800B
137 "GLX_SCREEN", # 0x800C
138 "GLX_NON_CONFORMANT_CONFIG", # 0x800D
139 "GLX_DRAWABLE_TYPE", # 0x8010
140 "GLX_RENDER_TYPE", # 0x8011
141 "GLX_X_RENDERABLE", # 0x8012
142 "GLX_FBCONFIG_ID", # 0x8013
143 "GLX_RGBA_TYPE", # 0x8014
144 "GLX_COLOR_INDEX_TYPE", # 0x8015
145 "GLX_MAX_PBUFFER_WIDTH", # 0x8016
146 "GLX_MAX_PBUFFER_HEIGHT", # 0x8017
147 "GLX_MAX_PBUFFER_PIXELS", # 0x8018
148 "GLX_PRESERVED_CONTENTS", # 0x801B
149 "GLX_LARGEST_PBUFFER", # 0x801C
150 "GLX_WIDTH", # 0x801D
151 "GLX_HEIGHT", # 0x801E
152 "GLX_EVENT_MASK", # 0x801F
153 "GLX_DAMAGED", # 0x8020
154 "GLX_SAVED", # 0x8021
155 "GLX_WINDOW", # 0x8022
156 "GLX_PBUFFER", # 0x8023
157 "GLX_PBUFFER_HEIGHT", # 0x8040
158 "GLX_PBUFFER_WIDTH", # 0x8041
160 "GLX_SAMPLE_BUFFERS", # 100000
161 "GLX_SAMPLES", # 100001
163 "GLX_DONT_CARE", # 0xFFFFFFFF
166 GLXError = FakeEnum(Int, [
176 GLXname = FakeEnum(Int, [
182 GLXbuffer = Flags(Int, [
186 "GLX_AUX_BUFFERS_BIT",
187 "GLX_FRONT_LEFT_BUFFER_BIT",
188 "GLX_FRONT_RIGHT_BUFFER_BIT",
189 "GLX_BACK_LEFT_BUFFER_BIT",
190 "GLX_BACK_RIGHT_BUFFER_BIT",
191 "GLX_DEPTH_BUFFER_BIT",
192 "GLX_STENCIL_BUFFER_BIT",
193 "GLX_ACCUM_BUFFER_BIT",
196 GLXEnum = FakeEnum(Int, [
205 "GLX_TRANSPARENT_RGB",
206 "GLX_TRANSPARENT_INDEX",
209 "GLX_NON_CONFORMANT_CONFIG",
215 "GLX_COLOR_INDEX_TYPE",
216 "GLX_MAX_PBUFFER_WIDTH",
217 "GLX_MAX_PBUFFER_HEIGHT",
218 "GLX_MAX_PBUFFER_PIXELS",
219 "GLX_PRESERVED_CONTENTS",
220 "GLX_LARGEST_PBUFFER",
228 "GLX_PBUFFER_HEIGHT",
232 GLXbuffer = Flags(Int, [
234 "GLX_COLOR_INDEX_BIT",
235 "GLX_PBUFFER_CLOBBER_MASK",
240 PROC = Opaque("__GLXextFuncPtr")
242 glxapi.add_functions([
244 Function(Pointer(XVisualInfo), "glXChooseVisual", [(Display, "dpy"), (Int, "screen"), (Array(GLXAttrib, "__AttribList_size(attribList)"), "attribList")]),
245 Function(GLXContext, "glXCreateContext", [(Display, "dpy"), (Pointer(XVisualInfo), "vis"), (GLXContext, "shareList"), (Bool, "direct")]),
246 Function(Void, "glXDestroyContext", [(Display, "dpy"), (GLXContext, "ctx")]),
247 Function(Bool, "glXMakeCurrent", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXContext, "ctx")]),
248 Function(Void, "glXCopyContext", [(Display, "dpy"), (GLXContext, "src"), (GLXContext, "dst"),
250 Function(Void, "glXSwapBuffers", [(Display, "dpy"), (GLXDrawable, "drawable")]),
251 Function(GLXPixmap, "glXCreateGLXPixmap", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"),
252 (Pixmap, "pixmap")]),
253 Function(Void, "glXDestroyGLXPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]),
254 Function(Bool, "glXQueryExtension", [(Display, "dpy"), Out(Pointer(Int), "errorb"), Out(Pointer(Int), "event")]),
255 Function(Bool, "glXQueryVersion", [(Display, "dpy"), Out(Pointer(Int), "maj"), Out(Pointer(Int), "min")]),
256 Function(Bool, "glXIsDirect", [(Display, "dpy"), (GLXContext, "ctx")]),
257 Function(GLXError, "glXGetConfig", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"),
258 (GLXAttrib, "attrib"), Out(Pointer(Int), "value")]),
259 Function(GLXContext, "glXGetCurrentContext", [], sideeffects=False),
260 Function(GLXDrawable, "glXGetCurrentDrawable", [], sideeffects=False),
261 Function(Void, "glXWaitGL", []),
262 Function(Void, "glXWaitX", []),
263 Function(Void, "glXUseXFont", [(Font, "font"), (Int, "first"), (Int, "count"), (Int, "list")]),
266 Function((Const(String("char *"))), "glXQueryExtensionsString", [(Display, "dpy"), (Int, "screen")]),
267 Function((Const(String("char *"))), "glXQueryServerString", [(Display, "dpy"), (Int, "screen"), (GLXname, "name")]),
268 Function((Const(String("char *"))), "glXGetClientString", [(Display, "dpy"), (GLXname, "name")]),
271 Function(Display, "glXGetCurrentDisplay", [], sideeffects=False),
274 Function(Array(GLXFBConfig, "*nitems"), "glXChooseFBConfig", [(Display, "dpy"), (Int, "screen"), (Array(Const(GLXAttrib), "__AttribList_size(attribList)"), "attribList"), Out(Pointer(Int), "nitems")]),
275 Function(Int, "glXGetFBConfigAttrib", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXAttrib, "attribute"), Out(Pointer(Int), "value")]),
276 Function(Array(GLXFBConfig, "*nelements"), "glXGetFBConfigs", [(Display, "dpy"), (Int, "screen"),
277 Out(Pointer(Int), "nelements")]),
278 Function(Pointer(XVisualInfo), "glXGetVisualFromFBConfig", [(Display, "dpy"),
279 (GLXFBConfig, "config")]),
280 Function(GLXWindow, "glXCreateWindow", [(Display, "dpy"), (GLXFBConfig, "config"),
281 (Window, "win"), (Array(Const(Int), "__AttribList_size(attribList)"), "attribList")]),
282 Function(Void, "glXDestroyWindow", [(Display, "dpy"), (GLXWindow, "window")]),
283 Function(GLXPixmap, "glXCreatePixmap", [(Display, "dpy"), (GLXFBConfig, "config"),
284 (Pixmap, "pixmap"), (Array(Const(Int), "__AttribList_size(attribList)"), "attribList")]),
285 Function(Void, "glXDestroyPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]),
286 Function(GLXPbuffer, "glXCreatePbuffer", [(Display, "dpy"), (GLXFBConfig, "config"),
287 (Array(Const(GLXEnum), "__AttribList_size(attribList)"), "attribList")]),
288 Function(Void, "glXDestroyPbuffer", [(Display, "dpy"), (GLXPbuffer, "pbuf")]),
289 Function(Void, "glXQueryDrawable", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXEnum, "attribute"),
290 Out(Pointer(UInt), "value")]),
291 Function(GLXContext, "glXCreateNewContext", [(Display, "dpy"), (GLXFBConfig, "config"),
292 (GLXEnum, "renderType"), (GLXContext, "shareList"),
294 Function(Bool, "glXMakeContextCurrent", [(Display, "dpy"), (GLXDrawable, "draw"),
295 (GLXDrawable, "read"), (GLXContext, "ctx")]),
296 Function(GLXDrawable, "glXGetCurrentReadDrawable", []),
297 Function(Int, "glXQueryContext", [(Display, "dpy"), (GLXContext, "ctx"), (GLXEnum, "attribute"),
298 Out(Pointer(Int), "value")]),
299 Function(Void, "glXSelectEvent", [(Display, "dpy"), (GLXDrawable, "drawable"),
301 Function(Void, "glXGetSelectedEvent", [(Display, "dpy"), (GLXDrawable, "drawable"),
302 Out(Pointer(ULong), "mask")]),
304 # GLX_ARB_create_context
305 Function(GLXContext, "glXCreateContextAttribsARB", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXContext, "share_context"), (Bool, "direct"), (OpaquePointer(Const(Int)), "attrib_list")]),
307 # GLX_SGI_swap_control
308 Function(Int, "glXSwapIntervalSGI", [(Int, "interval")]),
311 Function(Int, "glXGetVideoSyncSGI", [(OpaquePointer(UInt), "count")]),
312 Function(Int, "glXWaitVideoSyncSGI", [(Int, "divisor"), (Int, "remainder"), (OpaquePointer(UInt), "count")]),
314 # GLX_SGI_make_current_read
315 Function(Bool, "glXMakeCurrentReadSGI", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXDrawable, "read"), (GLXContext, "ctx")]),
316 Function(GLXDrawable, "glXGetCurrentReadDrawableSGI", []),
318 # GLX_SGIX_video_source
319 #Function(GLXVideoSourceSGIX, "glXCreateGLXVideoSourceSGIX", [(Display, "display"), (Int, "screen"), (VLServer, "server"), (VLPath, "path"), (Int, "nodeClass"), (VLNode, "drainNode")]),
320 #Function(Void, "glXDestroyGLXVideoSourceSGIX", [(Display, "dpy"), (GLXVideoSourceSGIX, "glxvideosource")]),
322 # GLX_EXT_import_context
323 Function(Display, "glXGetCurrentDisplayEXT", []),
324 Function(Int, "glXQueryContextInfoEXT", [(Display, "dpy"), (GLXContext, "context"), (Int, "attribute"), (OpaquePointer(Int), "value")]),
325 Function(GLXContextID, "glXGetContextIDEXT", [(Const(GLXContext), "context")]),
326 Function(GLXContext, "glXImportContextEXT", [(Display, "dpy"), (GLXContextID, "contextID")]),
327 Function(Void, "glXFreeContextEXT", [(Display, "dpy"), (GLXContext, "context")]),
330 Function(Int, "glXGetFBConfigAttribSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "attribute"), (OpaquePointer(Int), "value")]),
331 Function(OpaquePointer(GLXFBConfigSGIX), "glXChooseFBConfigSGIX", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "attrib_list"), (OpaquePointer(Int), "nelements")]),
332 Function(GLXPixmap, "glXCreateGLXPixmapWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Pixmap, "pixmap")]),
333 Function(GLXContext, "glXCreateContextWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "render_type"), (GLXContext, "share_list"), (Bool, "direct")]),
334 Function(OpaquePointer(XVisualInfo), "glXGetVisualFromFBConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config")]),
335 Function(GLXFBConfigSGIX, "glXGetFBConfigFromVisualSGIX", [(Display, "dpy"), (OpaquePointer(XVisualInfo), "vis")]),
338 Function(GLXPbufferSGIX, "glXCreateGLXPbufferSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (UInt, "width"), (UInt, "height"), (OpaquePointer(Int), "attrib_list")]),
339 Function(Void, "glXDestroyGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf")]),
340 Function(Int, "glXQueryGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf"), (Int, "attribute"), (OpaquePointer(UInt), "value")]),
341 Function(Void, "glXSelectEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (ULong, "mask")]),
342 Function(Void, "glXGetSelectedEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(ULong), "mask")]),
345 Function(Void, "glXCushionSGI", [(Display, "dpy"), (Window, "window"), (Float, "cushion")]),
347 # GLX_SGIX_video_resize
348 Function(Int, "glXBindChannelToWindowSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (Window, "window")]),
349 Function(Int, "glXChannelRectSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (Int, "x"), (Int, "y"), (Int, "w"), (Int, "h")]),
350 Function(Int, "glXQueryChannelRectSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (OpaquePointer(Int), "dx"), (OpaquePointer(Int), "dy"), (OpaquePointer(Int), "dw"), (OpaquePointer(Int), "dh")]),
351 Function(Int, "glXQueryChannelDeltasSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (OpaquePointer(Int), "x"), (OpaquePointer(Int), "y"), (OpaquePointer(Int), "w"), (OpaquePointer(Int), "h")]),
352 Function(Int, "glXChannelRectSyncSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (GLenum, "synctype")]),
355 #Function(Bool, "glXAssociateDMPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuffer"), (OpaquePointer(DMparams), "params"), (DMbuffer, "dmbuffer")]),
357 # GLX_SGIX_swap_group
358 Function(Void, "glXJoinSwapGroupSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXDrawable, "member")]),
360 # GLX_SGIX_swap_barrier
361 Function(Void, "glXBindSwapBarrierSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "barrier")]),
362 Function(Bool, "glXQueryMaxSwapBarriersSGIX", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "max")]),
364 # GLX_SUN_get_transparent_index
365 #Function(Status, "glXGetTransparentIndexSUN", [(Display, "dpy"), (Window, "overlay"), (Window, "underlay"), (OpaquePointer(Long), "pTransparentIndex")]),
367 # GLX_MESA_copy_sub_buffer
368 Function(Void, "glXCopySubBufferMESA", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height")]),
370 # GLX_MESA_pixmap_colormap
371 #Function(GLXPixmap, "glXCreateGLXPixmapMESA", [(Display, "dpy"), (OpaquePointer(XVisualInfo), "visual"), (Pixmap, "pixmap"), (Colormap, "cmap")]),
373 # GLX_MESA_release_buffers
374 Function(Bool, "glXReleaseBuffersMESA", [(Display, "dpy"), (GLXDrawable, "drawable")]),
376 # GLX_MESA_set_3dfx_mode
377 Function(Bool, "glXSet3DfxModeMESA", [(Int, "mode")]),
379 # GLX_OML_sync_control
380 Function(Bool, "glXGetSyncValuesOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
381 Function(Bool, "glXGetMscRateOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int32), "numerator"), (OpaquePointer(Int32), "denominator")]),
382 Function(Int64, "glXSwapBuffersMscOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_msc"), (Int64, "divisor"), (Int64, "remainder")]),
383 Function(Bool, "glXWaitForMscOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_msc"), (Int64, "divisor"), (Int64, "remainder"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
384 Function(Bool, "glXWaitForSbcOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_sbc"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
387 #Function(OpaquePointer(GLXHyperpipeNetworkSGIX), "glXQueryHyperpipeNetworkSGIX", [(Display, "dpy"), (OpaquePointer(Int), "npipes")]),
388 #Function(Int, "glXHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "networkId"), (Int, "npipes"), (OpaquePointer(GLXHyperpipeConfigSGIX), "cfg"), (OpaquePointer(Int), "hpId")]),
389 #Function(OpaquePointer(GLXHyperpipeConfigSGIX), "glXQueryHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "hpId"), (OpaquePointer(Int), "npipes")]),
390 #Function(Int, "glXDestroyHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "hpId")]),
391 #Function(Int, "glXBindHyperpipeSGIX", [(Display, "dpy"), (Int, "hpId")]),
392 #Function(Int, "glXQueryHyperpipeBestAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "attribList"), (OpaquePointer(Void), "returnAttribList")]),
393 #Function(Int, "glXHyperpipeAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "attribList")]),
394 #Function(Int, "glXQueryHyperpipeAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "returnAttribList")]),
396 # GLX_MESA_agp_offset
397 Function(UInt, "glXGetAGPOffsetMESA", [(OpaquePointer(Const(Void)), "pointer")]),
399 # EXT_texture_from_pixmap
400 Function(Void, "glXBindTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (Int, "buffer"), (Array(Const(Int), "__AttribList_size(attrib_list)"), "attrib_list")]),
401 Function(Void, "glXReleaseTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (Int, "buffer")]),
403 # GLX_NV_present_video
404 #Function(OpaquePointer(UInt), "glXEnumerateVideoDevicesNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "nelements")]),
405 #Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (OpaquePointer(Const(Int)), "attrib_list")]),
407 # GLX_NV_video_output
408 #Function(Int, "glXGetVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (Int, "numVideoDevices"), (OpaquePointer(GLXVideoDeviceNV), "pVideoDevice")]),
409 #Function(Int, "glXReleaseVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice")]),
410 #Function(Int, "glXBindVideoImageNV", [(Display, "dpy"), (GLXVideoDeviceNV, "VideoDevice"), (GLXPbuffer, "pbuf"), (Int, "iVideoBuffer")]),
411 #Function(Int, "glXReleaseVideoImageNV", [(Display, "dpy"), (GLXPbuffer, "pbuf")]),
412 #Function(Int, "glXSendPbufferToVideoNV", [(Display, "dpy"), (GLXPbuffer, "pbuf"), (Int, "iBufferType"), (OpaquePointer(ULong), "pulCounterPbuffer"), (GLboolean, "bBlock")]),
413 #Function(Int, "glXGetVideoInfoNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice"), (OpaquePointer(ULong), "pulCounterOutputPbuffer"), (OpaquePointer(ULong), "pulCounterOutputVideo")]),
416 Function(Bool, "glXJoinSwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLuint, "group")]),
417 Function(Bool, "glXBindSwapBarrierNV", [(Display, "dpy"), (GLuint, "group"), (GLuint, "barrier")]),
418 Function(Bool, "glXQuerySwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(GLuint), "group"), (OpaquePointer(GLuint), "barrier")]),
419 Function(Bool, "glXQueryMaxSwapGroupsNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(GLuint), "maxGroups"), (OpaquePointer(GLuint), "maxBarriers")]),
420 Function(Bool, "glXQueryFrameCountNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(GLuint), "count")]),
421 Function(Bool, "glXResetFrameCountNV", [(Display, "dpy"), (Int, "screen")]),
423 # GLX_NV_video_capture
424 #Function(Int, "glXBindVideoCaptureDeviceNV", [(Display, "dpy"), (UInt, "video_capture_slot"), (GLXVideoCaptureDeviceNV, "device")]),
425 #Function(OpaquePointer(GLXVideoCaptureDeviceNV), "glXEnumerateVideoCaptureDevicesNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "nelements")]),
426 #Function(Void, "glXLockVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]),
427 #Function(Int, "glXQueryVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device"), (Int, "attribute"), (OpaquePointer(Int), "value")]),
428 #Function(Void, "glXReleaseVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]),
430 # GLX_EXT_swap_control
431 Function(Int, "glXSwapIntervalEXT", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "interval")]),
434 Function(Void, "glXCopyImageSubDataNV", [(Display, "dpy"), (GLXContext, "srcCtx"), (GLuint, "srcName"), (GLenum, "srcTarget"), (GLint, "srcLevel"), (GLint, "srcX"), (GLint, "srcY"), (GLint, "srcZ"), (GLXContext, "dstCtx"), (GLuint, "dstName"), (GLenum, "dstTarget"), (GLint, "dstLevel"), (GLint, "dstX"), (GLint, "dstY"), (GLint, "dstZ"), (GLsizei, "width"), (GLsizei, "height"), (GLsizei, "depth")]),
436 # GLX_NV_vertex_array_range
437 Function(OpaquePointer(Void), "glXAllocateMemoryNV", [(GLsizei, "size"), (GLfloat, "readfreq"), (GLfloat, "writefreq"), (GLfloat, "priority")]),
438 Function(Void, "glXFreeMemoryNV", [(OpaquePointer(Void), "pointer")]),
441 Function(PROC, "glXGetProcAddressARB", [(Alias("const GLubyte *", CString), "procName")]),
442 Function(PROC, "glXGetProcAddress", [(Alias("const GLubyte *", CString), "procName")]),