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)
38 Colormap = Alias("Colormap", UInt32)
40 GLXContext = Opaque("GLXContext")
41 GLXPixmap = Alias("GLXPixmap", UInt32)
42 GLXDrawable = Alias("GLXDrawable", UInt32)
43 GLXFBConfig = Opaque("GLXFBConfig")
44 GLXFBConfigSGIX = Opaque("GLXFBConfigSGIX")
45 GLXFBConfigID = Alias("GLXFBConfigID", UInt32)
46 GLXContextID = Alias("GLXContextID", UInt32)
47 GLXWindow = Alias("GLXWindow", UInt32)
48 GLXPbuffer = Alias("GLXPbuffer", UInt32)
49 GLXPbufferSGIX = Alias("GLXPbufferSGIX", UInt32)
50 GLXVideoSourceSGIX = Alias("GLXVideoSourceSGIX", UInt32)
51 GLXVideoDeviceNV = Alias("GLXVideoDeviceNV", UInt32)
52 GLXVideoCaptureDeviceNV = Alias("GLXVideoCaptureDeviceNV", UInt32)
54 XVisualInfo = Struct("XVisualInfo", [
56 (VisualID, "visualid"),
61 (ULong, "green_mask"),
63 (Int, "colormap_size"),
64 (Int, "bits_per_rgb"),
67 Bool = FakeEnum(Int, [
72 GLXEnum = FakeEnum(Int, [
74 "GLX_BUFFER_SIZE", # 2
77 "GLX_DOUBLEBUFFER", # 5
79 "GLX_AUX_BUFFERS", # 7
83 "GLX_ALPHA_SIZE", # 11
84 "GLX_DEPTH_SIZE", # 12
85 "GLX_STENCIL_SIZE", # 13
86 "GLX_ACCUM_RED_SIZE", # 14
87 "GLX_ACCUM_GREEN_SIZE", # 15
88 "GLX_ACCUM_BLUE_SIZE", # 16
89 "GLX_ACCUM_ALPHA_SIZE", # 17
91 "GLX_CONFIG_CAVEAT", # 0x20
92 "GLX_X_VISUAL_TYPE", # 0x22
93 "GLX_TRANSPARENT_TYPE", # 0x23
94 "GLX_TRANSPARENT_INDEX_VALUE", # 0x24
95 "GLX_TRANSPARENT_RED_VALUE", # 0x25
96 "GLX_TRANSPARENT_GREEN_VALUE", # 0x26
97 "GLX_TRANSPARENT_BLUE_VALUE", # 0x27
98 "GLX_TRANSPARENT_ALPHA_VALUE", # 0x28
100 "GLX_CONTEXT_MAJOR_VERSION_ARB", # 0x2091
101 "GLX_CONTEXT_MINOR_VERSION_ARB", # 0x2092
102 "GLX_CONTEXT_FLAGS_ARB", # 0x2094
104 "GLX_BIND_TO_TEXTURE_RGB_EXT", # 0x20D0
105 "GLX_BIND_TO_TEXTURE_RGBA_EXT", # 0x20D1
106 "GLX_BIND_TO_MIPMAP_TEXTURE_EXT", # 0x20D2
107 "GLX_BIND_TO_TEXTURE_TARGETS_EXT", # 0x20D3
108 "GLX_Y_INVERTED_EXT", # 0x20D4
109 "GLX_TEXTURE_FORMAT_EXT", # 0x20D5
110 "GLX_TEXTURE_TARGET_EXT", # 0x20D6
111 "GLX_MIPMAP_TEXTURE_EXT", # 0x20D7
112 "GLX_TEXTURE_FORMAT_NONE_EXT", # 0x20D8
113 "GLX_TEXTURE_FORMAT_RGB_EXT", # 0x20D9
114 "GLX_TEXTURE_FORMAT_RGBA_EXT", # 0x20DA
115 "GLX_TEXTURE_1D_EXT", # 0x20DB
116 "GLX_TEXTURE_2D_EXT", # 0x20DC
117 "GLX_TEXTURE_RECTANGLE_EXT", # 0x20DD
118 "GLX_FRONT_LEFT_EXT", # 0x20DE
119 "GLX_FRONT_RIGHT_EXT", # 0x20DF
120 "GLX_BACK_LEFT_EXT", # 0x20E0
121 "GLX_BACK_RIGHT_EXT", # 0x20E1
122 "GLX_AUX0_EXT", # 0x20E2
123 "GLX_AUX1_EXT", # 0x20E3
124 "GLX_AUX2_EXT", # 0x20E4
125 "GLX_AUX3_EXT", # 0x20E5
126 "GLX_AUX4_EXT", # 0x20E6
127 "GLX_AUX5_EXT", # 0x20E7
128 "GLX_AUX6_EXT", # 0x20E8
129 "GLX_AUX7_EXT", # 0x20E9
130 "GLX_AUX8_EXT", # 0x20EA
131 "GLX_AUX9_EXT", # 0x20EB
134 "GLX_SLOW_CONFIG", # 0x8001
135 "GLX_TRUE_COLOR", # 0x8002
136 "GLX_DIRECT_COLOR", # 0x8003
137 "GLX_PSEUDO_COLOR", # 0x8004
138 "GLX_STATIC_COLOR", # 0x8005
139 "GLX_GRAY_SCALE", # 0x8006
140 "GLX_STATIC_GRAY", # 0x8007
141 "GLX_TRANSPARENT_RGB", # 0x8008
142 "GLX_TRANSPARENT_INDEX", # 0x8009
143 "GLX_VISUAL_ID", # 0x800B
144 "GLX_SCREEN", # 0x800C
145 "GLX_NON_CONFORMANT_CONFIG", # 0x800D
146 "GLX_DRAWABLE_TYPE", # 0x8010
147 "GLX_RENDER_TYPE", # 0x8011
148 "GLX_X_RENDERABLE", # 0x8012
149 "GLX_FBCONFIG_ID", # 0x8013
150 "GLX_RGBA_TYPE", # 0x8014
151 "GLX_COLOR_INDEX_TYPE", # 0x8015
152 "GLX_MAX_PBUFFER_WIDTH", # 0x8016
153 "GLX_MAX_PBUFFER_HEIGHT", # 0x8017
154 "GLX_MAX_PBUFFER_PIXELS", # 0x8018
155 "GLX_PRESERVED_CONTENTS", # 0x801B
156 "GLX_LARGEST_PBUFFER", # 0x801C
157 "GLX_WIDTH", # 0x801D
158 "GLX_HEIGHT", # 0x801E
159 "GLX_EVENT_MASK", # 0x801F
160 "GLX_DAMAGED", # 0x8020
161 "GLX_SAVED", # 0x8021
162 "GLX_WINDOW", # 0x8022
163 "GLX_PBUFFER", # 0x8023
164 "GLX_PBUFFER_HEIGHT", # 0x8040
165 "GLX_PBUFFER_WIDTH", # 0x8041
167 "GLX_CONTEXT_PROFILE_MASK_ARB", # 0x9126
169 "GLX_SAMPLE_BUFFERS", # 100000
170 "GLX_SAMPLES", # 100001
172 "GLX_DONT_CARE", # 0xFFFFFFFF
175 GLXError = FakeEnum(Int, [
185 GLXname = FakeEnum(Int, [
191 GLXbuffer = Flags(Int, [
195 "GLX_AUX_BUFFERS_BIT",
196 "GLX_FRONT_LEFT_BUFFER_BIT",
197 "GLX_FRONT_RIGHT_BUFFER_BIT",
198 "GLX_BACK_LEFT_BUFFER_BIT",
199 "GLX_BACK_RIGHT_BUFFER_BIT",
200 "GLX_DEPTH_BUFFER_BIT",
201 "GLX_STENCIL_BUFFER_BIT",
202 "GLX_ACCUM_BUFFER_BIT",
205 GLXbuffer = Flags(Int, [
207 "GLX_COLOR_INDEX_BIT",
208 "GLX_PBUFFER_CLOBBER_MASK",
211 glxapi = Module("GLX")
213 PROC = Opaque("__GLXextFuncPtr")
215 glxapi.addFunctions([
217 Function(Pointer(XVisualInfo), "glXChooseVisual", [(Display, "dpy"), (Int, "screen"), (Array(GLXEnum, "_AttribList_size(attribList)"), "attribList")]),
218 Function(GLXContext, "glXCreateContext", [(Display, "dpy"), (Pointer(XVisualInfo), "vis"), (GLXContext, "shareList"), (Bool, "direct")]),
219 Function(Void, "glXDestroyContext", [(Display, "dpy"), (GLXContext, "ctx")]),
220 Function(Bool, "glXMakeCurrent", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXContext, "ctx")]),
221 Function(Void, "glXCopyContext", [(Display, "dpy"), (GLXContext, "src"), (GLXContext, "dst"),
223 Function(Void, "glXSwapBuffers", [(Display, "dpy"), (GLXDrawable, "drawable")]),
224 Function(GLXPixmap, "glXCreateGLXPixmap", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"),
225 (Pixmap, "pixmap")]),
226 Function(Void, "glXDestroyGLXPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]),
227 Function(Bool, "glXQueryExtension", [(Display, "dpy"), Out(Pointer(Int), "errorb"), Out(Pointer(Int), "event")]),
228 Function(Bool, "glXQueryVersion", [(Display, "dpy"), Out(Pointer(Int), "maj"), Out(Pointer(Int), "min")]),
229 Function(Bool, "glXIsDirect", [(Display, "dpy"), (GLXContext, "ctx")]),
230 Function(GLXError, "glXGetConfig", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"),
231 (GLXEnum, "attrib"), Out(Pointer(Int), "value")]),
232 Function(GLXContext, "glXGetCurrentContext", [], sideeffects=False),
233 Function(GLXDrawable, "glXGetCurrentDrawable", [], sideeffects=False),
234 Function(Void, "glXWaitGL", []),
235 Function(Void, "glXWaitX", []),
236 Function(Void, "glXUseXFont", [(Font, "font"), (Int, "first"), (Int, "count"), (Int, "list")]),
239 Function((ConstCString), "glXQueryExtensionsString", [(Display, "dpy"), (Int, "screen")], sideeffects=False),
240 Function((ConstCString), "glXQueryServerString", [(Display, "dpy"), (Int, "screen"), (GLXname, "name")], sideeffects=False),
241 Function((ConstCString), "glXGetClientString", [(Display, "dpy"), (GLXname, "name")], sideeffects=False),
244 Function(Display, "glXGetCurrentDisplay", [], sideeffects=False),
247 Function(Array(GLXFBConfig, "*nitems"), "glXChooseFBConfig", [(Display, "dpy"), (Int, "screen"), (Array(Const(GLXEnum), "_AttribPairList_size(attribList)"), "attribList"), Out(Pointer(Int), "nitems")]),
248 Function(Int, "glXGetFBConfigAttrib", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXEnum, "attribute"), Out(Pointer(Int), "value")]),
249 Function(Array(GLXFBConfig, "*nelements"), "glXGetFBConfigs", [(Display, "dpy"), (Int, "screen"),
250 Out(Pointer(Int), "nelements")]),
251 Function(Pointer(XVisualInfo), "glXGetVisualFromFBConfig", [(Display, "dpy"),
252 (GLXFBConfig, "config")]),
253 Function(GLXWindow, "glXCreateWindow", [(Display, "dpy"), (GLXFBConfig, "config"),
254 (Window, "win"), (Array(Const(GLXEnum), "_AttribPairList_size(attribList)"), "attribList")]),
255 Function(Void, "glXDestroyWindow", [(Display, "dpy"), (GLXWindow, "window")]),
256 Function(GLXPixmap, "glXCreatePixmap", [(Display, "dpy"), (GLXFBConfig, "config"),
257 (Pixmap, "pixmap"), (Array(Const(GLXEnum), "_AttribPairList_size(attribList)"), "attribList")]),
258 Function(Void, "glXDestroyPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]),
259 Function(GLXPbuffer, "glXCreatePbuffer", [(Display, "dpy"), (GLXFBConfig, "config"),
260 (Array(Const(GLXEnum), "_AttribPairList_size(attribList)"), "attribList")]),
261 Function(Void, "glXDestroyPbuffer", [(Display, "dpy"), (GLXPbuffer, "pbuf")]),
262 Function(Void, "glXQueryDrawable", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXEnum, "attribute"),
263 Out(Pointer(UInt), "value")]),
264 Function(GLXContext, "glXCreateNewContext", [(Display, "dpy"), (GLXFBConfig, "config"),
265 (GLXEnum, "renderType"), (GLXContext, "shareList"),
267 Function(Bool, "glXMakeContextCurrent", [(Display, "dpy"), (GLXDrawable, "draw"),
268 (GLXDrawable, "read"), (GLXContext, "ctx")]),
269 Function(GLXDrawable, "glXGetCurrentReadDrawable", []),
270 Function(Int, "glXQueryContext", [(Display, "dpy"), (GLXContext, "ctx"), (GLXEnum, "attribute"),
271 Out(Pointer(Int), "value")]),
272 Function(Void, "glXSelectEvent", [(Display, "dpy"), (GLXDrawable, "drawable"),
274 Function(Void, "glXGetSelectedEvent", [(Display, "dpy"), (GLXDrawable, "drawable"),
275 Out(Pointer(ULong), "mask")]),
277 # GLX_ARB_create_context
278 Function(GLXContext, "glXCreateContextAttribsARB", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXContext, "share_context"), (Bool, "direct"), (Array(Const(GLXEnum), "_AttribPairList_size(attrib_list)"), "attrib_list")]),
280 # GLX_SGI_swap_control
281 Function(Int, "glXSwapIntervalSGI", [(Int, "interval")]),
284 Function(Int, "glXGetVideoSyncSGI", [(OpaquePointer(UInt), "count")]),
285 Function(Int, "glXWaitVideoSyncSGI", [(Int, "divisor"), (Int, "remainder"), (OpaquePointer(UInt), "count")]),
287 # GLX_SGI_make_current_read
288 Function(Bool, "glXMakeCurrentReadSGI", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXDrawable, "read"), (GLXContext, "ctx")]),
289 Function(GLXDrawable, "glXGetCurrentReadDrawableSGI", []),
291 # GLX_SGIX_video_source
292 #Function(GLXVideoSourceSGIX, "glXCreateGLXVideoSourceSGIX", [(Display, "display"), (Int, "screen"), (VLServer, "server"), (VLPath, "path"), (Int, "nodeClass"), (VLNode, "drainNode")]),
293 #Function(Void, "glXDestroyGLXVideoSourceSGIX", [(Display, "dpy"), (GLXVideoSourceSGIX, "glxvideosource")]),
295 # GLX_EXT_import_context
296 Function(Display, "glXGetCurrentDisplayEXT", []),
297 Function(Int, "glXQueryContextInfoEXT", [(Display, "dpy"), (GLXContext, "context"), (Int, "attribute"), (OpaquePointer(Int), "value")]),
298 Function(GLXContextID, "glXGetContextIDEXT", [(Const(GLXContext), "context")]),
299 Function(GLXContext, "glXImportContextEXT", [(Display, "dpy"), (GLXContextID, "contextID")]),
300 Function(Void, "glXFreeContextEXT", [(Display, "dpy"), (GLXContext, "context")]),
303 Function(Int, "glXGetFBConfigAttribSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "attribute"), Out(Pointer(Int), "value")]),
304 Function(OpaquePointer(GLXFBConfigSGIX), "glXChooseFBConfigSGIX", [(Display, "dpy"), (Int, "screen"), (Array(GLXEnum, "_AttribPairList_size(attrib_list)"), "attrib_list"), Out(Pointer(Int), "nelements")]),
305 Function(GLXPixmap, "glXCreateGLXPixmapWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Pixmap, "pixmap")]),
306 Function(GLXContext, "glXCreateContextWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "render_type"), (GLXContext, "share_list"), (Bool, "direct")]),
307 Function(Pointer(XVisualInfo), "glXGetVisualFromFBConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config")]),
308 Function(GLXFBConfigSGIX, "glXGetFBConfigFromVisualSGIX", [(Display, "dpy"), Out(Pointer(XVisualInfo), "vis")]),
311 Function(GLXPbufferSGIX, "glXCreateGLXPbufferSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (UInt, "width"), (UInt, "height"), (Array(Int, "_AttribPairList_size(attrib_list)"), "attrib_list")]),
312 Function(Void, "glXDestroyGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf")]),
313 Function(Int, "glXQueryGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf"), (Int, "attribute"), Out(Pointer(UInt), "value")]),
314 Function(Void, "glXSelectEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (ULong, "mask")]),
315 Function(Void, "glXGetSelectedEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), Out(Pointer(ULong), "mask")]),
318 Function(Void, "glXCushionSGI", [(Display, "dpy"), (Window, "window"), (Float, "cushion")]),
320 # GLX_SGIX_video_resize
321 Function(Int, "glXBindChannelToWindowSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (Window, "window")]),
322 Function(Int, "glXChannelRectSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (Int, "x"), (Int, "y"), (Int, "w"), (Int, "h")]),
323 Function(Int, "glXQueryChannelRectSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (OpaquePointer(Int), "dx"), (OpaquePointer(Int), "dy"), (OpaquePointer(Int), "dw"), (OpaquePointer(Int), "dh")]),
324 Function(Int, "glXQueryChannelDeltasSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (OpaquePointer(Int), "x"), (OpaquePointer(Int), "y"), (OpaquePointer(Int), "w"), (OpaquePointer(Int), "h")]),
325 Function(Int, "glXChannelRectSyncSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (GLenum, "synctype")]),
328 #Function(Bool, "glXAssociateDMPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuffer"), (OpaquePointer(DMparams), "params"), (DMbuffer, "dmbuffer")]),
330 # GLX_SGIX_swap_group
331 Function(Void, "glXJoinSwapGroupSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXDrawable, "member")]),
333 # GLX_SGIX_swap_barrier
334 Function(Void, "glXBindSwapBarrierSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "barrier")]),
335 Function(Bool, "glXQueryMaxSwapBarriersSGIX", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "max")]),
337 # GLX_SUN_get_transparent_index
338 #Function(Status, "glXGetTransparentIndexSUN", [(Display, "dpy"), (Window, "overlay"), (Window, "underlay"), (OpaquePointer(Long), "pTransparentIndex")]),
340 # GLX_MESA_copy_sub_buffer
341 Function(Void, "glXCopySubBufferMESA", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height")]),
343 # GLX_MESA_pixmap_colormap
344 Function(GLXPixmap, "glXCreateGLXPixmapMESA", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"), (Pixmap, "pixmap"), (Colormap, "cmap")]),
346 # GLX_MESA_release_buffers
347 Function(Bool, "glXReleaseBuffersMESA", [(Display, "dpy"), (GLXDrawable, "drawable")]),
349 # GLX_MESA_set_3dfx_mode
350 Function(Bool, "glXSet3DfxModeMESA", [(Int, "mode")]),
352 # GLX_MESA_swap_control
353 Function(Int, "glXSwapIntervalMESA", [(UInt, "interval")]),
354 Function(Int, "glXGetSwapIntervalMESA", [], sideeffects=False),
356 # GLX_OML_sync_control
357 Function(Bool, "glXGetSyncValuesOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
358 Function(Bool, "glXGetMscRateOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int32), "numerator"), (OpaquePointer(Int32), "denominator")]),
359 Function(Int64, "glXSwapBuffersMscOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_msc"), (Int64, "divisor"), (Int64, "remainder")]),
360 Function(Bool, "glXWaitForMscOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_msc"), (Int64, "divisor"), (Int64, "remainder"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
361 Function(Bool, "glXWaitForSbcOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_sbc"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
364 #Function(OpaquePointer(GLXHyperpipeNetworkSGIX), "glXQueryHyperpipeNetworkSGIX", [(Display, "dpy"), (OpaquePointer(Int), "npipes")]),
365 #Function(Int, "glXHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "networkId"), (Int, "npipes"), (OpaquePointer(GLXHyperpipeConfigSGIX), "cfg"), (OpaquePointer(Int), "hpId")]),
366 #Function(OpaquePointer(GLXHyperpipeConfigSGIX), "glXQueryHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "hpId"), (OpaquePointer(Int), "npipes")]),
367 #Function(Int, "glXDestroyHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "hpId")]),
368 #Function(Int, "glXBindHyperpipeSGIX", [(Display, "dpy"), (Int, "hpId")]),
369 #Function(Int, "glXQueryHyperpipeBestAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "attribList"), (OpaquePointer(Void), "returnAttribList")]),
370 #Function(Int, "glXHyperpipeAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "attribList")]),
371 #Function(Int, "glXQueryHyperpipeAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "returnAttribList")]),
373 # GLX_MESA_agp_offset
374 Function(UInt, "glXGetAGPOffsetMESA", [(OpaquePointer(Const(Void)), "pointer")]),
376 # EXT_texture_from_pixmap
377 Function(Void, "glXBindTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (GLXEnum, "buffer"), (Array(Const(GLXEnum), "_AttribPairList_size(attrib_list)"), "attrib_list")]),
378 Function(Void, "glXReleaseTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (GLXEnum, "buffer")]),
380 # GLX_NV_present_video
381 Function(Array(UInt, "(nelements ? *nelements : 0)"), "glXEnumerateVideoDevicesNV", [(Display, "dpy"), (Int, "screen"), Out(Pointer(Int), "nelements")]),
382 Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (Array(Const(Int), "_AttribPairList_size(attrib_list)"), "attrib_list")]),
384 # GLX_NV_video_output
385 Function(Int, "glXGetVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (Int, "numVideoDevices"), Out(Array(GLXVideoDeviceNV, "numVideoDevices"), "pVideoDevice")]),
386 Function(Int, "glXReleaseVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice")]),
387 Function(Int, "glXBindVideoImageNV", [(Display, "dpy"), (GLXVideoDeviceNV, "VideoDevice"), (GLXPbuffer, "pbuf"), (Int, "iVideoBuffer")]),
388 Function(Int, "glXReleaseVideoImageNV", [(Display, "dpy"), (GLXPbuffer, "pbuf")]),
389 Function(Int, "glXSendPbufferToVideoNV", [(Display, "dpy"), (GLXPbuffer, "pbuf"), (Int, "iBufferType"), Out(Pointer(ULong), "pulCounterPbuffer"), (GLboolean, "bBlock")]),
390 Function(Int, "glXGetVideoInfoNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice"), Out(Pointer(ULong), "pulCounterOutputPbuffer"), Out(Pointer(ULong), "pulCounterOutputVideo")], sideeffects=False),
393 Function(Bool, "glXJoinSwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLuint, "group")]),
394 Function(Bool, "glXBindSwapBarrierNV", [(Display, "dpy"), (GLuint, "group"), (GLuint, "barrier")]),
395 Function(Bool, "glXQuerySwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(GLuint), "group"), (OpaquePointer(GLuint), "barrier")]),
396 Function(Bool, "glXQueryMaxSwapGroupsNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(GLuint), "maxGroups"), (OpaquePointer(GLuint), "maxBarriers")]),
397 Function(Bool, "glXQueryFrameCountNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(GLuint), "count")]),
398 Function(Bool, "glXResetFrameCountNV", [(Display, "dpy"), (Int, "screen")]),
400 # GLX_NV_video_capture
401 Function(Int, "glXBindVideoCaptureDeviceNV", [(Display, "dpy"), (UInt, "video_capture_slot"), (GLXVideoCaptureDeviceNV, "device")]),
402 Function(Array(GLXVideoCaptureDeviceNV, "(nelements ? *nelements : 0)"), "glXEnumerateVideoCaptureDevicesNV", [(Display, "dpy"), (Int, "screen"), Out(Pointer(Int), "nelements")]),
403 Function(Void, "glXLockVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]),
404 Function(Int, "glXQueryVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device"), (Int, "attribute"), Out(Pointer(Int), "value")], sideeffects=False),
405 Function(Void, "glXReleaseVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]),
407 # GLX_EXT_swap_control
408 Function(Void, "glXSwapIntervalEXT", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "interval")]),
411 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")]),
413 # GLX_NV_vertex_array_range
414 Function(OpaquePointer(Void), "glXAllocateMemoryNV", [(GLsizei, "size"), (GLfloat, "readfreq"), (GLfloat, "writefreq"), (GLfloat, "priority")]),
415 Function(Void, "glXFreeMemoryNV", [(OpaquePointer(Void), "pointer")]),
418 Function(PROC, "glXGetProcAddressARB", [(String(Const(GLubyte)), "procName")]),
419 Function(PROC, "glXGetProcAddress", [(String(Const(GLubyte)), "procName")]),
423 # To prevent collision with stdapi.Bool