blob: 0ee03a1249835277bd21a62f7efcadac16df24fd [file] [log] [blame]
José Fonseca99771fc2010-11-25 20:32:59 +00001##########################################################################
2#
3# Copyright 2008-2009 VMware, Inc.
4# All Rights Reserved.
5#
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:
12#
13# The above copyright notice and this permission notice shall be included in
14# all copies or substantial portions of the Software.
15#
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
22# THE SOFTWARE.
23#
24##########################################################################/
25
José Fonseca4a826ed2010-11-30 16:58:22 +000026"""GLX API description."""
27
José Fonseca99771fc2010-11-25 20:32:59 +000028
29from stdapi import *
José Fonseca8d1f7272011-06-09 00:27:27 +010030from glapi import *
José Fonseca99771fc2010-11-25 20:32:59 +000031
José Fonsecae90885a2010-11-26 15:01:18 +000032VisualID = Alias("VisualID", UInt32)
José Fonsecae90885a2010-11-26 15:01:18 +000033Display = Opaque("Display *")
34Visual = Opaque("Visual *")
Zack Rusinf3f2e462011-03-23 18:35:39 -040035Font = Alias("Font", UInt32)
36Pixmap = Alias("Pixmap", UInt32)
37Window = Alias("Window", UInt32)
38
39GLXContext = Opaque("GLXContext")
40GLXPixmap = Alias("GLXPixmap", UInt32)
41GLXDrawable = Alias("GLXDrawable", UInt32)
42GLXFBConfig = Opaque("GLXFBConfig")
José Fonseca8d1f7272011-06-09 00:27:27 +010043GLXFBConfigSGIX = Opaque("GLXFBConfigSGIX")
Zack Rusinf3f2e462011-03-23 18:35:39 -040044GLXFBConfigID = Alias("GLXFBConfigID", UInt32)
45GLXContextID = Alias("GLXContextID", UInt32)
46GLXWindow = Alias("GLXWindow", UInt32)
47GLXPbuffer = Alias("GLXPbuffer", UInt32)
José Fonseca8d1f7272011-06-09 00:27:27 +010048GLXPbufferSGIX = Alias("GLXPbufferSGIX", UInt32)
49GLXVideoSourceSGIX = Alias("GLXVideoSourceSGIX", UInt32)
José Fonsecae90885a2010-11-26 15:01:18 +000050
51XVisualInfo = Struct("XVisualInfo", [
52 (Visual, "visual"),
53 (VisualID, "visualid"),
54 (Int, "screen"),
55 (Int, "depth"),
56 (Int, "c_class"),
57 (ULong, "red_mask"),
58 (ULong, "green_mask"),
59 (ULong, "blue_mask"),
60 (Int, "colormap_size"),
61 (Int, "bits_per_rgb"),
62])
63
José Fonseca8d1f7272011-06-09 00:27:27 +010064Bool = FakeEnum(Int, [
José Fonseca0d4ef5b2011-03-27 12:45:40 +010065 "False",
66 "True",
67])
68
69GLXAttrib = FakeEnum(Int, [
José Fonsecaecbfc9f2011-10-09 14:50:24 +010070 #"GLX_USE_GL", # 1
71 "GLX_BUFFER_SIZE", # 2
72 "GLX_LEVEL", # 3
73 "GLX_RGBA", # 4
74 "GLX_DOUBLEBUFFER", # 5
75 "GLX_STEREO", # 6
76 "GLX_AUX_BUFFERS", # 7
77 "GLX_RED_SIZE", # 8
78 "GLX_GREEN_SIZE", # 9
79 "GLX_BLUE_SIZE", # 10
80 "GLX_ALPHA_SIZE", # 11
81 "GLX_DEPTH_SIZE", # 12
82 "GLX_STENCIL_SIZE", # 13
83 "GLX_ACCUM_RED_SIZE", # 14
84 "GLX_ACCUM_GREEN_SIZE", # 15
85 "GLX_ACCUM_BLUE_SIZE", # 16
86 "GLX_ACCUM_ALPHA_SIZE", # 17
José Fonsecaafffa742011-05-09 23:43:39 +010087
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
96
José Fonsecaecbfc9f2011-10-09 14:50:24 +010097 "GLX_CONTEXT_MAJOR_VERSION_ARB", # 0x2091
98 "GLX_CONTEXT_MINOR_VERSION_ARB", # 0x2092
99 "GLX_CONTEXT_FLAGS_ARB", # 0x2094
100
José Fonseca5a76ccf2011-06-03 19:34:55 +0100101 "GLX_BIND_TO_TEXTURE_RGB_EXT", # 0x20D0
102 "GLX_BIND_TO_TEXTURE_RGBA_EXT", # 0x20D1
103 "GLX_BIND_TO_MIPMAP_TEXTURE_EXT", # 0x20D2
104 "GLX_BIND_TO_TEXTURE_TARGETS_EXT", # 0x20D3
105 "GLX_Y_INVERTED_EXT", # 0x20D4
106 "GLX_TEXTURE_FORMAT_EXT", # 0x20D5
107 "GLX_TEXTURE_TARGET_EXT", # 0x20D6
108 "GLX_MIPMAP_TEXTURE_EXT", # 0x20D7
109 "GLX_TEXTURE_FORMAT_NONE_EXT", # 0x20D8
110 "GLX_TEXTURE_FORMAT_RGB_EXT", # 0x20D9
111 "GLX_TEXTURE_FORMAT_RGBA_EXT", # 0x20DA
112 "GLX_TEXTURE_1D_EXT", # 0x20DB
113 "GLX_TEXTURE_2D_EXT", # 0x20DC
114 "GLX_TEXTURE_RECTANGLE_EXT", # 0x20DD
115 "GLX_FRONT_LEFT_EXT", # 0x20DE
116 "GLX_FRONT_RIGHT_EXT", # 0x20DF
117 "GLX_BACK_LEFT_EXT", # 0x20E0
118 "GLX_BACK_RIGHT_EXT", # 0x20E1
119 "GLX_AUX0_EXT", # 0x20E2
120 "GLX_AUX1_EXT", # 0x20E3
121 "GLX_AUX2_EXT", # 0x20E4
122 "GLX_AUX3_EXT", # 0x20E5
123 "GLX_AUX4_EXT", # 0x20E6
124 "GLX_AUX5_EXT", # 0x20E7
125 "GLX_AUX6_EXT", # 0x20E8
126 "GLX_AUX7_EXT", # 0x20E9
127 "GLX_AUX8_EXT", # 0x20EA
128 "GLX_AUX9_EXT", # 0x20EB
129
José Fonsecaafffa742011-05-09 23:43:39 +0100130 "GLX_NONE", # 0x8000
131 "GLX_SLOW_CONFIG", # 0x8001
132 "GLX_TRUE_COLOR", # 0x8002
133 "GLX_DIRECT_COLOR", # 0x8003
134 "GLX_PSEUDO_COLOR", # 0x8004
135 "GLX_STATIC_COLOR", # 0x8005
136 "GLX_GRAY_SCALE", # 0x8006
137 "GLX_STATIC_GRAY", # 0x8007
138 "GLX_TRANSPARENT_RGB", # 0x8008
139 "GLX_TRANSPARENT_INDEX", # 0x8009
140 "GLX_VISUAL_ID", # 0x800B
141 "GLX_SCREEN", # 0x800C
142 "GLX_NON_CONFORMANT_CONFIG", # 0x800D
143 "GLX_DRAWABLE_TYPE", # 0x8010
144 "GLX_RENDER_TYPE", # 0x8011
145 "GLX_X_RENDERABLE", # 0x8012
146 "GLX_FBCONFIG_ID", # 0x8013
147 "GLX_RGBA_TYPE", # 0x8014
148 "GLX_COLOR_INDEX_TYPE", # 0x8015
149 "GLX_MAX_PBUFFER_WIDTH", # 0x8016
150 "GLX_MAX_PBUFFER_HEIGHT", # 0x8017
151 "GLX_MAX_PBUFFER_PIXELS", # 0x8018
152 "GLX_PRESERVED_CONTENTS", # 0x801B
153 "GLX_LARGEST_PBUFFER", # 0x801C
154 "GLX_WIDTH", # 0x801D
155 "GLX_HEIGHT", # 0x801E
156 "GLX_EVENT_MASK", # 0x801F
157 "GLX_DAMAGED", # 0x8020
158 "GLX_SAVED", # 0x8021
159 "GLX_WINDOW", # 0x8022
160 "GLX_PBUFFER", # 0x8023
161 "GLX_PBUFFER_HEIGHT", # 0x8040
162 "GLX_PBUFFER_WIDTH", # 0x8041
163
José Fonsecaecbfc9f2011-10-09 14:50:24 +0100164 "GLX_CONTEXT_PROFILE_MASK_ARB", # 0x9126
165
José Fonsecaafffa742011-05-09 23:43:39 +0100166 "GLX_SAMPLE_BUFFERS", # 100000
167 "GLX_SAMPLES", # 100001
168
169 "GLX_DONT_CARE", # 0xFFFFFFFF
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100170])
171
172GLXError = FakeEnum(Int, [
173 "GLX_BAD_SCREEN",
174 "GLX_BAD_ATTRIBUTE",
175 "GLX_NO_EXTENSION",
176 "GLX_BAD_VISUAL",
177 "GLX_BAD_CONTEXT",
178 "GLX_BAD_VALUE",
179 "GLX_BAD_ENUM",
180])
181
José Fonseca64674062011-05-10 20:33:43 +0100182GLXname = FakeEnum(Int, [
183 "GLX_VENDOR",
184 "GLX_VERSION",
185 "GLX_EXTENSIONS",
186])
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100187
188GLXbuffer = Flags(Int, [
189 "GLX_WINDOW_BIT",
190 "GLX_PIXMAP_BIT",
191 "GLX_PBUFFER_BIT",
192 "GLX_AUX_BUFFERS_BIT",
193 "GLX_FRONT_LEFT_BUFFER_BIT",
194 "GLX_FRONT_RIGHT_BUFFER_BIT",
195 "GLX_BACK_LEFT_BUFFER_BIT",
196 "GLX_BACK_RIGHT_BUFFER_BIT",
197 "GLX_DEPTH_BUFFER_BIT",
198 "GLX_STENCIL_BUFFER_BIT",
199 "GLX_ACCUM_BUFFER_BIT",
200])
201
202GLXEnum = FakeEnum(Int, [
203 "GLX_NONE",
204 "GLX_SLOW_CONFIG",
205 "GLX_TRUE_COLOR",
206 "GLX_DIRECT_COLOR",
207 "GLX_PSEUDO_COLOR",
208 "GLX_STATIC_COLOR",
209 "GLX_GRAY_SCALE",
210 "GLX_STATIC_GRAY",
211 "GLX_TRANSPARENT_RGB",
212 "GLX_TRANSPARENT_INDEX",
213 "GLX_VISUAL_ID",
214 "GLX_SCREEN",
215 "GLX_NON_CONFORMANT_CONFIG",
216 "GLX_DRAWABLE_TYPE",
217 "GLX_RENDER_TYPE",
218 "GLX_X_RENDERABLE",
219 "GLX_FBCONFIG_ID",
220 "GLX_RGBA_TYPE",
221 "GLX_COLOR_INDEX_TYPE",
222 "GLX_MAX_PBUFFER_WIDTH",
223 "GLX_MAX_PBUFFER_HEIGHT",
224 "GLX_MAX_PBUFFER_PIXELS",
225 "GLX_PRESERVED_CONTENTS",
226 "GLX_LARGEST_PBUFFER",
227 "GLX_WIDTH",
228 "GLX_HEIGHT",
229 "GLX_EVENT_MASK",
230 "GLX_DAMAGED",
231 "GLX_SAVED",
232 "GLX_WINDOW",
233 "GLX_PBUFFER",
234 "GLX_PBUFFER_HEIGHT",
235 "GLX_PBUFFER_WIDTH",
236])
237
238GLXbuffer = Flags(Int, [
239 "GLX_RGBA_BIT",
240 "GLX_COLOR_INDEX_BIT",
241 "GLX_PBUFFER_CLOBBER_MASK",
242])
José Fonseca99771fc2010-11-25 20:32:59 +0000243
244glxapi = API("GLX")
245
246PROC = Opaque("__GLXextFuncPtr")
247
José Fonseca99771fc2010-11-25 20:32:59 +0000248glxapi.add_functions([
Zack Rusinf3f2e462011-03-23 18:35:39 -0400249 # GLX
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100250 Function(Pointer(XVisualInfo), "glXChooseVisual", [(Display, "dpy"), (Int, "screen"), (Array(GLXAttrib, "__AttribList_size(attribList)"), "attribList")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100251 Function(GLXContext, "glXCreateContext", [(Display, "dpy"), (Pointer(XVisualInfo), "vis"), (GLXContext, "shareList"), (Bool, "direct")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400252 Function(Void, "glXDestroyContext", [(Display, "dpy"), (GLXContext, "ctx")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100253 Function(Bool, "glXMakeCurrent", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXContext, "ctx")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400254 Function(Void, "glXCopyContext", [(Display, "dpy"), (GLXContext, "src"), (GLXContext, "dst"),
255 (ULong, "mask")]),
256 Function(Void, "glXSwapBuffers", [(Display, "dpy"), (GLXDrawable, "drawable")]),
257 Function(GLXPixmap, "glXCreateGLXPixmap", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"),
258 (Pixmap, "pixmap")]),
259 Function(Void, "glXDestroyGLXPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100260 Function(Bool, "glXQueryExtension", [(Display, "dpy"), Out(Pointer(Int), "errorb"), Out(Pointer(Int), "event")]),
261 Function(Bool, "glXQueryVersion", [(Display, "dpy"), Out(Pointer(Int), "maj"), Out(Pointer(Int), "min")]),
262 Function(Bool, "glXIsDirect", [(Display, "dpy"), (GLXContext, "ctx")]),
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100263 Function(GLXError, "glXGetConfig", [(Display, "dpy"), (Pointer(XVisualInfo), "visual"),
264 (GLXAttrib, "attrib"), Out(Pointer(Int), "value")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400265 Function(GLXContext, "glXGetCurrentContext", [], sideeffects=False),
266 Function(GLXDrawable, "glXGetCurrentDrawable", [], sideeffects=False),
267 Function(Void, "glXWaitGL", []),
268 Function(Void, "glXWaitX", []),
269 Function(Void, "glXUseXFont", [(Font, "font"), (Int, "first"), (Int, "count"), (Int, "list")]),
270
271 # GLX 1.1 and later
272 Function((Const(String("char *"))), "glXQueryExtensionsString", [(Display, "dpy"), (Int, "screen")]),
José Fonseca64674062011-05-10 20:33:43 +0100273 Function((Const(String("char *"))), "glXQueryServerString", [(Display, "dpy"), (Int, "screen"), (GLXname, "name")]),
274 Function((Const(String("char *"))), "glXGetClientString", [(Display, "dpy"), (GLXname, "name")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400275
276 # GLX 1.2 and later
277 Function(Display, "glXGetCurrentDisplay", [], sideeffects=False),
278
279 # GLX 1.3 and later
José Fonseca903c2ca2011-09-23 09:43:05 +0100280 Function(Array(GLXFBConfig, "*nitems"), "glXChooseFBConfig", [(Display, "dpy"), (Int, "screen"), (Array(Const(GLXAttrib), "__AttribList_size(attribList)"), "attribList"), Out(Pointer(Int), "nitems")]),
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100281 Function(Int, "glXGetFBConfigAttrib", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXAttrib, "attribute"), Out(Pointer(Int), "value")]),
282 Function(Array(GLXFBConfig, "*nelements"), "glXGetFBConfigs", [(Display, "dpy"), (Int, "screen"),
283 Out(Pointer(Int), "nelements")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400284 Function(Pointer(XVisualInfo), "glXGetVisualFromFBConfig", [(Display, "dpy"),
285 (GLXFBConfig, "config")]),
286 Function(GLXWindow, "glXCreateWindow", [(Display, "dpy"), (GLXFBConfig, "config"),
José Fonseca903c2ca2011-09-23 09:43:05 +0100287 (Window, "win"), (Array(Const(Int), "__AttribList_size(attribList)"), "attribList")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400288 Function(Void, "glXDestroyWindow", [(Display, "dpy"), (GLXWindow, "window")]),
289 Function(GLXPixmap, "glXCreatePixmap", [(Display, "dpy"), (GLXFBConfig, "config"),
José Fonseca903c2ca2011-09-23 09:43:05 +0100290 (Pixmap, "pixmap"), (Array(Const(Int), "__AttribList_size(attribList)"), "attribList")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400291 Function(Void, "glXDestroyPixmap", [(Display, "dpy"), (GLXPixmap, "pixmap")]),
292 Function(GLXPbuffer, "glXCreatePbuffer", [(Display, "dpy"), (GLXFBConfig, "config"),
José Fonseca903c2ca2011-09-23 09:43:05 +0100293 (Array(Const(GLXEnum), "__AttribList_size(attribList)"), "attribList")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400294 Function(Void, "glXDestroyPbuffer", [(Display, "dpy"), (GLXPbuffer, "pbuf")]),
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100295 Function(Void, "glXQueryDrawable", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXEnum, "attribute"),
296 Out(Pointer(UInt), "value")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400297 Function(GLXContext, "glXCreateNewContext", [(Display, "dpy"), (GLXFBConfig, "config"),
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100298 (GLXEnum, "renderType"), (GLXContext, "shareList"),
José Fonseca8d1f7272011-06-09 00:27:27 +0100299 (Bool, "direct")]),
300 Function(Bool, "glXMakeContextCurrent", [(Display, "dpy"), (GLXDrawable, "draw"),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400301 (GLXDrawable, "read"), (GLXContext, "ctx")]),
302 Function(GLXDrawable, "glXGetCurrentReadDrawable", []),
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100303 Function(Int, "glXQueryContext", [(Display, "dpy"), (GLXContext, "ctx"), (GLXEnum, "attribute"),
304 Out(Pointer(Int), "value")]),
Zack Rusinf3f2e462011-03-23 18:35:39 -0400305 Function(Void, "glXSelectEvent", [(Display, "dpy"), (GLXDrawable, "drawable"),
306 (ULong, "mask")]),
307 Function(Void, "glXGetSelectedEvent", [(Display, "dpy"), (GLXDrawable, "drawable"),
José Fonseca0d4ef5b2011-03-27 12:45:40 +0100308 Out(Pointer(ULong), "mask")]),
José Fonseca5a76ccf2011-06-03 19:34:55 +0100309
José Fonseca8d1f7272011-06-09 00:27:27 +0100310 # GLX_ARB_create_context
José Fonsecaecbfc9f2011-10-09 14:50:24 +0100311 Function(GLXContext, "glXCreateContextAttribsARB", [(Display, "dpy"), (GLXFBConfig, "config"), (GLXContext, "share_context"), (Bool, "direct"), (Array(Const(GLXAttrib), "__AttribList_size(attrib_list)"), "attrib_list")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100312
313 # GLX_SGI_swap_control
314 Function(Int, "glXSwapIntervalSGI", [(Int, "interval")]),
315
316 # GLX_SGI_video_sync
317 Function(Int, "glXGetVideoSyncSGI", [(OpaquePointer(UInt), "count")]),
318 Function(Int, "glXWaitVideoSyncSGI", [(Int, "divisor"), (Int, "remainder"), (OpaquePointer(UInt), "count")]),
319
320 # GLX_SGI_make_current_read
321 Function(Bool, "glXMakeCurrentReadSGI", [(Display, "dpy"), (GLXDrawable, "draw"), (GLXDrawable, "read"), (GLXContext, "ctx")]),
322 Function(GLXDrawable, "glXGetCurrentReadDrawableSGI", []),
323
324 # GLX_SGIX_video_source
325 #Function(GLXVideoSourceSGIX, "glXCreateGLXVideoSourceSGIX", [(Display, "display"), (Int, "screen"), (VLServer, "server"), (VLPath, "path"), (Int, "nodeClass"), (VLNode, "drainNode")]),
326 #Function(Void, "glXDestroyGLXVideoSourceSGIX", [(Display, "dpy"), (GLXVideoSourceSGIX, "glxvideosource")]),
327
328 # GLX_EXT_import_context
329 Function(Display, "glXGetCurrentDisplayEXT", []),
330 Function(Int, "glXQueryContextInfoEXT", [(Display, "dpy"), (GLXContext, "context"), (Int, "attribute"), (OpaquePointer(Int), "value")]),
331 Function(GLXContextID, "glXGetContextIDEXT", [(Const(GLXContext), "context")]),
332 Function(GLXContext, "glXImportContextEXT", [(Display, "dpy"), (GLXContextID, "contextID")]),
333 Function(Void, "glXFreeContextEXT", [(Display, "dpy"), (GLXContext, "context")]),
334
335 # GLX_SGIX_fbconfig
José Fonsecaecbfc9f2011-10-09 14:50:24 +0100336 Function(Int, "glXGetFBConfigAttribSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "attribute"), Out(Pointer(Int), "value")]),
337 Function(OpaquePointer(GLXFBConfigSGIX), "glXChooseFBConfigSGIX", [(Display, "dpy"), (Int, "screen"), (Array(Int, "__AttribList_size(attrib_list)"), "attrib_list"), (OpaquePointer(Int), "nelements")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100338 Function(GLXPixmap, "glXCreateGLXPixmapWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Pixmap, "pixmap")]),
339 Function(GLXContext, "glXCreateContextWithConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (Int, "render_type"), (GLXContext, "share_list"), (Bool, "direct")]),
340 Function(OpaquePointer(XVisualInfo), "glXGetVisualFromFBConfigSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config")]),
José Fonsecaecbfc9f2011-10-09 14:50:24 +0100341 Function(GLXFBConfigSGIX, "glXGetFBConfigFromVisualSGIX", [(Display, "dpy"), Out(Pointer(XVisualInfo), "vis")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100342
343 # GLX_SGIX_pbuffer
José Fonsecaecbfc9f2011-10-09 14:50:24 +0100344 Function(GLXPbufferSGIX, "glXCreateGLXPbufferSGIX", [(Display, "dpy"), (GLXFBConfigSGIX, "config"), (UInt, "width"), (UInt, "height"), (Array(Int, "__AttribList_size(attrib_list)"), "attrib_list")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100345 Function(Void, "glXDestroyGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf")]),
346 Function(Int, "glXQueryGLXPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuf"), (Int, "attribute"), (OpaquePointer(UInt), "value")]),
347 Function(Void, "glXSelectEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (ULong, "mask")]),
348 Function(Void, "glXGetSelectedEventSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(ULong), "mask")]),
349
350 # GLX_SGI_cushion
351 Function(Void, "glXCushionSGI", [(Display, "dpy"), (Window, "window"), (Float, "cushion")]),
352
353 # GLX_SGIX_video_resize
354 Function(Int, "glXBindChannelToWindowSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (Window, "window")]),
355 Function(Int, "glXChannelRectSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (Int, "x"), (Int, "y"), (Int, "w"), (Int, "h")]),
356 Function(Int, "glXQueryChannelRectSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (OpaquePointer(Int), "dx"), (OpaquePointer(Int), "dy"), (OpaquePointer(Int), "dw"), (OpaquePointer(Int), "dh")]),
357 Function(Int, "glXQueryChannelDeltasSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (OpaquePointer(Int), "x"), (OpaquePointer(Int), "y"), (OpaquePointer(Int), "w"), (OpaquePointer(Int), "h")]),
358 Function(Int, "glXChannelRectSyncSGIX", [(Display, "display"), (Int, "screen"), (Int, "channel"), (GLenum, "synctype")]),
359
360 # GLX_SGIX_dmbuffer
361 #Function(Bool, "glXAssociateDMPbufferSGIX", [(Display, "dpy"), (GLXPbufferSGIX, "pbuffer"), (OpaquePointer(DMparams), "params"), (DMbuffer, "dmbuffer")]),
362
363 # GLX_SGIX_swap_group
364 Function(Void, "glXJoinSwapGroupSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLXDrawable, "member")]),
365
366 # GLX_SGIX_swap_barrier
367 Function(Void, "glXBindSwapBarrierSGIX", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "barrier")]),
368 Function(Bool, "glXQueryMaxSwapBarriersSGIX", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "max")]),
369
370 # GLX_SUN_get_transparent_index
371 #Function(Status, "glXGetTransparentIndexSUN", [(Display, "dpy"), (Window, "overlay"), (Window, "underlay"), (OpaquePointer(Long), "pTransparentIndex")]),
372
373 # GLX_MESA_copy_sub_buffer
374 Function(Void, "glXCopySubBufferMESA", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "x"), (Int, "y"), (Int, "width"), (Int, "height")]),
375
376 # GLX_MESA_pixmap_colormap
377 #Function(GLXPixmap, "glXCreateGLXPixmapMESA", [(Display, "dpy"), (OpaquePointer(XVisualInfo), "visual"), (Pixmap, "pixmap"), (Colormap, "cmap")]),
378
379 # GLX_MESA_release_buffers
380 Function(Bool, "glXReleaseBuffersMESA", [(Display, "dpy"), (GLXDrawable, "drawable")]),
381
382 # GLX_MESA_set_3dfx_mode
383 Function(Bool, "glXSet3DfxModeMESA", [(Int, "mode")]),
384
385 # GLX_OML_sync_control
386 Function(Bool, "glXGetSyncValuesOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
387 Function(Bool, "glXGetMscRateOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(Int32), "numerator"), (OpaquePointer(Int32), "denominator")]),
388 Function(Int64, "glXSwapBuffersMscOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_msc"), (Int64, "divisor"), (Int64, "remainder")]),
389 Function(Bool, "glXWaitForMscOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_msc"), (Int64, "divisor"), (Int64, "remainder"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
390 Function(Bool, "glXWaitForSbcOML", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int64, "target_sbc"), (OpaquePointer(Int64), "ust"), (OpaquePointer(Int64), "msc"), (OpaquePointer(Int64), "sbc")]),
391
392 # GLX_SGIX_hyperpipe
393 #Function(OpaquePointer(GLXHyperpipeNetworkSGIX), "glXQueryHyperpipeNetworkSGIX", [(Display, "dpy"), (OpaquePointer(Int), "npipes")]),
394 #Function(Int, "glXHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "networkId"), (Int, "npipes"), (OpaquePointer(GLXHyperpipeConfigSGIX), "cfg"), (OpaquePointer(Int), "hpId")]),
395 #Function(OpaquePointer(GLXHyperpipeConfigSGIX), "glXQueryHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "hpId"), (OpaquePointer(Int), "npipes")]),
396 #Function(Int, "glXDestroyHyperpipeConfigSGIX", [(Display, "dpy"), (Int, "hpId")]),
397 #Function(Int, "glXBindHyperpipeSGIX", [(Display, "dpy"), (Int, "hpId")]),
398 #Function(Int, "glXQueryHyperpipeBestAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "attribList"), (OpaquePointer(Void), "returnAttribList")]),
399 #Function(Int, "glXHyperpipeAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "attribList")]),
400 #Function(Int, "glXQueryHyperpipeAttribSGIX", [(Display, "dpy"), (Int, "timeSlice"), (Int, "attrib"), (Int, "size"), (OpaquePointer(Void), "returnAttribList")]),
401
402 # GLX_MESA_agp_offset
José Fonseca903c2ca2011-09-23 09:43:05 +0100403 Function(UInt, "glXGetAGPOffsetMESA", [(OpaquePointer(Const(Void)), "pointer")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100404
José Fonseca5a76ccf2011-06-03 19:34:55 +0100405 # EXT_texture_from_pixmap
José Fonseca903c2ca2011-09-23 09:43:05 +0100406 Function(Void, "glXBindTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (Int, "buffer"), (Array(Const(Int), "__AttribList_size(attrib_list)"), "attrib_list")]),
José Fonseca5a76ccf2011-06-03 19:34:55 +0100407 Function(Void, "glXReleaseTexImageEXT", [(Display, "display"), (GLXDrawable, "drawable"), (Int, "buffer")]),
408
José Fonseca8d1f7272011-06-09 00:27:27 +0100409 # GLX_NV_present_video
410 #Function(OpaquePointer(UInt), "glXEnumerateVideoDevicesNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "nelements")]),
José Fonsecaecbfc9f2011-10-09 14:50:24 +0100411 #Function(Int, "glXBindVideoDeviceNV", [(Display, "dpy"), (UInt, "video_slot"), (UInt, "video_device"), (Array(Const(Int), "__AttribList_size(attrib_list)"), "attrib_list")]),
José Fonseca8d1f7272011-06-09 00:27:27 +0100412
413 # GLX_NV_video_output
414 #Function(Int, "glXGetVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (Int, "numVideoDevices"), (OpaquePointer(GLXVideoDeviceNV), "pVideoDevice")]),
415 #Function(Int, "glXReleaseVideoDeviceNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice")]),
416 #Function(Int, "glXBindVideoImageNV", [(Display, "dpy"), (GLXVideoDeviceNV, "VideoDevice"), (GLXPbuffer, "pbuf"), (Int, "iVideoBuffer")]),
417 #Function(Int, "glXReleaseVideoImageNV", [(Display, "dpy"), (GLXPbuffer, "pbuf")]),
418 #Function(Int, "glXSendPbufferToVideoNV", [(Display, "dpy"), (GLXPbuffer, "pbuf"), (Int, "iBufferType"), (OpaquePointer(ULong), "pulCounterPbuffer"), (GLboolean, "bBlock")]),
419 #Function(Int, "glXGetVideoInfoNV", [(Display, "dpy"), (Int, "screen"), (GLXVideoDeviceNV, "VideoDevice"), (OpaquePointer(ULong), "pulCounterOutputPbuffer"), (OpaquePointer(ULong), "pulCounterOutputVideo")]),
420
421 # GLX_NV_swap_group
422 Function(Bool, "glXJoinSwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (GLuint, "group")]),
423 Function(Bool, "glXBindSwapBarrierNV", [(Display, "dpy"), (GLuint, "group"), (GLuint, "barrier")]),
424 Function(Bool, "glXQuerySwapGroupNV", [(Display, "dpy"), (GLXDrawable, "drawable"), (OpaquePointer(GLuint), "group"), (OpaquePointer(GLuint), "barrier")]),
425 Function(Bool, "glXQueryMaxSwapGroupsNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(GLuint), "maxGroups"), (OpaquePointer(GLuint), "maxBarriers")]),
426 Function(Bool, "glXQueryFrameCountNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(GLuint), "count")]),
427 Function(Bool, "glXResetFrameCountNV", [(Display, "dpy"), (Int, "screen")]),
428
429 # GLX_NV_video_capture
430 #Function(Int, "glXBindVideoCaptureDeviceNV", [(Display, "dpy"), (UInt, "video_capture_slot"), (GLXVideoCaptureDeviceNV, "device")]),
431 #Function(OpaquePointer(GLXVideoCaptureDeviceNV), "glXEnumerateVideoCaptureDevicesNV", [(Display, "dpy"), (Int, "screen"), (OpaquePointer(Int), "nelements")]),
432 #Function(Void, "glXLockVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]),
433 #Function(Int, "glXQueryVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device"), (Int, "attribute"), (OpaquePointer(Int), "value")]),
434 #Function(Void, "glXReleaseVideoCaptureDeviceNV", [(Display, "dpy"), (GLXVideoCaptureDeviceNV, "device")]),
435
436 # GLX_EXT_swap_control
437 Function(Int, "glXSwapIntervalEXT", [(Display, "dpy"), (GLXDrawable, "drawable"), (Int, "interval")]),
438
439 # GLX_NV_copy_image
440 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")]),
José Fonsecae90885a2010-11-26 15:01:18 +0000441
José Fonseca5b92de62011-09-19 19:59:44 +0100442 # GLX_NV_vertex_array_range
443 Function(OpaquePointer(Void), "glXAllocateMemoryNV", [(GLsizei, "size"), (GLfloat, "readfreq"), (GLfloat, "writefreq"), (GLfloat, "priority")]),
444 Function(Void, "glXFreeMemoryNV", [(OpaquePointer(Void), "pointer")]),
445
José Fonseca4a826ed2010-11-30 16:58:22 +0000446 # Must be last
José Fonseca99771fc2010-11-25 20:32:59 +0000447 Function(PROC, "glXGetProcAddressARB", [(Alias("const GLubyte *", CString), "procName")]),
448 Function(PROC, "glXGetProcAddress", [(Alias("const GLubyte *", CString), "procName")]),
449])
450
451