OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """code generator for GL/GLES extension wrangler.""" | 6 """code generator for GL/GLES extension wrangler.""" |
7 | 7 |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import collections | 10 import collections |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 { 'return_type': 'void', | 60 { 'return_type': 'void', |
61 'names': ['glBindFramebufferEXT', 'glBindFramebuffer'], | 61 'names': ['glBindFramebufferEXT', 'glBindFramebuffer'], |
62 'arguments': 'GLenum target, GLuint framebuffer', }, | 62 'arguments': 'GLenum target, GLuint framebuffer', }, |
63 { 'return_type': 'void', | 63 { 'return_type': 'void', |
64 'names': ['glBindRenderbufferEXT', 'glBindRenderbuffer'], | 64 'names': ['glBindRenderbufferEXT', 'glBindRenderbuffer'], |
65 'arguments': 'GLenum target, GLuint renderbuffer', }, | 65 'arguments': 'GLenum target, GLuint renderbuffer', }, |
66 { 'return_type': 'void', | 66 { 'return_type': 'void', |
67 'names': ['glBindTexture'], | 67 'names': ['glBindTexture'], |
68 'arguments': 'GLenum target, GLuint texture', }, | 68 'arguments': 'GLenum target, GLuint texture', }, |
69 { 'return_type': 'void', | 69 { 'return_type': 'void', |
| 70 'known_as': 'glBindVertexArrayOES', |
| 71 'versions': [{ 'name': 'glBindVertexArray', |
| 72 'gl_versions': ['gl3', 'gl4', 'es3'] }, |
| 73 { 'name': 'glBindVertexArray', |
| 74 'extensions': ['GL_ARB_vertex_array_object'] }, |
| 75 { 'name': 'glBindVertexArrayOES' }, |
| 76 { 'name': 'glBindVertexArrayAPPLE', |
| 77 'extensions': ['GL_APPLE_vertex_array_object'] }], |
| 78 'arguments': 'GLuint array' }, |
| 79 { 'return_type': 'void', |
| 80 'known_as': 'glBlendBarrierKHR', |
| 81 'versions': [{ 'name': 'glBlendBarrierNV', |
| 82 'extensions': ['GL_NV_blend_equation_advanced'] }, |
| 83 { 'name': 'glBlendBarrierKHR', |
| 84 'extensions': ['GL_KHR_blend_equation_advanced'] }], |
| 85 'arguments': 'void' }, |
| 86 { 'return_type': 'void', |
70 'names': ['glBlendColor'], | 87 'names': ['glBlendColor'], |
71 'arguments': 'GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha', }, | 88 'arguments': 'GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha', }, |
72 { 'return_type': 'void', | 89 { 'return_type': 'void', |
73 'names': ['glBlendEquation'], | 90 'names': ['glBlendEquation'], |
74 'arguments': ' GLenum mode ', }, | 91 'arguments': ' GLenum mode ', }, |
75 { 'return_type': 'void', | 92 { 'return_type': 'void', |
76 'names': ['glBlendEquationSeparate'], | 93 'names': ['glBlendEquationSeparate'], |
77 'arguments': 'GLenum modeRGB, GLenum modeAlpha', }, | 94 'arguments': 'GLenum modeRGB, GLenum modeAlpha', }, |
78 { 'return_type': 'void', | 95 { 'return_type': 'void', |
79 'names': ['glBlendFunc'], | 96 'names': ['glBlendFunc'], |
80 'arguments': 'GLenum sfactor, GLenum dfactor', }, | 97 'arguments': 'GLenum sfactor, GLenum dfactor', }, |
81 { 'return_type': 'void', | 98 { 'return_type': 'void', |
82 'names': ['glBlendFuncSeparate'], | 99 'names': ['glBlendFuncSeparate'], |
83 'arguments': | 100 'arguments': |
84 'GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha', }, | 101 'GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha', }, |
85 { 'return_type': 'void', | 102 { 'return_type': 'void', |
86 'names': ['glBlitFramebuffer'], | 103 'names': ['glBlitFramebuffer'], |
87 'arguments': 'GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, ' | 104 'arguments': 'GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, ' |
88 'GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, ' | 105 'GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, ' |
89 'GLbitfield mask, GLenum filter', }, | 106 'GLbitfield mask, GLenum filter', }, |
90 { 'return_type': 'void', | 107 { 'return_type': 'void', |
| 108 'names': ['glBlitFramebufferANGLE', 'glBlitFramebuffer'], |
| 109 'arguments': 'GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, ' |
| 110 'GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, ' |
| 111 'GLbitfield mask, GLenum filter', }, |
| 112 { 'return_type': 'void', |
91 'names': ['glBlitFramebufferEXT', 'glBlitFramebuffer'], | 113 'names': ['glBlitFramebufferEXT', 'glBlitFramebuffer'], |
92 'arguments': 'GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, ' | 114 'arguments': 'GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, ' |
93 'GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, ' | 115 'GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, ' |
94 'GLbitfield mask, GLenum filter', }, | 116 'GLbitfield mask, GLenum filter', }, |
95 { 'return_type': 'void', | |
96 'names': ['glBlitFramebufferANGLE', 'glBlitFramebuffer'], | |
97 'arguments': 'GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, ' | |
98 'GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, ' | |
99 'GLbitfield mask, GLenum filter', }, | |
100 { 'return_type': 'void', | 117 { 'return_type': 'void', |
101 'names': ['glBufferData'], | 118 'names': ['glBufferData'], |
102 'arguments': | 119 'arguments': |
103 'GLenum target, GLsizeiptr size, const void* data, GLenum usage', }, | 120 'GLenum target, GLsizeiptr size, const void* data, GLenum usage', }, |
104 { 'return_type': 'void', | 121 { 'return_type': 'void', |
105 'names': ['glBufferSubData'], | 122 'names': ['glBufferSubData'], |
106 'arguments': | 123 'arguments': |
107 'GLenum target, GLintptr offset, GLsizeiptr size, const void* data', }, | 124 'GLenum target, GLintptr offset, GLsizeiptr size, const void* data', }, |
108 { 'return_type': 'GLenum', | 125 { 'return_type': 'GLenum', |
109 'names': ['glCheckFramebufferStatusEXT', | 126 'names': ['glCheckFramebufferStatusEXT', |
(...skipping 10 matching lines...) Expand all Loading... |
120 'arguments': 'GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha', }, | 137 'arguments': 'GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha', }, |
121 { 'return_type': 'void', | 138 { 'return_type': 'void', |
122 'names': ['glClearDepth'], | 139 'names': ['glClearDepth'], |
123 'arguments': 'GLclampd depth', }, | 140 'arguments': 'GLclampd depth', }, |
124 { 'return_type': 'void', | 141 { 'return_type': 'void', |
125 'names': ['glClearDepthf'], | 142 'names': ['glClearDepthf'], |
126 'arguments': 'GLclampf depth', }, | 143 'arguments': 'GLclampf depth', }, |
127 { 'return_type': 'void', | 144 { 'return_type': 'void', |
128 'names': ['glClearStencil'], | 145 'names': ['glClearStencil'], |
129 'arguments': 'GLint s', }, | 146 'arguments': 'GLint s', }, |
| 147 { 'return_type': 'GLenum', |
| 148 'names': ['glClientWaitSync'], |
| 149 'arguments': 'GLsync sync, GLbitfield flags, GLuint64 timeout', }, |
130 { 'return_type': 'void', | 150 { 'return_type': 'void', |
131 'names': ['glColorMask'], | 151 'names': ['glColorMask'], |
132 'arguments': | 152 'arguments': |
133 'GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha', }, | 153 'GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha', }, |
134 { 'return_type': 'void', | 154 { 'return_type': 'void', |
135 'names': ['glCompileShader'], | 155 'names': ['glCompileShader'], |
136 'arguments': 'GLuint shader', }, | 156 'arguments': 'GLuint shader', }, |
137 { 'return_type': 'void', | 157 { 'return_type': 'void', |
138 'names': ['glCompressedTexImage2D'], | 158 'names': ['glCompressedTexImage2D'], |
139 'arguments': | 159 'arguments': |
(...skipping 21 matching lines...) Expand all Loading... |
161 { 'return_type': 'GLuint', | 181 { 'return_type': 'GLuint', |
162 'names': ['glCreateShader'], | 182 'names': ['glCreateShader'], |
163 'arguments': 'GLenum type', }, | 183 'arguments': 'GLenum type', }, |
164 { 'return_type': 'void', | 184 { 'return_type': 'void', |
165 'names': ['glCullFace'], | 185 'names': ['glCullFace'], |
166 'arguments': 'GLenum mode', }, | 186 'arguments': 'GLenum mode', }, |
167 { 'return_type': 'void', | 187 { 'return_type': 'void', |
168 'names': ['glDeleteBuffersARB', 'glDeleteBuffers'], | 188 'names': ['glDeleteBuffersARB', 'glDeleteBuffers'], |
169 'arguments': 'GLsizei n, const GLuint* buffers', }, | 189 'arguments': 'GLsizei n, const GLuint* buffers', }, |
170 { 'return_type': 'void', | 190 { 'return_type': 'void', |
| 191 'known_as': 'glDeleteFencesAPPLE', |
| 192 'versions': [{ 'name': 'glDeleteFencesAPPLE', |
| 193 'extensions': ['GL_APPLE_fence'] }], |
| 194 'arguments': 'GLsizei n, const GLuint* fences', }, |
| 195 { 'return_type': 'void', |
| 196 'names': ['glDeleteFencesNV'], |
| 197 'arguments': 'GLsizei n, const GLuint* fences', }, |
| 198 { 'return_type': 'void', |
171 'names': ['glDeleteFramebuffersEXT', 'glDeleteFramebuffers'], | 199 'names': ['glDeleteFramebuffersEXT', 'glDeleteFramebuffers'], |
172 'arguments': 'GLsizei n, const GLuint* framebuffers', }, | 200 'arguments': 'GLsizei n, const GLuint* framebuffers', }, |
173 { 'return_type': 'void', | 201 { 'return_type': 'void', |
174 'names': ['glDeleteProgram'], | 202 'names': ['glDeleteProgram'], |
175 'arguments': 'GLuint program', }, | 203 'arguments': 'GLuint program', }, |
176 { 'return_type': 'void', | 204 { 'return_type': 'void', |
177 'names': ['glDeleteQueries'], | 205 'names': ['glDeleteQueries'], |
178 'arguments': 'GLsizei n, const GLuint* ids', }, | 206 'arguments': 'GLsizei n, const GLuint* ids', }, |
179 { 'return_type': 'void', | 207 { 'return_type': 'void', |
180 'names': ['glDeleteQueriesARB', 'glDeleteQueriesEXT'], | 208 'names': ['glDeleteQueriesARB', 'glDeleteQueriesEXT'], |
181 'arguments': 'GLsizei n, const GLuint* ids', }, | 209 'arguments': 'GLsizei n, const GLuint* ids', }, |
182 { 'return_type': 'void', | 210 { 'return_type': 'void', |
183 'names': ['glDeleteRenderbuffersEXT', 'glDeleteRenderbuffers'], | 211 'names': ['glDeleteRenderbuffersEXT', 'glDeleteRenderbuffers'], |
184 'arguments': 'GLsizei n, const GLuint* renderbuffers', }, | 212 'arguments': 'GLsizei n, const GLuint* renderbuffers', }, |
185 { 'return_type': 'void', | 213 { 'return_type': 'void', |
186 'names': ['glDeleteShader'], | 214 'names': ['glDeleteShader'], |
187 'arguments': 'GLuint shader', }, | 215 'arguments': 'GLuint shader', }, |
188 { 'return_type': 'void', | 216 { 'return_type': 'void', |
| 217 'names': ['glDeleteSync'], |
| 218 'arguments': 'GLsync sync', }, |
| 219 { 'return_type': 'void', |
189 'names': ['glDeleteTextures'], | 220 'names': ['glDeleteTextures'], |
190 'arguments': 'GLsizei n, const GLuint* textures', }, | 221 'arguments': 'GLsizei n, const GLuint* textures', }, |
191 { 'return_type': 'void', | 222 { 'return_type': 'void', |
| 223 'known_as': 'glDeleteVertexArraysOES', |
| 224 'versions': [{ 'name': 'glDeleteVertexArrays', |
| 225 'gl_versions': ['gl3', 'gl4', 'es3'] }, |
| 226 { 'name': 'glDeleteVertexArrays', |
| 227 'extensions': ['GL_ARB_vertex_array_object'] }, |
| 228 { 'name': 'glDeleteVertexArraysOES' }, |
| 229 { 'name': 'glDeleteVertexArraysAPPLE', |
| 230 'extensions': ['GL_APPLE_vertex_array_object'] }], |
| 231 'arguments': 'GLsizei n, const GLuint* arrays' }, |
| 232 { 'return_type': 'void', |
192 'names': ['glDepthFunc'], | 233 'names': ['glDepthFunc'], |
193 'arguments': 'GLenum func', }, | 234 'arguments': 'GLenum func', }, |
194 { 'return_type': 'void', | 235 { 'return_type': 'void', |
195 'names': ['glDepthMask'], | 236 'names': ['glDepthMask'], |
196 'arguments': 'GLboolean flag', }, | 237 'arguments': 'GLboolean flag', }, |
197 { 'return_type': 'void', | 238 { 'return_type': 'void', |
198 'names': ['glDepthRange'], | 239 'names': ['glDepthRange'], |
199 'arguments': 'GLclampd zNear, GLclampd zFar', }, | 240 'arguments': 'GLclampd zNear, GLclampd zFar', }, |
200 { 'return_type': 'void', | 241 { 'return_type': 'void', |
201 'names': ['glDepthRangef'], | 242 'names': ['glDepthRangef'], |
202 'arguments': 'GLclampf zNear, GLclampf zFar', }, | 243 'arguments': 'GLclampf zNear, GLclampf zFar', }, |
203 { 'return_type': 'void', | 244 { 'return_type': 'void', |
204 'names': ['glDetachShader'], | 245 'names': ['glDetachShader'], |
205 'arguments': 'GLuint program, GLuint shader', }, | 246 'arguments': 'GLuint program, GLuint shader', }, |
206 { 'return_type': 'void', | 247 { 'return_type': 'void', |
207 'names': ['glDisable'], | 248 'names': ['glDisable'], |
208 'arguments': 'GLenum cap', }, | 249 'arguments': 'GLenum cap', }, |
209 { 'return_type': 'void', | 250 { 'return_type': 'void', |
210 'names': ['glDisableVertexAttribArray'], | 251 'names': ['glDisableVertexAttribArray'], |
211 'arguments': 'GLuint index', }, | 252 'arguments': 'GLuint index', }, |
212 { 'return_type': 'void', | 253 { 'return_type': 'void', |
| 254 'known_as': 'glDiscardFramebufferEXT', |
| 255 'versions': [{ 'name': 'glInvalidateFramebuffer', |
| 256 'gl_versions': ['es3'], |
| 257 'extensions': [] }, |
| 258 { 'name': 'glDiscardFramebufferEXT', |
| 259 'gl_versions': ['es1', 'es2'] }], |
| 260 'arguments': 'GLenum target, GLsizei numAttachments, ' |
| 261 'const GLenum* attachments' }, |
| 262 { 'return_type': 'void', |
213 'names': ['glDrawArrays'], | 263 'names': ['glDrawArrays'], |
214 'arguments': 'GLenum mode, GLint first, GLsizei count', }, | 264 'arguments': 'GLenum mode, GLint first, GLsizei count', }, |
215 { 'return_type': 'void', | 265 { 'return_type': 'void', |
| 266 'known_as': 'glDrawArraysInstancedANGLE', |
| 267 'names': ['glDrawArraysInstancedARB', 'glDrawArraysInstancedANGLE', |
| 268 'glDrawArraysInstanced'], |
| 269 'arguments': 'GLenum mode, GLint first, GLsizei count, GLsizei primcount', }, |
| 270 { 'return_type': 'void', |
216 'names': ['glDrawBuffer'], | 271 'names': ['glDrawBuffer'], |
217 'arguments': 'GLenum mode', }, | 272 'arguments': 'GLenum mode', }, |
218 { 'return_type': 'void', | 273 { 'return_type': 'void', |
219 'names': ['glDrawBuffersARB', 'glDrawBuffersEXT', 'glDrawBuffers'], | 274 'names': ['glDrawBuffersARB', 'glDrawBuffersEXT', 'glDrawBuffers'], |
220 'arguments': 'GLsizei n, const GLenum* bufs', }, | 275 'arguments': 'GLsizei n, const GLenum* bufs', }, |
221 { 'return_type': 'void', | 276 { 'return_type': 'void', |
222 'names': ['glDrawElements'], | 277 'names': ['glDrawElements'], |
223 'arguments': | 278 'arguments': |
224 'GLenum mode, GLsizei count, GLenum type, const void* indices', }, | 279 'GLenum mode, GLsizei count, GLenum type, const void* indices', }, |
225 { 'return_type': 'void', | 280 { 'return_type': 'void', |
226 'names': ['glEGLImageTargetTexture2DOES'], | 281 'known_as': 'glDrawElementsInstancedANGLE', |
| 282 'names': ['glDrawElementsInstancedARB', 'glDrawElementsInstancedANGLE', |
| 283 'glDrawElementsInstanced'], |
| 284 'arguments': |
| 285 'GLenum mode, GLsizei count, GLenum type, const void* indices, ' |
| 286 'GLsizei primcount', }, |
| 287 { 'return_type': 'void', |
| 288 'names': ['glEGLImageTargetRenderbufferStorageOES'], |
227 'arguments': 'GLenum target, GLeglImageOES image', }, | 289 'arguments': 'GLenum target, GLeglImageOES image', }, |
228 { 'return_type': 'void', | 290 { 'return_type': 'void', |
229 'names': ['glEGLImageTargetRenderbufferStorageOES'], | 291 'names': ['glEGLImageTargetTexture2DOES'], |
230 'arguments': 'GLenum target, GLeglImageOES image', }, | 292 'arguments': 'GLenum target, GLeglImageOES image', }, |
231 { 'return_type': 'void', | 293 { 'return_type': 'void', |
232 'names': ['glEnable'], | 294 'names': ['glEnable'], |
233 'arguments': 'GLenum cap', }, | 295 'arguments': 'GLenum cap', }, |
234 { 'return_type': 'void', | 296 { 'return_type': 'void', |
235 'names': ['glEnableVertexAttribArray'], | 297 'names': ['glEnableVertexAttribArray'], |
236 'arguments': 'GLuint index', }, | 298 'arguments': 'GLuint index', }, |
237 { 'return_type': 'void', | 299 { 'return_type': 'void', |
238 'names': ['glEndQuery'], | 300 'names': ['glEndQuery'], |
239 'arguments': 'GLenum target', }, | 301 'arguments': 'GLenum target', }, |
240 { 'return_type': 'void', | 302 { 'return_type': 'void', |
241 'names': ['glEndQueryARB', 'glEndQueryEXT'], | 303 'names': ['glEndQueryARB', 'glEndQueryEXT'], |
242 'arguments': 'GLenum target', }, | 304 'arguments': 'GLenum target', }, |
| 305 { 'return_type': 'GLsync', |
| 306 'names': ['glFenceSync'], |
| 307 'arguments': 'GLenum condition, GLbitfield flags', }, |
243 { 'return_type': 'void', | 308 { 'return_type': 'void', |
244 'names': ['glFinish'], | 309 'names': ['glFinish'], |
245 'arguments': 'void', }, | 310 'arguments': 'void', }, |
246 { 'return_type': 'void', | 311 { 'return_type': 'void', |
| 312 'known_as': 'glFinishFenceAPPLE', |
| 313 'versions': [{ 'name': 'glFinishFenceAPPLE', |
| 314 'extensions': ['GL_APPLE_fence'] }], |
| 315 'arguments': 'GLuint fence', }, |
| 316 { 'return_type': 'void', |
| 317 'names': ['glFinishFenceNV'], |
| 318 'arguments': 'GLuint fence', }, |
| 319 { 'return_type': 'void', |
247 'names': ['glFlush'], | 320 'names': ['glFlush'], |
248 'arguments': 'void', }, | 321 'arguments': 'void', }, |
249 { 'return_type': 'void', | 322 { 'return_type': 'void', |
| 323 'names': ['glFlushMappedBufferRange'], |
| 324 'arguments': 'GLenum target, GLintptr offset, GLsizeiptr length', }, |
| 325 { 'return_type': 'void', |
250 'names': ['glFramebufferRenderbufferEXT', 'glFramebufferRenderbuffer'], | 326 'names': ['glFramebufferRenderbufferEXT', 'glFramebufferRenderbuffer'], |
251 'arguments': \ | 327 'arguments': |
252 'GLenum target, GLenum attachment, GLenum renderbuffertarget, ' | 328 'GLenum target, GLenum attachment, GLenum renderbuffertarget, ' |
253 'GLuint renderbuffer', }, | 329 'GLuint renderbuffer', }, |
254 { 'return_type': 'void', | 330 { 'return_type': 'void', |
255 'names': ['glFramebufferTexture2DEXT', 'glFramebufferTexture2D'], | 331 'names': ['glFramebufferTexture2DEXT', 'glFramebufferTexture2D'], |
256 'arguments': | 332 'arguments': |
257 'GLenum target, GLenum attachment, GLenum textarget, GLuint texture, ' | 333 'GLenum target, GLenum attachment, GLenum textarget, GLuint texture, ' |
258 'GLint level', }, | 334 'GLint level', }, |
259 { 'return_type': 'void', | 335 { 'return_type': 'void', |
260 'names': ['glFramebufferTexture2DMultisampleEXT'], | 336 'names': ['glFramebufferTexture2DMultisampleEXT'], |
261 'arguments': | 337 'arguments': |
262 'GLenum target, GLenum attachment, GLenum textarget, GLuint texture, ' | 338 'GLenum target, GLenum attachment, GLenum textarget, GLuint texture, ' |
263 'GLint level, GLsizei samples', }, | 339 'GLint level, GLsizei samples', }, |
264 { 'return_type': 'void', | 340 { 'return_type': 'void', |
265 'names': ['glFramebufferTexture2DMultisampleIMG'], | 341 'names': ['glFramebufferTexture2DMultisampleIMG'], |
266 'arguments': | 342 'arguments': |
267 'GLenum target, GLenum attachment, GLenum textarget, GLuint texture, ' | 343 'GLenum target, GLenum attachment, GLenum textarget, GLuint texture, ' |
268 'GLint level, GLsizei samples', }, | 344 'GLint level, GLsizei samples', }, |
269 { 'return_type': 'void', | 345 { 'return_type': 'void', |
270 'names': ['glFrontFace'], | 346 'names': ['glFrontFace'], |
271 'arguments': 'GLenum mode', }, | 347 'arguments': 'GLenum mode', }, |
272 { 'return_type': 'void', | 348 { 'return_type': 'void', |
273 'names': ['glGenBuffersARB', 'glGenBuffers'], | 349 'names': ['glGenBuffersARB', 'glGenBuffers'], |
274 'arguments': 'GLsizei n, GLuint* buffers', }, | 350 'arguments': 'GLsizei n, GLuint* buffers', }, |
275 { 'return_type': 'void', | 351 { 'return_type': 'void', |
| 352 'names': ['glGenerateMipmapEXT', 'glGenerateMipmap'], |
| 353 'arguments': 'GLenum target', }, |
| 354 { 'return_type': 'void', |
| 355 'known_as': 'glGenFencesAPPLE', |
| 356 'versions': [{ 'name': 'glGenFencesAPPLE', |
| 357 'extensions': ['GL_APPLE_fence'] }], |
| 358 'arguments': 'GLsizei n, GLuint* fences', }, |
| 359 { 'return_type': 'void', |
| 360 'names': ['glGenFencesNV'], |
| 361 'arguments': 'GLsizei n, GLuint* fences', }, |
| 362 { 'return_type': 'void', |
| 363 'names': ['glGenFramebuffersEXT', 'glGenFramebuffers'], |
| 364 'arguments': 'GLsizei n, GLuint* framebuffers', }, |
| 365 { 'return_type': 'void', |
276 'names': ['glGenQueries'], | 366 'names': ['glGenQueries'], |
277 'arguments': 'GLsizei n, GLuint* ids', }, | 367 'arguments': 'GLsizei n, GLuint* ids', }, |
278 { 'return_type': 'void', | 368 { 'return_type': 'void', |
279 'names': ['glGenQueriesARB', 'glGenQueriesEXT'], | 369 'names': ['glGenQueriesARB', 'glGenQueriesEXT'], |
280 'arguments': 'GLsizei n, GLuint* ids', }, | 370 'arguments': 'GLsizei n, GLuint* ids', }, |
281 { 'return_type': 'void', | 371 { 'return_type': 'void', |
282 'names': ['glGenerateMipmapEXT', 'glGenerateMipmap'], | |
283 'arguments': 'GLenum target', }, | |
284 { 'return_type': 'void', | |
285 'names': ['glGenFramebuffersEXT', 'glGenFramebuffers'], | |
286 'arguments': 'GLsizei n, GLuint* framebuffers', }, | |
287 { 'return_type': 'void', | |
288 'names': ['glGenRenderbuffersEXT', 'glGenRenderbuffers'], | 372 'names': ['glGenRenderbuffersEXT', 'glGenRenderbuffers'], |
289 'arguments': 'GLsizei n, GLuint* renderbuffers', }, | 373 'arguments': 'GLsizei n, GLuint* renderbuffers', }, |
290 { 'return_type': 'void', | 374 { 'return_type': 'void', |
291 'names': ['glGenTextures'], | 375 'names': ['glGenTextures'], |
292 'arguments': 'GLsizei n, GLuint* textures', }, | 376 'arguments': 'GLsizei n, GLuint* textures', }, |
293 { 'return_type': 'void', | 377 { 'return_type': 'void', |
| 378 'known_as': 'glGenVertexArraysOES', |
| 379 'versions': [{ 'name': 'glGenVertexArrays', |
| 380 'gl_versions': ['gl3', 'gl4', 'es3'] }, |
| 381 { 'name': 'glGenVertexArrays', |
| 382 'extensions': ['GL_ARB_vertex_array_object'] }, |
| 383 { 'name': 'glGenVertexArraysOES' }, |
| 384 { 'name': 'glGenVertexArraysAPPLE', |
| 385 'extensions': ['GL_APPLE_vertex_array_object'] }], |
| 386 'arguments': 'GLsizei n, GLuint* arrays', }, |
| 387 { 'return_type': 'void', |
294 'names': ['glGetActiveAttrib'], | 388 'names': ['glGetActiveAttrib'], |
295 'arguments': | 389 'arguments': |
296 'GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, ' | 390 'GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, ' |
297 'GLint* size, GLenum* type, char* name', }, | 391 'GLint* size, GLenum* type, char* name', }, |
298 { 'return_type': 'void', | 392 { 'return_type': 'void', |
299 'names': ['glGetActiveUniform'], | 393 'names': ['glGetActiveUniform'], |
300 'arguments': | 394 'arguments': |
301 'GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, ' | 395 'GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, ' |
302 'GLint* size, GLenum* type, char* name', }, | 396 'GLint* size, GLenum* type, char* name', }, |
303 { 'return_type': 'void', | 397 { 'return_type': 'void', |
304 'names': ['glGetAttachedShaders'], | 398 'names': ['glGetAttachedShaders'], |
305 'arguments': | 399 'arguments': |
306 'GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders', }, | 400 'GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders', }, |
307 { 'return_type': 'GLint', | 401 { 'return_type': 'GLint', |
308 'names': ['glGetAttribLocation'], | 402 'names': ['glGetAttribLocation'], |
309 'arguments': 'GLuint program, const char* name', }, | 403 'arguments': 'GLuint program, const char* name', }, |
310 { 'return_type': 'void', | 404 { 'return_type': 'void', |
311 'names': ['glGetBooleanv'], | 405 'names': ['glGetBooleanv'], |
312 'arguments': 'GLenum pname, GLboolean* params', }, | 406 'arguments': 'GLenum pname, GLboolean* params', }, |
313 { 'return_type': 'void', | 407 { 'return_type': 'void', |
314 'names': ['glGetBufferParameteriv'], | 408 'names': ['glGetBufferParameteriv'], |
315 'arguments': 'GLenum target, GLenum pname, GLint* params', }, | 409 'arguments': 'GLenum target, GLenum pname, GLint* params', }, |
316 { 'return_type': 'GLenum', | 410 { 'return_type': 'GLenum', |
317 'names': ['glGetError'], | 411 'names': ['glGetError'], |
318 'arguments': 'void', | 412 'arguments': 'void', |
319 'logging_code': """ | 413 'logging_code': """ |
320 GL_SERVICE_LOG("GL_RESULT: " << GLES2Util::GetStringError(result)); | 414 GL_SERVICE_LOG("GL_RESULT: " << GLES2Util::GetStringError(result)); |
321 """, }, | 415 """, }, |
322 { 'return_type': 'void', | 416 { 'return_type': 'void', |
| 417 'names': ['glGetFenceivNV'], |
| 418 'arguments': 'GLuint fence, GLenum pname, GLint* params', }, |
| 419 { 'return_type': 'void', |
323 'names': ['glGetFloatv'], | 420 'names': ['glGetFloatv'], |
324 'arguments': 'GLenum pname, GLfloat* params', }, | 421 'arguments': 'GLenum pname, GLfloat* params', }, |
325 { 'return_type': 'void', | 422 { 'return_type': 'void', |
326 'names': ['glGetFramebufferAttachmentParameterivEXT', | 423 'names': ['glGetFramebufferAttachmentParameterivEXT', |
327 'glGetFramebufferAttachmentParameteriv'], | 424 'glGetFramebufferAttachmentParameteriv'], |
328 'arguments': 'GLenum target, ' | 425 'arguments': 'GLenum target, ' |
329 'GLenum attachment, GLenum pname, GLint* params', }, | 426 'GLenum attachment, GLenum pname, GLint* params', }, |
330 { 'return_type': 'GLenum', | 427 { 'return_type': 'GLenum', |
331 'names': ['glGetGraphicsResetStatusARB', | 428 'names': ['glGetGraphicsResetStatusARB', |
332 'glGetGraphicsResetStatusKHR', | 429 'glGetGraphicsResetStatusKHR', |
333 'glGetGraphicsResetStatusEXT', | 430 'glGetGraphicsResetStatusEXT', |
334 'glGetGraphicsResetStatus'], | 431 'glGetGraphicsResetStatus'], |
335 'arguments': 'void', }, | 432 'arguments': 'void', }, |
336 { 'return_type': 'void', | 433 { 'return_type': 'void', |
| 434 'names': ['glGetInteger64v'], |
| 435 'arguments': 'GLenum pname, GLint64* params', }, |
| 436 { 'return_type': 'void', |
337 'names': ['glGetIntegerv'], | 437 'names': ['glGetIntegerv'], |
338 'arguments': 'GLenum pname, GLint* params', }, | 438 'arguments': 'GLenum pname, GLint* params', }, |
339 { 'return_type': 'void', | 439 { 'return_type': 'void', |
340 'names': ['glGetInteger64v'], | |
341 'arguments': 'GLenum pname, GLint64* params', }, | |
342 { 'return_type': 'void', | |
343 'known_as': 'glGetProgramBinary', | 440 'known_as': 'glGetProgramBinary', |
344 'versions': [{ 'name': 'glGetProgramBinaryOES' }, | 441 'versions': [{ 'name': 'glGetProgramBinaryOES' }, |
345 { 'name': 'glGetProgramBinary', | 442 { 'name': 'glGetProgramBinary', |
346 'extensions': ['GL_ARB_get_program_binary'] }, | 443 'extensions': ['GL_ARB_get_program_binary'] }, |
347 { 'name': 'glGetProgramBinary' }], | 444 { 'name': 'glGetProgramBinary' }], |
348 'arguments': 'GLuint program, GLsizei bufSize, GLsizei* length, ' | 445 'arguments': 'GLuint program, GLsizei bufSize, GLsizei* length, ' |
349 'GLenum* binaryFormat, GLvoid* binary' }, | 446 'GLenum* binaryFormat, GLvoid* binary' }, |
350 { 'return_type': 'void', | 447 { 'return_type': 'void', |
351 'names': ['glGetProgramiv'], | |
352 'arguments': 'GLuint program, GLenum pname, GLint* params', }, | |
353 { 'return_type': 'void', | |
354 'names': ['glGetProgramInfoLog'], | 448 'names': ['glGetProgramInfoLog'], |
355 'arguments': | 449 'arguments': |
356 'GLuint program, GLsizei bufsize, GLsizei* length, char* infolog', }, | 450 'GLuint program, GLsizei bufsize, GLsizei* length, char* infolog', }, |
357 { 'return_type': 'void', | 451 { 'return_type': 'void', |
| 452 'names': ['glGetProgramiv'], |
| 453 'arguments': 'GLuint program, GLenum pname, GLint* params', }, |
| 454 { 'return_type': 'void', |
358 'names': ['glGetQueryiv'], | 455 'names': ['glGetQueryiv'], |
359 'arguments': 'GLenum target, GLenum pname, GLint* params', }, | 456 'arguments': 'GLenum target, GLenum pname, GLint* params', }, |
360 { 'return_type': 'void', | 457 { 'return_type': 'void', |
361 'names': ['glGetQueryivARB', 'glGetQueryivEXT'], | 458 'names': ['glGetQueryivARB', 'glGetQueryivEXT'], |
362 'arguments': 'GLenum target, GLenum pname, GLint* params', }, | 459 'arguments': 'GLenum target, GLenum pname, GLint* params', }, |
363 { 'return_type': 'void', | 460 { 'return_type': 'void', |
364 'names': ['glGetQueryObjecti64v'], | 461 'names': ['glGetQueryObjecti64v'], |
365 'arguments': 'GLuint id, GLenum pname, GLint64* params', }, | 462 'arguments': 'GLuint id, GLenum pname, GLint64* params', }, |
366 { 'return_type': 'void', | 463 { 'return_type': 'void', |
| 464 'names': ['glGetQueryObjectiv', 'glGetQueryObjectivARB', |
| 465 'glGetQueryObjectivEXT'], |
| 466 'arguments': 'GLuint id, GLenum pname, GLint* params', }, |
| 467 { 'return_type': 'void', |
367 'names': ['glGetQueryObjectui64v', 'glGetQueryObjectui64vEXT'], | 468 'names': ['glGetQueryObjectui64v', 'glGetQueryObjectui64vEXT'], |
368 'arguments': 'GLuint id, GLenum pname, GLuint64* params', }, | 469 'arguments': 'GLuint id, GLenum pname, GLuint64* params', }, |
369 { 'return_type': 'void', | 470 { 'return_type': 'void', |
370 'names': ['glGetQueryObjectuiv'], | 471 'names': ['glGetQueryObjectuiv'], |
371 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, | 472 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, |
372 { 'return_type': 'void', | 473 { 'return_type': 'void', |
373 'names': ['glGetQueryObjectuivARB', 'glGetQueryObjectuivEXT'], | 474 'names': ['glGetQueryObjectuivARB', 'glGetQueryObjectuivEXT'], |
374 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, | 475 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, |
375 { 'return_type': 'void', | 476 { 'return_type': 'void', |
376 'names': ['glGetQueryObjectiv', 'glGetQueryObjectivARB', | |
377 'glGetQueryObjectivEXT'], | |
378 'arguments': 'GLuint id, GLenum pname, GLint* params', }, | |
379 { 'return_type': 'void', | |
380 'names': ['glGetRenderbufferParameterivEXT', 'glGetRenderbufferParameteriv'], | 477 'names': ['glGetRenderbufferParameterivEXT', 'glGetRenderbufferParameteriv'], |
381 'arguments': 'GLenum target, GLenum pname, GLint* params', }, | 478 'arguments': 'GLenum target, GLenum pname, GLint* params', }, |
382 { 'return_type': 'void', | 479 { 'return_type': 'void', |
383 'names': ['glGetShaderiv'], | |
384 'arguments': 'GLuint shader, GLenum pname, GLint* params', }, | |
385 { 'return_type': 'void', | |
386 'names': ['glGetShaderInfoLog'], | 480 'names': ['glGetShaderInfoLog'], |
387 'arguments': | 481 'arguments': |
388 'GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog', }, | 482 'GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog', }, |
389 { 'return_type': 'void', | 483 { 'return_type': 'void', |
| 484 'names': ['glGetShaderiv'], |
| 485 'arguments': 'GLuint shader, GLenum pname, GLint* params', }, |
| 486 { 'return_type': 'void', |
390 'names': ['glGetShaderPrecisionFormat'], | 487 'names': ['glGetShaderPrecisionFormat'], |
391 'arguments': 'GLenum shadertype, GLenum precisiontype, ' | 488 'arguments': 'GLenum shadertype, GLenum precisiontype, ' |
392 'GLint* range, GLint* precision', }, | 489 'GLint* range, GLint* precision', }, |
393 { 'return_type': 'void', | 490 { 'return_type': 'void', |
394 'names': ['glGetShaderSource'], | 491 'names': ['glGetShaderSource'], |
395 'arguments': | 492 'arguments': |
396 'GLuint shader, GLsizei bufsize, GLsizei* length, char* source', }, | 493 'GLuint shader, GLsizei bufsize, GLsizei* length, char* source', }, |
397 { 'return_type': 'const GLubyte*', | 494 { 'return_type': 'const GLubyte*', |
398 'names': ['glGetString'], | 495 'names': ['glGetString'], |
399 'arguments': 'GLenum name', }, | 496 'arguments': 'GLenum name', }, |
400 { 'return_type': 'void', | 497 { 'return_type': 'void', |
| 498 'names': ['glGetSynciv'], |
| 499 'arguments': |
| 500 'GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length,' |
| 501 'GLint* values', }, |
| 502 { 'return_type': 'void', |
401 'names': ['glGetTexLevelParameterfv'], | 503 'names': ['glGetTexLevelParameterfv'], |
402 'arguments': 'GLenum target, GLint level, GLenum pname, GLfloat* params', }, | 504 'arguments': 'GLenum target, GLint level, GLenum pname, GLfloat* params', }, |
403 { 'return_type': 'void', | 505 { 'return_type': 'void', |
404 'names': ['glGetTexLevelParameteriv'], | 506 'names': ['glGetTexLevelParameteriv'], |
405 'arguments': 'GLenum target, GLint level, GLenum pname, GLint* params', }, | 507 'arguments': 'GLenum target, GLint level, GLenum pname, GLint* params', }, |
406 { 'return_type': 'void', | 508 { 'return_type': 'void', |
407 'names': ['glGetTexParameterfv'], | 509 'names': ['glGetTexParameterfv'], |
408 'arguments': 'GLenum target, GLenum pname, GLfloat* params', }, | 510 'arguments': 'GLenum target, GLenum pname, GLfloat* params', }, |
409 { 'return_type': 'void', | 511 { 'return_type': 'void', |
410 'names': ['glGetTexParameteriv'], | 512 'names': ['glGetTexParameteriv'], |
(...skipping 26 matching lines...) Expand all Loading... |
437 { 'return_type': 'void', | 539 { 'return_type': 'void', |
438 'names': ['glInsertEventMarkerEXT'], | 540 'names': ['glInsertEventMarkerEXT'], |
439 'arguments': 'GLsizei length, const char* marker', }, | 541 'arguments': 'GLsizei length, const char* marker', }, |
440 { 'return_type': 'GLboolean', | 542 { 'return_type': 'GLboolean', |
441 'names': ['glIsBuffer'], | 543 'names': ['glIsBuffer'], |
442 'arguments': 'GLuint buffer', }, | 544 'arguments': 'GLuint buffer', }, |
443 { 'return_type': 'GLboolean', | 545 { 'return_type': 'GLboolean', |
444 'names': ['glIsEnabled'], | 546 'names': ['glIsEnabled'], |
445 'arguments': 'GLenum cap', }, | 547 'arguments': 'GLenum cap', }, |
446 { 'return_type': 'GLboolean', | 548 { 'return_type': 'GLboolean', |
| 549 'known_as': 'glIsFenceAPPLE', |
| 550 'versions': [{ 'name': 'glIsFenceAPPLE', |
| 551 'extensions': ['GL_APPLE_fence'] }], |
| 552 'arguments': 'GLuint fence', }, |
| 553 { 'return_type': 'GLboolean', |
| 554 'names': ['glIsFenceNV'], |
| 555 'arguments': 'GLuint fence', }, |
| 556 { 'return_type': 'GLboolean', |
447 'names': ['glIsFramebufferEXT', 'glIsFramebuffer'], | 557 'names': ['glIsFramebufferEXT', 'glIsFramebuffer'], |
448 'arguments': 'GLuint framebuffer', }, | 558 'arguments': 'GLuint framebuffer', }, |
449 { 'return_type': 'GLboolean', | 559 { 'return_type': 'GLboolean', |
450 'names': ['glIsProgram'], | 560 'names': ['glIsProgram'], |
451 'arguments': 'GLuint program', }, | 561 'arguments': 'GLuint program', }, |
452 { 'return_type': 'GLboolean', | 562 { 'return_type': 'GLboolean', |
453 'names': ['glIsQueryARB', 'glIsQueryEXT'], | 563 'names': ['glIsQueryARB', 'glIsQueryEXT'], |
454 'arguments': 'GLuint query', }, | 564 'arguments': 'GLuint query', }, |
455 { 'return_type': 'GLboolean', | 565 { 'return_type': 'GLboolean', |
456 'names': ['glIsRenderbufferEXT', 'glIsRenderbuffer'], | 566 'names': ['glIsRenderbufferEXT', 'glIsRenderbuffer'], |
457 'arguments': 'GLuint renderbuffer', }, | 567 'arguments': 'GLuint renderbuffer', }, |
458 { 'return_type': 'GLboolean', | 568 { 'return_type': 'GLboolean', |
459 'names': ['glIsShader'], | 569 'names': ['glIsShader'], |
460 'arguments': 'GLuint shader', }, | 570 'arguments': 'GLuint shader', }, |
461 { 'return_type': 'GLboolean', | 571 { 'return_type': 'GLboolean', |
| 572 'names': ['glIsSync'], |
| 573 'arguments': 'GLsync sync', }, |
| 574 { 'return_type': 'GLboolean', |
462 'names': ['glIsTexture'], | 575 'names': ['glIsTexture'], |
463 'arguments': 'GLuint texture', }, | 576 'arguments': 'GLuint texture', }, |
| 577 { 'return_type': 'GLboolean', |
| 578 'known_as': 'glIsVertexArrayOES', |
| 579 'versions': [{ 'name': 'glIsVertexArray', |
| 580 'gl_versions': ['gl3', 'gl4'] }, |
| 581 { 'name': 'glIsVertexArray', |
| 582 'extensions': ['GL_ARB_vertex_array_object'] }, |
| 583 { 'name': 'glIsVertexArrayOES' }, |
| 584 { 'name': 'glIsVertexArrayAPPLE', |
| 585 'extensions': ['GL_APPLE_vertex_array_object'] }], |
| 586 'arguments': 'GLuint array' }, |
464 { 'return_type': 'void', | 587 { 'return_type': 'void', |
465 'names': ['glLineWidth'], | 588 'names': ['glLineWidth'], |
466 'arguments': 'GLfloat width', }, | 589 'arguments': 'GLfloat width', }, |
467 { 'return_type': 'void', | 590 { 'return_type': 'void', |
468 'names': ['glLinkProgram'], | 591 'names': ['glLinkProgram'], |
469 'arguments': 'GLuint program', }, | 592 'arguments': 'GLuint program', }, |
470 { 'return_type': 'void*', | 593 { 'return_type': 'void*', |
471 'known_as': 'glMapBuffer', | 594 'known_as': 'glMapBuffer', |
472 'names': ['glMapBufferOES', 'glMapBuffer'], | 595 'names': ['glMapBufferOES', 'glMapBuffer'], |
473 'arguments': 'GLenum target, GLenum access', }, | 596 'arguments': 'GLenum target, GLenum access', }, |
474 { 'return_type': 'void*', | 597 { 'return_type': 'void*', |
475 'names': ['glMapBufferRange'], | 598 'names': ['glMapBufferRange'], |
476 'arguments': | 599 'arguments': |
477 'GLenum target, GLintptr offset, GLsizeiptr length, GLenum access', }, | 600 'GLenum target, GLintptr offset, GLsizeiptr length, GLenum access', }, |
478 { 'return_type': 'void', | 601 { 'return_type': 'void', |
479 'names': ['glFlushMappedBufferRange'], | 602 'known_as': 'glMatrixLoadfEXT', |
480 'arguments': 'GLenum target, GLintptr offset, GLsizeiptr length', }, | 603 'versions': [{ 'name': 'glMatrixLoadfEXT', |
| 604 'gl_versions': ['gl4'], |
| 605 'extensions': ['GL_EXT_direct_state_access'] }, |
| 606 { 'name': 'glMatrixLoadfEXT', |
| 607 'gl_versions': ['es3'], |
| 608 'extensions': ['GL_NV_path_rendering'] }], |
| 609 'arguments': 'GLenum matrixMode, const GLfloat* m' }, |
| 610 { 'return_type': 'void', |
| 611 'known_as': 'glMatrixLoadIdentityEXT', |
| 612 'versions': [{ 'name': 'glMatrixLoadIdentityEXT', |
| 613 'gl_versions': ['gl4'], |
| 614 'extensions': ['GL_EXT_direct_state_access'] }, |
| 615 { 'name': 'glMatrixLoadIdentityEXT', |
| 616 'gl_versions': ['es3'], |
| 617 'extensions': ['GL_NV_path_rendering'] }], |
| 618 'arguments': 'GLenum matrixMode' }, |
481 { 'return_type': 'void', | 619 { 'return_type': 'void', |
482 'names': ['glPixelStorei'], | 620 'names': ['glPixelStorei'], |
483 'arguments': 'GLenum pname, GLint param', }, | 621 'arguments': 'GLenum pname, GLint param', }, |
484 { 'return_type': 'void', | 622 { 'return_type': 'void', |
485 'names': ['glPointParameteri'], | 623 'names': ['glPointParameteri'], |
486 'arguments': 'GLenum pname, GLint param', }, | 624 'arguments': 'GLenum pname, GLint param', }, |
487 { 'return_type': 'void', | 625 { 'return_type': 'void', |
488 'names': ['glPolygonOffset'], | 626 'names': ['glPolygonOffset'], |
489 'arguments': 'GLfloat factor, GLfloat units', }, | 627 'arguments': 'GLfloat factor, GLfloat units', }, |
490 { 'return_type': 'void', | 628 { 'return_type': 'void', |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 # implementation, which require different use of the API and may have | 664 # implementation, which require different use of the API and may have |
527 # different performance (explicit resolve performing worse, for example). | 665 # different performance (explicit resolve performing worse, for example). |
528 # So even though the function signature is the same across versions, we split | 666 # So even though the function signature is the same across versions, we split |
529 # their definitions so that the function to use can be chosen correctly at a | 667 # their definitions so that the function to use can be chosen correctly at a |
530 # higher level. | 668 # higher level. |
531 # TODO(oetuaho@nvidia.com): Some of these might still be possible to combine. | 669 # TODO(oetuaho@nvidia.com): Some of these might still be possible to combine. |
532 # This could also fix weirdness in the mock bindings that's caused by the same | 670 # This could also fix weirdness in the mock bindings that's caused by the same |
533 # function name appearing multiple times. | 671 # function name appearing multiple times. |
534 # This is the ES3 function, which requires explicit resolve: | 672 # This is the ES3 function, which requires explicit resolve: |
535 { 'return_type': 'void', | 673 { 'return_type': 'void', |
| 674 'names': ['glRenderbufferStorageEXT', 'glRenderbufferStorage'], |
| 675 'arguments': |
| 676 'GLenum target, GLenum internalformat, GLsizei width, GLsizei height', }, |
| 677 { 'return_type': 'void', |
536 'names': ['glRenderbufferStorageMultisample'], | 678 'names': ['glRenderbufferStorageMultisample'], |
537 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' | 679 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' |
538 'GLsizei width, GLsizei height', }, | 680 'GLsizei width, GLsizei height', }, |
| 681 { 'return_type': 'void', |
| 682 'names': ['glRenderbufferStorageMultisampleANGLE', |
| 683 'glRenderbufferStorageMultisample'], |
| 684 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' |
| 685 'GLsizei width, GLsizei height', }, |
539 # In desktop GL, EXT and core versions both have an explicit resolve step, | 686 # In desktop GL, EXT and core versions both have an explicit resolve step, |
540 # though desktop core GL implicitly resolves when drawing to a window. | 687 # though desktop core GL implicitly resolves when drawing to a window. |
541 # TODO(oetuaho@nvidia.com): Right now this function also doubles as ES2 EXT | 688 # TODO(oetuaho@nvidia.com): Right now this function also doubles as ES2 EXT |
542 # function, which has implicit resolve, and for which the fallback is wrong. | 689 # function, which has implicit resolve, and for which the fallback is wrong. |
543 # Fix this. | 690 # Fix this. |
544 { 'return_type': 'void', | 691 { 'return_type': 'void', |
545 'names': ['glRenderbufferStorageMultisampleEXT', | 692 'names': ['glRenderbufferStorageMultisampleEXT', |
546 'glRenderbufferStorageMultisample'], | 693 'glRenderbufferStorageMultisample'], |
547 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' | 694 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' |
548 'GLsizei width, GLsizei height', }, | 695 'GLsizei width, GLsizei height', }, |
549 { 'return_type': 'void', | 696 { 'return_type': 'void', |
550 'names': ['glRenderbufferStorageMultisampleANGLE', | |
551 'glRenderbufferStorageMultisample'], | |
552 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' | |
553 'GLsizei width, GLsizei height', }, | |
554 { 'return_type': 'void', | |
555 'names': ['glRenderbufferStorageMultisampleIMG'], | 697 'names': ['glRenderbufferStorageMultisampleIMG'], |
556 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' | 698 'arguments': 'GLenum target, GLsizei samples, GLenum internalformat, ' |
557 'GLsizei width, GLsizei height', }, | 699 'GLsizei width, GLsizei height', }, |
558 { 'return_type': 'void', | 700 { 'return_type': 'void', |
559 'names': ['glRenderbufferStorageEXT', 'glRenderbufferStorage'], | |
560 'arguments': | |
561 'GLenum target, GLenum internalformat, GLsizei width, GLsizei height', }, | |
562 { 'return_type': 'void', | |
563 'names': ['glSampleCoverage'], | 701 'names': ['glSampleCoverage'], |
564 'arguments': 'GLclampf value, GLboolean invert', }, | 702 'arguments': 'GLclampf value, GLboolean invert', }, |
565 { 'return_type': 'void', | 703 { 'return_type': 'void', |
566 'names': ['glScissor'], | 704 'names': ['glScissor'], |
567 'arguments': 'GLint x, GLint y, GLsizei width, GLsizei height', }, | 705 'arguments': 'GLint x, GLint y, GLsizei width, GLsizei height', }, |
568 { 'return_type': 'void', | 706 { 'return_type': 'void', |
| 707 'known_as': 'glSetFenceAPPLE', |
| 708 'versions': [{ 'name': 'glSetFenceAPPLE', |
| 709 'extensions': ['GL_APPLE_fence'] }], |
| 710 'arguments': 'GLuint fence', }, |
| 711 { 'return_type': 'void', |
| 712 'names': ['glSetFenceNV'], |
| 713 'arguments': 'GLuint fence, GLenum condition', }, |
| 714 { 'return_type': 'void', |
569 'names': ['glShaderBinary'], | 715 'names': ['glShaderBinary'], |
570 'arguments': 'GLsizei n, const GLuint* shaders, GLenum binaryformat, ' | 716 'arguments': 'GLsizei n, const GLuint* shaders, GLenum binaryformat, ' |
571 'const void* binary, GLsizei length', }, | 717 'const void* binary, GLsizei length', }, |
572 { 'return_type': 'void', | 718 { 'return_type': 'void', |
573 'names': ['glShaderSource'], | 719 'names': ['glShaderSource'], |
574 'arguments': 'GLuint shader, GLsizei count, const char* const* str, ' | 720 'arguments': 'GLuint shader, GLsizei count, const char* const* str, ' |
575 'const GLint* length', | 721 'const GLint* length', |
576 'logging_code': """ | 722 'logging_code': """ |
577 GL_SERVICE_LOG_CODE_BLOCK({ | 723 GL_SERVICE_LOG_CODE_BLOCK({ |
578 for (GLsizei ii = 0; ii < count; ++ii) { | 724 for (GLsizei ii = 0; ii < count; ++ii) { |
(...skipping 21 matching lines...) Expand all Loading... |
600 'arguments': 'GLuint mask', }, | 746 'arguments': 'GLuint mask', }, |
601 { 'return_type': 'void', | 747 { 'return_type': 'void', |
602 'names': ['glStencilMaskSeparate'], | 748 'names': ['glStencilMaskSeparate'], |
603 'arguments': 'GLenum face, GLuint mask', }, | 749 'arguments': 'GLenum face, GLuint mask', }, |
604 { 'return_type': 'void', | 750 { 'return_type': 'void', |
605 'names': ['glStencilOp'], | 751 'names': ['glStencilOp'], |
606 'arguments': 'GLenum fail, GLenum zfail, GLenum zpass', }, | 752 'arguments': 'GLenum fail, GLenum zfail, GLenum zpass', }, |
607 { 'return_type': 'void', | 753 { 'return_type': 'void', |
608 'names': ['glStencilOpSeparate'], | 754 'names': ['glStencilOpSeparate'], |
609 'arguments': 'GLenum face, GLenum fail, GLenum zfail, GLenum zpass', }, | 755 'arguments': 'GLenum face, GLenum fail, GLenum zfail, GLenum zpass', }, |
| 756 { 'return_type': 'GLboolean', |
| 757 'known_as': 'glTestFenceAPPLE', |
| 758 'versions': [{ 'name': 'glTestFenceAPPLE', |
| 759 'extensions': ['GL_APPLE_fence'] }], |
| 760 'arguments': 'GLuint fence', }, |
| 761 { 'return_type': 'GLboolean', |
| 762 'names': ['glTestFenceNV'], |
| 763 'arguments': 'GLuint fence', }, |
610 { 'return_type': 'void', | 764 { 'return_type': 'void', |
611 'names': ['glTexImage2D'], | 765 'names': ['glTexImage2D'], |
612 'arguments': | 766 'arguments': |
613 'GLenum target, GLint level, GLint internalformat, GLsizei width, ' | 767 'GLenum target, GLint level, GLint internalformat, GLsizei width, ' |
614 'GLsizei height, GLint border, GLenum format, GLenum type, ' | 768 'GLsizei height, GLint border, GLenum format, GLenum type, ' |
615 'const void* pixels', }, | 769 'const void* pixels', }, |
616 { 'return_type': 'void', | 770 { 'return_type': 'void', |
617 'names': ['glTexParameterf'], | 771 'names': ['glTexParameterf'], |
618 'arguments': 'GLenum target, GLenum pname, GLfloat param', }, | 772 'arguments': 'GLenum target, GLenum pname, GLfloat param', }, |
619 { 'return_type': 'void', | 773 { 'return_type': 'void', |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 { 'return_type': 'void', | 883 { 'return_type': 'void', |
730 'names': ['glVertexAttrib3fv'], | 884 'names': ['glVertexAttrib3fv'], |
731 'arguments': 'GLuint indx, const GLfloat* values', }, | 885 'arguments': 'GLuint indx, const GLfloat* values', }, |
732 { 'return_type': 'void', | 886 { 'return_type': 'void', |
733 'names': ['glVertexAttrib4f'], | 887 'names': ['glVertexAttrib4f'], |
734 'arguments': 'GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w', }, | 888 'arguments': 'GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w', }, |
735 { 'return_type': 'void', | 889 { 'return_type': 'void', |
736 'names': ['glVertexAttrib4fv'], | 890 'names': ['glVertexAttrib4fv'], |
737 'arguments': 'GLuint indx, const GLfloat* values', }, | 891 'arguments': 'GLuint indx, const GLfloat* values', }, |
738 { 'return_type': 'void', | 892 { 'return_type': 'void', |
| 893 'known_as': 'glVertexAttribDivisorANGLE', |
| 894 'names': ['glVertexAttribDivisorARB', 'glVertexAttribDivisorANGLE', |
| 895 'glVertexAttribDivisor'], |
| 896 'arguments': |
| 897 'GLuint index, GLuint divisor', }, |
| 898 { 'return_type': 'void', |
739 'names': ['glVertexAttribPointer'], | 899 'names': ['glVertexAttribPointer'], |
740 'arguments': 'GLuint indx, GLint size, GLenum type, GLboolean normalized, ' | 900 'arguments': 'GLuint indx, GLint size, GLenum type, GLboolean normalized, ' |
741 'GLsizei stride, const void* ptr', }, | 901 'GLsizei stride, const void* ptr', }, |
742 { 'return_type': 'void', | 902 { 'return_type': 'void', |
743 'names': ['glViewport'], | 903 'names': ['glViewport'], |
744 'arguments': 'GLint x, GLint y, GLsizei width, GLsizei height', }, | 904 'arguments': 'GLint x, GLint y, GLsizei width, GLsizei height', }, |
745 { 'return_type': 'void', | |
746 'names': ['glGenFencesNV'], | |
747 'arguments': 'GLsizei n, GLuint* fences', }, | |
748 { 'return_type': 'void', | |
749 'names': ['glDeleteFencesNV'], | |
750 'arguments': 'GLsizei n, const GLuint* fences', }, | |
751 { 'return_type': 'void', | |
752 'names': ['glSetFenceNV'], | |
753 'arguments': 'GLuint fence, GLenum condition', }, | |
754 { 'return_type': 'GLboolean', | |
755 'names': ['glTestFenceNV'], | |
756 'arguments': 'GLuint fence', }, | |
757 { 'return_type': 'void', | |
758 'names': ['glFinishFenceNV'], | |
759 'arguments': 'GLuint fence', }, | |
760 { 'return_type': 'GLboolean', | |
761 'names': ['glIsFenceNV'], | |
762 'arguments': 'GLuint fence', }, | |
763 { 'return_type': 'void', | |
764 'names': ['glGetFenceivNV'], | |
765 'arguments': 'GLuint fence, GLenum pname, GLint* params', }, | |
766 { 'return_type': 'GLsync', | |
767 'names': ['glFenceSync'], | |
768 'arguments': 'GLenum condition, GLbitfield flags', }, | |
769 { 'return_type': 'GLboolean', | |
770 'names': ['glIsSync'], | |
771 'arguments': 'GLsync sync', }, | |
772 { 'return_type': 'void', | |
773 'names': ['glDeleteSync'], | |
774 'arguments': 'GLsync sync', }, | |
775 { 'return_type': 'void', | |
776 'names': ['glGetSynciv'], | |
777 'arguments': | |
778 'GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length,' | |
779 'GLint* values', }, | |
780 { 'return_type': 'GLenum', | |
781 'names': ['glClientWaitSync'], | |
782 'arguments': | |
783 'GLsync sync, GLbitfield flags, GLuint64 timeout', }, | |
784 { 'return_type': 'GLenum', | 905 { 'return_type': 'GLenum', |
785 'names': ['glWaitSync'], | 906 'names': ['glWaitSync'], |
786 'arguments': | 907 'arguments': |
787 'GLsync sync, GLbitfield flags, GLuint64 timeout', }, | 908 'GLsync sync, GLbitfield flags, GLuint64 timeout', }, |
788 { 'return_type': 'void', | |
789 'known_as': 'glDrawArraysInstancedANGLE', | |
790 'names': ['glDrawArraysInstancedARB', 'glDrawArraysInstancedANGLE', | |
791 'glDrawArraysInstanced'], | |
792 'arguments': 'GLenum mode, GLint first, GLsizei count, GLsizei primcount', }, | |
793 { 'return_type': 'void', | |
794 'known_as': 'glDrawElementsInstancedANGLE', | |
795 'names': ['glDrawElementsInstancedARB', 'glDrawElementsInstancedANGLE', | |
796 'glDrawElementsInstanced'], | |
797 'arguments': | |
798 'GLenum mode, GLsizei count, GLenum type, const void* indices, ' | |
799 'GLsizei primcount', }, | |
800 { 'return_type': 'void', | |
801 'known_as': 'glVertexAttribDivisorANGLE', | |
802 'names': ['glVertexAttribDivisorARB', 'glVertexAttribDivisorANGLE', | |
803 'glVertexAttribDivisor'], | |
804 'arguments': | |
805 'GLuint index, GLuint divisor', }, | |
806 { 'return_type': 'void', | |
807 'known_as': 'glGenVertexArraysOES', | |
808 'versions': [{ 'name': 'glGenVertexArrays', | |
809 'gl_versions': ['gl3', 'gl4', 'es3'] }, | |
810 { 'name': 'glGenVertexArrays', | |
811 'extensions': ['GL_ARB_vertex_array_object'] }, | |
812 { 'name': 'glGenVertexArraysOES' }, | |
813 { 'name': 'glGenVertexArraysAPPLE', | |
814 'extensions': ['GL_APPLE_vertex_array_object'] }], | |
815 'arguments': 'GLsizei n, GLuint* arrays', }, | |
816 { 'return_type': 'void', | |
817 'known_as': 'glDeleteVertexArraysOES', | |
818 'versions': [{ 'name': 'glDeleteVertexArrays', | |
819 'gl_versions': ['gl3', 'gl4', 'es3'] }, | |
820 { 'name': 'glDeleteVertexArrays', | |
821 'extensions': ['GL_ARB_vertex_array_object'] }, | |
822 { 'name': 'glDeleteVertexArraysOES' }, | |
823 { 'name': 'glDeleteVertexArraysAPPLE', | |
824 'extensions': ['GL_APPLE_vertex_array_object'] }], | |
825 'arguments': 'GLsizei n, const GLuint* arrays' }, | |
826 { 'return_type': 'void', | |
827 'known_as': 'glBindVertexArrayOES', | |
828 'versions': [{ 'name': 'glBindVertexArray', | |
829 'gl_versions': ['gl3', 'gl4', 'es3'] }, | |
830 { 'name': 'glBindVertexArray', | |
831 'extensions': ['GL_ARB_vertex_array_object'] }, | |
832 { 'name': 'glBindVertexArrayOES' }, | |
833 { 'name': 'glBindVertexArrayAPPLE', | |
834 'extensions': ['GL_APPLE_vertex_array_object'] }], | |
835 'arguments': 'GLuint array' }, | |
836 { 'return_type': 'GLboolean', | |
837 'known_as': 'glIsVertexArrayOES', | |
838 'versions': [{ 'name': 'glIsVertexArray', | |
839 'gl_versions': ['gl3', 'gl4'] }, | |
840 { 'name': 'glIsVertexArray', | |
841 'extensions': ['GL_ARB_vertex_array_object'] }, | |
842 { 'name': 'glIsVertexArrayOES' }, | |
843 { 'name': 'glIsVertexArrayAPPLE', | |
844 'extensions': ['GL_APPLE_vertex_array_object'] }], | |
845 'arguments': 'GLuint array' }, | |
846 { 'return_type': 'void', | |
847 'known_as': 'glDiscardFramebufferEXT', | |
848 'versions': [{ 'name': 'glInvalidateFramebuffer', | |
849 'gl_versions': ['es3'], | |
850 'extensions': [] }, | |
851 { 'name': 'glDiscardFramebufferEXT', | |
852 'gl_versions': ['es1', 'es2'] }], | |
853 'arguments': 'GLenum target, GLsizei numAttachments, ' | |
854 'const GLenum* attachments' }, | |
855 { 'return_type': 'void', | |
856 'known_as': 'glMatrixLoadfEXT', | |
857 'versions': [{ 'name': 'glMatrixLoadfEXT', | |
858 'gl_versions': ['gl4'], | |
859 'extensions': ['GL_EXT_direct_state_access'] }, | |
860 { 'name': 'glMatrixLoadfEXT', | |
861 'gl_versions': ['es3'], | |
862 'extensions': ['GL_NV_path_rendering'] }], | |
863 'arguments': 'GLenum matrixMode, const GLfloat* m' }, | |
864 { 'return_type': 'void', | |
865 'known_as': 'glMatrixLoadIdentityEXT', | |
866 'versions': [{ 'name': 'glMatrixLoadIdentityEXT', | |
867 'gl_versions': ['gl4'], | |
868 'extensions': ['GL_EXT_direct_state_access'] }, | |
869 { 'name': 'glMatrixLoadIdentityEXT', | |
870 'gl_versions': ['es3'], | |
871 'extensions': ['GL_NV_path_rendering'] }], | |
872 'arguments': 'GLenum matrixMode' }, | |
873 { 'return_type': 'void', | |
874 'known_as': 'glBlendBarrierKHR', | |
875 'versions': [{ 'name': 'glBlendBarrierNV', | |
876 'extensions': ['GL_NV_blend_equation_advanced'] }, | |
877 { 'name': 'glBlendBarrierKHR', | |
878 'extensions': ['GL_KHR_blend_equation_advanced'] }], | |
879 'arguments': 'void' }, | |
880 ] | 909 ] |
881 | 910 |
882 OSMESA_FUNCTIONS = [ | 911 OSMESA_FUNCTIONS = [ |
| 912 { 'return_type': 'void', |
| 913 'names': ['OSMesaColorClamp'], |
| 914 'arguments': 'GLboolean enable', }, |
883 { 'return_type': 'OSMesaContext', | 915 { 'return_type': 'OSMesaContext', |
884 'names': ['OSMesaCreateContext'], | 916 'names': ['OSMesaCreateContext'], |
885 'arguments': 'GLenum format, OSMesaContext sharelist', }, | 917 'arguments': 'GLenum format, OSMesaContext sharelist', }, |
886 { 'return_type': 'OSMesaContext', | 918 { 'return_type': 'OSMesaContext', |
887 'names': ['OSMesaCreateContextExt'], | 919 'names': ['OSMesaCreateContextExt'], |
888 'arguments': | 920 'arguments': |
889 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, ' | 921 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, ' |
890 'OSMesaContext sharelist', }, | 922 'OSMesaContext sharelist', }, |
891 { 'return_type': 'void', | 923 { 'return_type': 'void', |
892 'names': ['OSMesaDestroyContext'], | 924 'names': ['OSMesaDestroyContext'], |
893 'arguments': 'OSMesaContext ctx', }, | 925 'arguments': 'OSMesaContext ctx', }, |
894 { 'return_type': 'GLboolean', | 926 { 'return_type': 'GLboolean', |
895 'names': ['OSMesaMakeCurrent'], | 927 'names': ['OSMesaGetColorBuffer'], |
896 'arguments': 'OSMesaContext ctx, void* buffer, GLenum type, GLsizei width, ' | 928 'arguments': 'OSMesaContext c, GLint* width, GLint* height, GLint* format, ' |
897 'GLsizei height', }, | 929 'void** buffer', }, |
898 { 'return_type': 'OSMesaContext', | 930 { 'return_type': 'OSMesaContext', |
899 'names': ['OSMesaGetCurrentContext'], | 931 'names': ['OSMesaGetCurrentContext'], |
900 'arguments': 'void', }, | 932 'arguments': 'void', }, |
901 { 'return_type': 'void', | |
902 'names': ['OSMesaPixelStore'], | |
903 'arguments': 'GLint pname, GLint value', }, | |
904 { 'return_type': 'void', | |
905 'names': ['OSMesaGetIntegerv'], | |
906 'arguments': 'GLint pname, GLint* value', }, | |
907 { 'return_type': 'GLboolean', | 933 { 'return_type': 'GLboolean', |
908 'names': ['OSMesaGetDepthBuffer'], | 934 'names': ['OSMesaGetDepthBuffer'], |
909 'arguments': | 935 'arguments': |
910 'OSMesaContext c, GLint* width, GLint* height, GLint* bytesPerValue, ' | 936 'OSMesaContext c, GLint* width, GLint* height, GLint* bytesPerValue, ' |
911 'void** buffer', }, | 937 'void** buffer', }, |
912 { 'return_type': 'GLboolean', | 938 { 'return_type': 'void', |
913 'names': ['OSMesaGetColorBuffer'], | 939 'names': ['OSMesaGetIntegerv'], |
914 'arguments': 'OSMesaContext c, GLint* width, GLint* height, GLint* format, ' | 940 'arguments': 'GLint pname, GLint* value', }, |
915 'void** buffer', }, | |
916 { 'return_type': 'OSMESAproc', | 941 { 'return_type': 'OSMESAproc', |
917 'names': ['OSMesaGetProcAddress'], | 942 'names': ['OSMesaGetProcAddress'], |
918 'arguments': 'const char* funcName', }, | 943 'arguments': 'const char* funcName', }, |
| 944 { 'return_type': 'GLboolean', |
| 945 'names': ['OSMesaMakeCurrent'], |
| 946 'arguments': 'OSMesaContext ctx, void* buffer, GLenum type, GLsizei width, ' |
| 947 'GLsizei height', }, |
919 { 'return_type': 'void', | 948 { 'return_type': 'void', |
920 'names': ['OSMesaColorClamp'], | 949 'names': ['OSMesaPixelStore'], |
921 'arguments': 'GLboolean enable', }, | 950 'arguments': 'GLint pname, GLint value', }, |
922 ] | 951 ] |
923 | 952 |
924 EGL_FUNCTIONS = [ | 953 EGL_FUNCTIONS = [ |
925 { 'return_type': 'EGLint', | |
926 'names': ['eglGetError'], | |
927 'arguments': 'void', }, | |
928 { 'return_type': 'EGLDisplay', | |
929 'names': ['eglGetDisplay'], | |
930 'arguments': 'EGLNativeDisplayType display_id', }, | |
931 { 'return_type': 'EGLDisplay', | |
932 'known_as': 'eglGetPlatformDisplayEXT', | |
933 'versions': [{ 'name': 'eglGetPlatformDisplayEXT', | |
934 'extensions': ['EGL_ANGLE_platform_angle'] }], | |
935 'arguments': 'EGLenum platform, void* native_display, ' | |
936 'const EGLint* attrib_list', }, | |
937 { 'return_type': 'EGLBoolean', | 954 { 'return_type': 'EGLBoolean', |
938 'names': ['eglInitialize'], | 955 'names': ['eglBindAPI'], |
939 'arguments': 'EGLDisplay dpy, EGLint* major, EGLint* minor', }, | 956 'arguments': 'EGLenum api', }, |
940 { 'return_type': 'EGLBoolean', | 957 { 'return_type': 'EGLBoolean', |
941 'names': ['eglTerminate'], | 958 'names': ['eglBindTexImage'], |
942 'arguments': 'EGLDisplay dpy', }, | 959 'arguments': 'EGLDisplay dpy, EGLSurface surface, EGLint buffer', }, |
943 { 'return_type': 'const char*', | |
944 'names': ['eglQueryString'], | |
945 'arguments': 'EGLDisplay dpy, EGLint name', }, | |
946 { 'return_type': 'EGLBoolean', | |
947 'names': ['eglGetConfigs'], | |
948 'arguments': 'EGLDisplay dpy, EGLConfig* configs, EGLint config_size, ' | |
949 'EGLint* num_config', }, | |
950 { 'return_type': 'EGLBoolean', | 960 { 'return_type': 'EGLBoolean', |
951 'names': ['eglChooseConfig'], | 961 'names': ['eglChooseConfig'], |
952 'arguments': 'EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, ' | 962 'arguments': 'EGLDisplay dpy, const EGLint* attrib_list, EGLConfig* configs, ' |
953 'EGLint config_size, EGLint* num_config', }, | 963 'EGLint config_size, EGLint* num_config', }, |
| 964 { 'return_type': 'EGLint', |
| 965 'versions': [{ 'name': 'eglClientWaitSyncKHR', |
| 966 'extensions': ['EGL_KHR_fence_sync'] }], |
| 967 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, ' |
| 968 'EGLTimeKHR timeout' }, |
954 { 'return_type': 'EGLBoolean', | 969 { 'return_type': 'EGLBoolean', |
955 'names': ['eglGetConfigAttrib'], | 970 'names': ['eglCopyBuffers'], |
956 'arguments': | 971 'arguments': |
957 'EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value', }, | 972 'EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target', }, |
| 973 { 'return_type': 'EGLContext', |
| 974 'names': ['eglCreateContext'], |
| 975 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLContext share_context, ' |
| 976 'const EGLint* attrib_list', }, |
958 { 'return_type': 'EGLImageKHR', | 977 { 'return_type': 'EGLImageKHR', |
959 'versions': [{ 'name': 'eglCreateImageKHR', | 978 'versions': [{ 'name': 'eglCreateImageKHR', |
960 'extensions': | 979 'extensions': |
961 ['EGL_KHR_image_base', 'EGL_KHR_gl_texture_2D_image'] }], | 980 ['EGL_KHR_image_base', 'EGL_KHR_gl_texture_2D_image'] }], |
962 'arguments': | 981 'arguments': |
963 'EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, ' | 982 'EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, ' |
964 'const EGLint* attrib_list' }, | 983 'const EGLint* attrib_list' }, |
965 { 'return_type': 'EGLBoolean', | |
966 'versions': [{ 'name' : 'eglDestroyImageKHR', | |
967 'extensions': ['EGL_KHR_image_base'] }], | |
968 'arguments': 'EGLDisplay dpy, EGLImageKHR image' }, | |
969 { 'return_type': 'EGLSurface', | 984 { 'return_type': 'EGLSurface', |
970 'names': ['eglCreateWindowSurface'], | 985 'names': ['eglCreatePbufferFromClientBuffer'], |
971 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, ' | 986 'arguments': |
972 'const EGLint* attrib_list', }, | 987 'EGLDisplay dpy, EGLenum buftype, void* buffer, EGLConfig config, ' |
| 988 'const EGLint* attrib_list', }, |
973 { 'return_type': 'EGLSurface', | 989 { 'return_type': 'EGLSurface', |
974 'names': ['eglCreatePbufferSurface'], | 990 'names': ['eglCreatePbufferSurface'], |
975 'arguments': 'EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list', }, | 991 'arguments': 'EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list', }, |
976 { 'return_type': 'EGLSurface', | 992 { 'return_type': 'EGLSurface', |
977 'names': ['eglCreatePixmapSurface'], | 993 'names': ['eglCreatePixmapSurface'], |
978 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, ' | 994 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, ' |
979 'const EGLint* attrib_list', }, | 995 'const EGLint* attrib_list', }, |
| 996 { 'return_type': 'EGLSyncKHR', |
| 997 'versions': [{ 'name': 'eglCreateSyncKHR', |
| 998 'extensions': ['EGL_KHR_fence_sync'] }], |
| 999 'arguments': 'EGLDisplay dpy, EGLenum type, const EGLint* attrib_list' }, |
| 1000 { 'return_type': 'EGLSurface', |
| 1001 'names': ['eglCreateWindowSurface'], |
| 1002 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, ' |
| 1003 'const EGLint* attrib_list', }, |
| 1004 { 'return_type': 'EGLBoolean', |
| 1005 'names': ['eglDestroyContext'], |
| 1006 'arguments': 'EGLDisplay dpy, EGLContext ctx', }, |
| 1007 { 'return_type': 'EGLBoolean', |
| 1008 'versions': [{ 'name' : 'eglDestroyImageKHR', |
| 1009 'extensions': ['EGL_KHR_image_base'] }], |
| 1010 'arguments': 'EGLDisplay dpy, EGLImageKHR image' }, |
980 { 'return_type': 'EGLBoolean', | 1011 { 'return_type': 'EGLBoolean', |
981 'names': ['eglDestroySurface'], | 1012 'names': ['eglDestroySurface'], |
982 'arguments': 'EGLDisplay dpy, EGLSurface surface', }, | 1013 'arguments': 'EGLDisplay dpy, EGLSurface surface', }, |
983 { 'return_type': 'EGLBoolean', | 1014 { 'return_type': 'EGLBoolean', |
984 'names': ['eglQuerySurface'], | 1015 'versions': [{ 'name': 'eglDestroySyncKHR', |
985 'arguments': | 1016 'extensions': ['EGL_KHR_fence_sync'] }], |
986 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value', }, | 1017 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync' }, |
987 { 'return_type': 'EGLBoolean', | 1018 { 'return_type': 'EGLBoolean', |
988 'names': ['eglBindAPI'], | 1019 'names': ['eglGetConfigAttrib'], |
989 'arguments': 'EGLenum api', }, | 1020 'arguments': |
990 { 'return_type': 'EGLenum', | 1021 'EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value', }, |
991 'names': ['eglQueryAPI'], | 1022 { 'return_type': 'EGLBoolean', |
992 'arguments': 'void', }, | 1023 'names': ['eglGetConfigs'], |
993 { 'return_type': 'EGLBoolean', | 1024 'arguments': 'EGLDisplay dpy, EGLConfig* configs, EGLint config_size, ' |
994 'names': ['eglWaitClient'], | 1025 'EGLint* num_config', }, |
995 'arguments': 'void', }, | |
996 { 'return_type': 'EGLBoolean', | |
997 'names': ['eglReleaseThread'], | |
998 'arguments': 'void', }, | |
999 { 'return_type': 'EGLSurface', | |
1000 'names': ['eglCreatePbufferFromClientBuffer'], | |
1001 'arguments': | |
1002 'EGLDisplay dpy, EGLenum buftype, void* buffer, EGLConfig config, ' | |
1003 'const EGLint* attrib_list', }, | |
1004 { 'return_type': 'EGLBoolean', | |
1005 'names': ['eglSurfaceAttrib'], | |
1006 'arguments': | |
1007 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value', }, | |
1008 { 'return_type': 'EGLBoolean', | |
1009 'names': ['eglBindTexImage'], | |
1010 'arguments': 'EGLDisplay dpy, EGLSurface surface, EGLint buffer', }, | |
1011 { 'return_type': 'EGLBoolean', | |
1012 'names': ['eglReleaseTexImage'], | |
1013 'arguments': 'EGLDisplay dpy, EGLSurface surface, EGLint buffer', }, | |
1014 { 'return_type': 'EGLBoolean', | |
1015 'names': ['eglSwapInterval'], | |
1016 'arguments': 'EGLDisplay dpy, EGLint interval', }, | |
1017 { 'return_type': 'EGLContext', | |
1018 'names': ['eglCreateContext'], | |
1019 'arguments': 'EGLDisplay dpy, EGLConfig config, EGLContext share_context, ' | |
1020 'const EGLint* attrib_list', }, | |
1021 { 'return_type': 'EGLBoolean', | |
1022 'names': ['eglDestroyContext'], | |
1023 'arguments': 'EGLDisplay dpy, EGLContext ctx', }, | |
1024 { 'return_type': 'EGLBoolean', | |
1025 'names': ['eglMakeCurrent'], | |
1026 'arguments': | |
1027 'EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx', }, | |
1028 { 'return_type': 'EGLContext', | 1026 { 'return_type': 'EGLContext', |
1029 'names': ['eglGetCurrentContext'], | 1027 'names': ['eglGetCurrentContext'], |
1030 'arguments': 'void', }, | 1028 'arguments': 'void', }, |
| 1029 { 'return_type': 'EGLDisplay', |
| 1030 'names': ['eglGetCurrentDisplay'], |
| 1031 'arguments': 'void', }, |
1031 { 'return_type': 'EGLSurface', | 1032 { 'return_type': 'EGLSurface', |
1032 'names': ['eglGetCurrentSurface'], | 1033 'names': ['eglGetCurrentSurface'], |
1033 'arguments': 'EGLint readdraw', }, | 1034 'arguments': 'EGLint readdraw', }, |
1034 { 'return_type': 'EGLDisplay', | 1035 { 'return_type': 'EGLDisplay', |
1035 'names': ['eglGetCurrentDisplay'], | 1036 'names': ['eglGetDisplay'], |
1036 'arguments': 'void', }, | 1037 'arguments': 'EGLNativeDisplayType display_id', }, |
1037 { 'return_type': 'EGLBoolean', | 1038 { 'return_type': 'EGLint', |
1038 'names': ['eglQueryContext'], | 1039 'names': ['eglGetError'], |
1039 'arguments': | 1040 'arguments': 'void', }, |
1040 'EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value', }, | 1041 { 'return_type': 'EGLDisplay', |
1041 { 'return_type': 'EGLBoolean', | 1042 'known_as': 'eglGetPlatformDisplayEXT', |
1042 'names': ['eglWaitGL'], | 1043 'versions': [{ 'name': 'eglGetPlatformDisplayEXT', |
1043 'arguments': 'void', }, | 1044 'extensions': ['EGL_ANGLE_platform_angle'] }], |
1044 { 'return_type': 'EGLBoolean', | 1045 'arguments': 'EGLenum platform, void* native_display, ' |
1045 'names': ['eglWaitNative'], | 1046 'const EGLint* attrib_list', }, |
1046 'arguments': 'EGLint engine', }, | |
1047 { 'return_type': 'EGLBoolean', | |
1048 'names': ['eglSwapBuffers'], | |
1049 'arguments': 'EGLDisplay dpy, EGLSurface surface', }, | |
1050 { 'return_type': 'EGLBoolean', | |
1051 'names': ['eglCopyBuffers'], | |
1052 'arguments': | |
1053 'EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target', }, | |
1054 { 'return_type': '__eglMustCastToProperFunctionPointerType', | 1047 { 'return_type': '__eglMustCastToProperFunctionPointerType', |
1055 'names': ['eglGetProcAddress'], | 1048 'names': ['eglGetProcAddress'], |
1056 'arguments': 'const char* procname', }, | 1049 'arguments': 'const char* procname', }, |
1057 { 'return_type': 'EGLBoolean', | 1050 { 'return_type': 'EGLBoolean', |
1058 'names': ['eglPostSubBufferNV'], | |
1059 'arguments': 'EGLDisplay dpy, EGLSurface surface, ' | |
1060 'EGLint x, EGLint y, EGLint width, EGLint height', }, | |
1061 { 'return_type': 'EGLBoolean', | |
1062 'names': ['eglQuerySurfacePointerANGLE'], | |
1063 'arguments': | |
1064 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value', }, | |
1065 { 'return_type': 'EGLSyncKHR', | |
1066 'versions': [{ 'name': 'eglCreateSyncKHR', | |
1067 'extensions': ['EGL_KHR_fence_sync'] }], | |
1068 'arguments': 'EGLDisplay dpy, EGLenum type, const EGLint* attrib_list' }, | |
1069 { 'return_type': 'EGLint', | |
1070 'versions': [{ 'name': 'eglClientWaitSyncKHR', | |
1071 'extensions': ['EGL_KHR_fence_sync'] }], | |
1072 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, ' | |
1073 'EGLTimeKHR timeout' }, | |
1074 { 'return_type': 'EGLBoolean', | |
1075 'versions': [{ 'name': 'eglGetSyncAttribKHR', | 1051 'versions': [{ 'name': 'eglGetSyncAttribKHR', |
1076 'extensions': ['EGL_KHR_fence_sync'] }], | 1052 'extensions': ['EGL_KHR_fence_sync'] }], |
1077 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, ' | 1053 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, ' |
1078 'EGLint* value' }, | 1054 'EGLint* value' }, |
1079 { 'return_type': 'EGLBoolean', | 1055 { 'return_type': 'EGLBoolean', |
1080 'versions': [{ 'name': 'eglDestroySyncKHR', | |
1081 'extensions': ['EGL_KHR_fence_sync'] }], | |
1082 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync' }, | |
1083 { 'return_type': 'EGLBoolean', | |
1084 'names': ['eglGetSyncValuesCHROMIUM'], | 1056 'names': ['eglGetSyncValuesCHROMIUM'], |
1085 'arguments': | 1057 'arguments': |
1086 'EGLDisplay dpy, EGLSurface surface, ' | 1058 'EGLDisplay dpy, EGLSurface surface, ' |
1087 'EGLuint64CHROMIUM* ust, EGLuint64CHROMIUM* msc, ' | 1059 'EGLuint64CHROMIUM* ust, EGLuint64CHROMIUM* msc, ' |
1088 'EGLuint64CHROMIUM* sbc', }, | 1060 'EGLuint64CHROMIUM* sbc', }, |
| 1061 { 'return_type': 'EGLBoolean', |
| 1062 'names': ['eglInitialize'], |
| 1063 'arguments': 'EGLDisplay dpy, EGLint* major, EGLint* minor', }, |
| 1064 { 'return_type': 'EGLBoolean', |
| 1065 'names': ['eglMakeCurrent'], |
| 1066 'arguments': |
| 1067 'EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx', }, |
| 1068 { 'return_type': 'EGLBoolean', |
| 1069 'names': ['eglPostSubBufferNV'], |
| 1070 'arguments': 'EGLDisplay dpy, EGLSurface surface, ' |
| 1071 'EGLint x, EGLint y, EGLint width, EGLint height', }, |
| 1072 { 'return_type': 'EGLenum', |
| 1073 'names': ['eglQueryAPI'], |
| 1074 'arguments': 'void', }, |
| 1075 { 'return_type': 'EGLBoolean', |
| 1076 'names': ['eglQueryContext'], |
| 1077 'arguments': |
| 1078 'EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value', }, |
| 1079 { 'return_type': 'const char*', |
| 1080 'names': ['eglQueryString'], |
| 1081 'arguments': 'EGLDisplay dpy, EGLint name', }, |
| 1082 { 'return_type': 'EGLBoolean', |
| 1083 'names': ['eglQuerySurface'], |
| 1084 'arguments': |
| 1085 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint* value', }, |
| 1086 { 'return_type': 'EGLBoolean', |
| 1087 'names': ['eglQuerySurfacePointerANGLE'], |
| 1088 'arguments': |
| 1089 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value', }, |
| 1090 { 'return_type': 'EGLBoolean', |
| 1091 'names': ['eglReleaseTexImage'], |
| 1092 'arguments': 'EGLDisplay dpy, EGLSurface surface, EGLint buffer', }, |
| 1093 { 'return_type': 'EGLBoolean', |
| 1094 'names': ['eglReleaseThread'], |
| 1095 'arguments': 'void', }, |
| 1096 { 'return_type': 'EGLBoolean', |
| 1097 'names': ['eglSurfaceAttrib'], |
| 1098 'arguments': |
| 1099 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value', }, |
| 1100 { 'return_type': 'EGLBoolean', |
| 1101 'names': ['eglSwapBuffers'], |
| 1102 'arguments': 'EGLDisplay dpy, EGLSurface surface', }, |
| 1103 { 'return_type': 'EGLBoolean', |
| 1104 'names': ['eglSwapInterval'], |
| 1105 'arguments': 'EGLDisplay dpy, EGLint interval', }, |
| 1106 { 'return_type': 'EGLBoolean', |
| 1107 'names': ['eglTerminate'], |
| 1108 'arguments': 'EGLDisplay dpy', }, |
| 1109 { 'return_type': 'EGLBoolean', |
| 1110 'names': ['eglWaitClient'], |
| 1111 'arguments': 'void', }, |
| 1112 { 'return_type': 'EGLBoolean', |
| 1113 'names': ['eglWaitGL'], |
| 1114 'arguments': 'void', }, |
| 1115 { 'return_type': 'EGLBoolean', |
| 1116 'names': ['eglWaitNative'], |
| 1117 'arguments': 'EGLint engine', }, |
1089 { 'return_type': 'EGLint', | 1118 { 'return_type': 'EGLint', |
1090 'versions': [{ 'name': 'eglWaitSyncKHR', | 1119 'versions': [{ 'name': 'eglWaitSyncKHR', |
1091 'extensions': ['EGL_KHR_fence_sync', 'EGL_KHR_wait_sync'] }], | 1120 'extensions': ['EGL_KHR_fence_sync', 'EGL_KHR_wait_sync'] }], |
1092 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync, EGLint flags' } | 1121 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync, EGLint flags' }, |
1093 ] | 1122 ] |
1094 | 1123 |
1095 WGL_FUNCTIONS = [ | 1124 WGL_FUNCTIONS = [ |
| 1125 { 'return_type': 'BOOL', |
| 1126 'names': ['wglChoosePixelFormatARB'], |
| 1127 'arguments': |
| 1128 'HDC dc, const int* int_attrib_list, const float* float_attrib_list, ' |
| 1129 'UINT max_formats, int* formats, UINT* num_formats', }, |
| 1130 { 'return_type': 'BOOL', |
| 1131 'names': ['wglCopyContext'], |
| 1132 'arguments': 'HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask', }, |
1096 { 'return_type': 'HGLRC', | 1133 { 'return_type': 'HGLRC', |
1097 'names': ['wglCreateContext'], | 1134 'names': ['wglCreateContext'], |
1098 'arguments': 'HDC hdc', }, | 1135 'arguments': 'HDC hdc', }, |
1099 { 'return_type': 'HGLRC', | 1136 { 'return_type': 'HGLRC', |
1100 'names': ['wglCreateLayerContext'], | 1137 'names': ['wglCreateLayerContext'], |
1101 'arguments': 'HDC hdc, int iLayerPlane', }, | 1138 'arguments': 'HDC hdc, int iLayerPlane', }, |
1102 { 'return_type': 'BOOL', | 1139 { 'return_type': 'HPBUFFERARB', |
1103 'names': ['wglCopyContext'], | 1140 'names': ['wglCreatePbufferARB'], |
1104 'arguments': 'HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask', }, | 1141 'arguments': 'HDC hDC, int iPixelFormat, int iWidth, int iHeight, ' |
| 1142 'const int* piAttribList', }, |
1105 { 'return_type': 'BOOL', | 1143 { 'return_type': 'BOOL', |
1106 'names': ['wglDeleteContext'], | 1144 'names': ['wglDeleteContext'], |
1107 'arguments': 'HGLRC hglrc', }, | 1145 'arguments': 'HGLRC hglrc', }, |
| 1146 { 'return_type': 'BOOL', |
| 1147 'names': ['wglDestroyPbufferARB'], |
| 1148 'arguments': 'HPBUFFERARB hPbuffer', }, |
1108 { 'return_type': 'HGLRC', | 1149 { 'return_type': 'HGLRC', |
1109 'names': ['wglGetCurrentContext'], | 1150 'names': ['wglGetCurrentContext'], |
1110 'arguments': '', }, | 1151 'arguments': '', }, |
1111 { 'return_type': 'HDC', | 1152 { 'return_type': 'HDC', |
1112 'names': ['wglGetCurrentDC'], | 1153 'names': ['wglGetCurrentDC'], |
1113 'arguments': '', }, | 1154 'arguments': '', }, |
1114 { 'return_type': 'BOOL', | |
1115 'names': ['wglMakeCurrent'], | |
1116 'arguments': 'HDC hdc, HGLRC hglrc', }, | |
1117 { 'return_type': 'BOOL', | |
1118 'names': ['wglShareLists'], | |
1119 'arguments': 'HGLRC hglrc1, HGLRC hglrc2', }, | |
1120 { 'return_type': 'BOOL', | |
1121 'names': ['wglSwapIntervalEXT'], | |
1122 'arguments': 'int interval', }, | |
1123 { 'return_type': 'BOOL', | |
1124 'names': ['wglSwapLayerBuffers'], | |
1125 'arguments': 'HDC hdc, UINT fuPlanes', }, | |
1126 { 'return_type': 'const char*', | 1155 { 'return_type': 'const char*', |
1127 'names': ['wglGetExtensionsStringARB'], | 1156 'names': ['wglGetExtensionsStringARB'], |
1128 'arguments': 'HDC hDC', }, | 1157 'arguments': 'HDC hDC', }, |
1129 { 'return_type': 'const char*', | 1158 { 'return_type': 'const char*', |
1130 'names': ['wglGetExtensionsStringEXT'], | 1159 'names': ['wglGetExtensionsStringEXT'], |
1131 'arguments': '', }, | 1160 'arguments': '', }, |
1132 { 'return_type': 'BOOL', | |
1133 'names': ['wglChoosePixelFormatARB'], | |
1134 'arguments': | |
1135 'HDC dc, const int* int_attrib_list, const float* float_attrib_list, ' | |
1136 'UINT max_formats, int* formats, UINT* num_formats', }, | |
1137 { 'return_type': 'HPBUFFERARB', | |
1138 'names': ['wglCreatePbufferARB'], | |
1139 'arguments': 'HDC hDC, int iPixelFormat, int iWidth, int iHeight, ' | |
1140 'const int* piAttribList', }, | |
1141 { 'return_type': 'HDC', | 1161 { 'return_type': 'HDC', |
1142 'names': ['wglGetPbufferDCARB'], | 1162 'names': ['wglGetPbufferDCARB'], |
1143 'arguments': 'HPBUFFERARB hPbuffer', }, | 1163 'arguments': 'HPBUFFERARB hPbuffer', }, |
| 1164 { 'return_type': 'BOOL', |
| 1165 'names': ['wglMakeCurrent'], |
| 1166 'arguments': 'HDC hdc, HGLRC hglrc', }, |
| 1167 { 'return_type': 'BOOL', |
| 1168 'names': ['wglQueryPbufferARB'], |
| 1169 'arguments': 'HPBUFFERARB hPbuffer, int iAttribute, int* piValue', }, |
1144 { 'return_type': 'int', | 1170 { 'return_type': 'int', |
1145 'names': ['wglReleasePbufferDCARB'], | 1171 'names': ['wglReleasePbufferDCARB'], |
1146 'arguments': 'HPBUFFERARB hPbuffer, HDC hDC', }, | 1172 'arguments': 'HPBUFFERARB hPbuffer, HDC hDC', }, |
1147 { 'return_type': 'BOOL', | 1173 { 'return_type': 'BOOL', |
1148 'names': ['wglDestroyPbufferARB'], | 1174 'names': ['wglShareLists'], |
1149 'arguments': 'HPBUFFERARB hPbuffer', }, | 1175 'arguments': 'HGLRC hglrc1, HGLRC hglrc2', }, |
1150 { 'return_type': 'BOOL', | 1176 { 'return_type': 'BOOL', |
1151 'names': ['wglQueryPbufferARB'], | 1177 'names': ['wglSwapIntervalEXT'], |
1152 'arguments': 'HPBUFFERARB hPbuffer, int iAttribute, int* piValue', }, | 1178 'arguments': 'int interval', }, |
| 1179 { 'return_type': 'BOOL', |
| 1180 'names': ['wglSwapLayerBuffers'], |
| 1181 'arguments': 'HDC hdc, UINT fuPlanes', }, |
1153 ] | 1182 ] |
1154 | 1183 |
1155 GLX_FUNCTIONS = [ | 1184 GLX_FUNCTIONS = [ |
1156 { 'return_type': 'int', | 1185 { 'return_type': 'void', |
1157 'names': ['glXWaitVideoSyncSGI'], | 1186 'names': ['glXBindTexImageEXT'], |
1158 'arguments': 'int divisor, int remainder, unsigned int* count', }, | 1187 'arguments': |
| 1188 'Display* dpy, GLXDrawable drawable, int buffer, int* attribList', }, |
| 1189 { 'return_type': 'GLXFBConfig*', |
| 1190 'names': ['glXChooseFBConfig'], |
| 1191 'arguments': |
| 1192 'Display* dpy, int screen, const int* attribList, int* nitems', }, |
1159 { 'return_type': 'XVisualInfo*', | 1193 { 'return_type': 'XVisualInfo*', |
1160 'names': ['glXChooseVisual'], | 1194 'names': ['glXChooseVisual'], |
1161 'arguments': 'Display* dpy, int screen, int* attribList', }, | 1195 'arguments': 'Display* dpy, int screen, int* attribList', }, |
1162 { 'return_type': 'void', | 1196 { 'return_type': 'void', |
| 1197 'names': ['glXCopyContext'], |
| 1198 'arguments': |
| 1199 'Display* dpy, GLXContext src, GLXContext dst, unsigned long mask', }, |
| 1200 { 'return_type': 'void', |
1163 'names': ['glXCopySubBufferMESA'], | 1201 'names': ['glXCopySubBufferMESA'], |
1164 'arguments': 'Display* dpy, GLXDrawable drawable, ' | 1202 'arguments': 'Display* dpy, GLXDrawable drawable, ' |
1165 'int x, int y, int width, int height', }, | 1203 'int x, int y, int width, int height', }, |
1166 { 'return_type': 'GLXContext', | 1204 { 'return_type': 'GLXContext', |
1167 'names': ['glXCreateContext'], | 1205 'names': ['glXCreateContext'], |
1168 'arguments': | 1206 'arguments': |
1169 'Display* dpy, XVisualInfo* vis, GLXContext shareList, int direct', }, | 1207 'Display* dpy, XVisualInfo* vis, GLXContext shareList, int direct', }, |
1170 { 'return_type': 'void', | 1208 { 'return_type': 'GLXContext', |
1171 'names': ['glXBindTexImageEXT'], | 1209 'names': ['glXCreateContextAttribsARB'], |
1172 'arguments': | 1210 'arguments': |
1173 'Display* dpy, GLXDrawable drawable, int buffer, int* attribList', }, | 1211 'Display* dpy, GLXFBConfig config, GLXContext share_context, int direct, ' |
1174 { 'return_type': 'void', | 1212 'const int* attrib_list', }, |
1175 'names': ['glXReleaseTexImageEXT'], | 1213 { 'return_type': 'GLXPixmap', |
1176 'arguments': 'Display* dpy, GLXDrawable drawable, int buffer', }, | 1214 'names': ['glXCreateGLXPixmap'], |
| 1215 'arguments': 'Display* dpy, XVisualInfo* visual, Pixmap pixmap', }, |
| 1216 { 'return_type': 'GLXContext', |
| 1217 'names': ['glXCreateNewContext'], |
| 1218 'arguments': 'Display* dpy, GLXFBConfig config, int renderType, ' |
| 1219 'GLXContext shareList, int direct', }, |
| 1220 { 'return_type': 'GLXPbuffer', |
| 1221 'names': ['glXCreatePbuffer'], |
| 1222 'arguments': 'Display* dpy, GLXFBConfig config, const int* attribList', }, |
| 1223 { 'return_type': 'GLXPixmap', |
| 1224 'names': ['glXCreatePixmap'], |
| 1225 'arguments': 'Display* dpy, GLXFBConfig config, ' |
| 1226 'Pixmap pixmap, const int* attribList', }, |
| 1227 { 'return_type': 'GLXWindow', |
| 1228 'names': ['glXCreateWindow'], |
| 1229 'arguments': |
| 1230 'Display* dpy, GLXFBConfig config, Window win, const int* attribList', }, |
1177 { 'return_type': 'void', | 1231 { 'return_type': 'void', |
1178 'names': ['glXDestroyContext'], | 1232 'names': ['glXDestroyContext'], |
1179 'arguments': 'Display* dpy, GLXContext ctx', }, | 1233 'arguments': 'Display* dpy, GLXContext ctx', }, |
1180 { 'return_type': 'int', | |
1181 'names': ['glXMakeCurrent'], | |
1182 'arguments': 'Display* dpy, GLXDrawable drawable, GLXContext ctx', }, | |
1183 { 'return_type': 'void', | |
1184 'names': ['glXCopyContext'], | |
1185 'arguments': | |
1186 'Display* dpy, GLXContext src, GLXContext dst, unsigned long mask', }, | |
1187 { 'return_type': 'void', | |
1188 'names': ['glXSwapBuffers'], | |
1189 'arguments': 'Display* dpy, GLXDrawable drawable', }, | |
1190 { 'return_type': 'GLXPixmap', | |
1191 'names': ['glXCreateGLXPixmap'], | |
1192 'arguments': 'Display* dpy, XVisualInfo* visual, Pixmap pixmap', }, | |
1193 { 'return_type': 'void', | 1234 { 'return_type': 'void', |
1194 'names': ['glXDestroyGLXPixmap'], | 1235 'names': ['glXDestroyGLXPixmap'], |
1195 'arguments': 'Display* dpy, GLXPixmap pixmap', }, | 1236 'arguments': 'Display* dpy, GLXPixmap pixmap', }, |
1196 { 'return_type': 'int', | 1237 { 'return_type': 'void', |
1197 'names': ['glXQueryExtension'], | 1238 'names': ['glXDestroyPbuffer'], |
1198 'arguments': 'Display* dpy, int* errorb, int* event', }, | 1239 'arguments': 'Display* dpy, GLXPbuffer pbuf', }, |
1199 { 'return_type': 'int', | 1240 { 'return_type': 'void', |
1200 'names': ['glXQueryVersion'], | 1241 'names': ['glXDestroyPixmap'], |
1201 'arguments': 'Display* dpy, int* maj, int* min', }, | 1242 'arguments': 'Display* dpy, GLXPixmap pixmap', }, |
1202 { 'return_type': 'int', | 1243 { 'return_type': 'void', |
1203 'names': ['glXIsDirect'], | 1244 'names': ['glXDestroyWindow'], |
1204 'arguments': 'Display* dpy, GLXContext ctx', }, | 1245 'arguments': 'Display* dpy, GLXWindow window', }, |
| 1246 { 'return_type': 'const char*', |
| 1247 'names': ['glXGetClientString'], |
| 1248 'arguments': 'Display* dpy, int name', }, |
1205 { 'return_type': 'int', | 1249 { 'return_type': 'int', |
1206 'names': ['glXGetConfig'], | 1250 'names': ['glXGetConfig'], |
1207 'arguments': 'Display* dpy, XVisualInfo* visual, int attrib, int* value', }, | 1251 'arguments': 'Display* dpy, XVisualInfo* visual, int attrib, int* value', }, |
1208 { 'return_type': 'GLXContext', | 1252 { 'return_type': 'GLXContext', |
1209 'names': ['glXGetCurrentContext'], | 1253 'names': ['glXGetCurrentContext'], |
1210 'arguments': 'void', }, | 1254 'arguments': 'void', }, |
| 1255 { 'return_type': 'Display*', |
| 1256 'names': ['glXGetCurrentDisplay'], |
| 1257 'arguments': 'void', }, |
1211 { 'return_type': 'GLXDrawable', | 1258 { 'return_type': 'GLXDrawable', |
1212 'names': ['glXGetCurrentDrawable'], | 1259 'names': ['glXGetCurrentDrawable'], |
1213 'arguments': 'void', }, | 1260 'arguments': 'void', }, |
| 1261 { 'return_type': 'GLXDrawable', |
| 1262 'names': ['glXGetCurrentReadDrawable'], |
| 1263 'arguments': 'void', }, |
| 1264 { 'return_type': 'int', |
| 1265 'names': ['glXGetFBConfigAttrib'], |
| 1266 'arguments': 'Display* dpy, GLXFBConfig config, int attribute, int* value', }, |
| 1267 { 'return_type': 'GLXFBConfig', |
| 1268 'names': ['glXGetFBConfigFromVisualSGIX'], |
| 1269 'arguments': 'Display* dpy, XVisualInfo* visualInfo', }, |
| 1270 { 'return_type': 'GLXFBConfig*', |
| 1271 'names': ['glXGetFBConfigs'], |
| 1272 'arguments': 'Display* dpy, int screen, int* nelements', }, |
| 1273 { 'return_type': 'bool', |
| 1274 'names': ['glXGetMscRateOML'], |
| 1275 'arguments': |
| 1276 'Display* dpy, GLXDrawable drawable, int32* numerator, ' |
| 1277 'int32* denominator' }, |
1214 { 'return_type': 'void', | 1278 { 'return_type': 'void', |
1215 'names': ['glXWaitGL'], | 1279 'names': ['glXGetSelectedEvent'], |
1216 'arguments': 'void', }, | 1280 'arguments': 'Display* dpy, GLXDrawable drawable, unsigned long* mask', }, |
| 1281 { 'return_type': 'bool', |
| 1282 'names': ['glXGetSyncValuesOML'], |
| 1283 'arguments': |
| 1284 'Display* dpy, GLXDrawable drawable, int64* ust, int64* msc, ' |
| 1285 'int64* sbc' }, |
| 1286 { 'return_type': 'XVisualInfo*', |
| 1287 'names': ['glXGetVisualFromFBConfig'], |
| 1288 'arguments': 'Display* dpy, GLXFBConfig config', }, |
| 1289 { 'return_type': 'int', |
| 1290 'names': ['glXIsDirect'], |
| 1291 'arguments': 'Display* dpy, GLXContext ctx', }, |
| 1292 { 'return_type': 'int', |
| 1293 'names': ['glXMakeContextCurrent'], |
| 1294 'arguments': |
| 1295 'Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx', }, |
| 1296 { 'return_type': 'int', |
| 1297 'names': ['glXMakeCurrent'], |
| 1298 'arguments': 'Display* dpy, GLXDrawable drawable, GLXContext ctx', }, |
| 1299 { 'return_type': 'int', |
| 1300 'names': ['glXQueryContext'], |
| 1301 'arguments': 'Display* dpy, GLXContext ctx, int attribute, int* value', }, |
1217 { 'return_type': 'void', | 1302 { 'return_type': 'void', |
1218 'names': ['glXWaitX'], | 1303 'names': ['glXQueryDrawable'], |
1219 'arguments': 'void', }, | 1304 'arguments': |
1220 { 'return_type': 'void', | 1305 'Display* dpy, GLXDrawable draw, int attribute, unsigned int* value', }, |
1221 'names': ['glXUseXFont'], | 1306 { 'return_type': 'int', |
1222 'arguments': 'Font font, int first, int count, int list', }, | 1307 'names': ['glXQueryExtension'], |
| 1308 'arguments': 'Display* dpy, int* errorb, int* event', }, |
1223 { 'return_type': 'const char*', | 1309 { 'return_type': 'const char*', |
1224 'names': ['glXQueryExtensionsString'], | 1310 'names': ['glXQueryExtensionsString'], |
1225 'arguments': 'Display* dpy, int screen', }, | 1311 'arguments': 'Display* dpy, int screen', }, |
1226 { 'return_type': 'const char*', | 1312 { 'return_type': 'const char*', |
1227 'names': ['glXQueryServerString'], | 1313 'names': ['glXQueryServerString'], |
1228 'arguments': 'Display* dpy, int screen, int name', }, | 1314 'arguments': 'Display* dpy, int screen, int name', }, |
1229 { 'return_type': 'const char*', | |
1230 'names': ['glXGetClientString'], | |
1231 'arguments': 'Display* dpy, int name', }, | |
1232 { 'return_type': 'Display*', | |
1233 'names': ['glXGetCurrentDisplay'], | |
1234 'arguments': 'void', }, | |
1235 { 'return_type': 'GLXFBConfig*', | |
1236 'names': ['glXChooseFBConfig'], | |
1237 'arguments': | |
1238 'Display* dpy, int screen, const int* attribList, int* nitems', }, | |
1239 { 'return_type': 'int', | 1315 { 'return_type': 'int', |
1240 'names': ['glXGetFBConfigAttrib'], | 1316 'names': ['glXQueryVersion'], |
1241 'arguments': 'Display* dpy, GLXFBConfig config, int attribute, int* value', }, | 1317 'arguments': 'Display* dpy, int* maj, int* min', }, |
1242 { 'return_type': 'GLXFBConfig*', | |
1243 'names': ['glXGetFBConfigs'], | |
1244 'arguments': 'Display* dpy, int screen, int* nelements', }, | |
1245 { 'return_type': 'XVisualInfo*', | |
1246 'names': ['glXGetVisualFromFBConfig'], | |
1247 'arguments': 'Display* dpy, GLXFBConfig config', }, | |
1248 { 'return_type': 'GLXWindow', | |
1249 'names': ['glXCreateWindow'], | |
1250 'arguments': | |
1251 'Display* dpy, GLXFBConfig config, Window win, const int* attribList', }, | |
1252 { 'return_type': 'void', | 1318 { 'return_type': 'void', |
1253 'names': ['glXDestroyWindow'], | 1319 'names': ['glXReleaseTexImageEXT'], |
1254 'arguments': 'Display* dpy, GLXWindow window', }, | 1320 'arguments': 'Display* dpy, GLXDrawable drawable, int buffer', }, |
1255 { 'return_type': 'GLXPixmap', | |
1256 'names': ['glXCreatePixmap'], | |
1257 'arguments': 'Display* dpy, GLXFBConfig config, ' | |
1258 'Pixmap pixmap, const int* attribList', }, | |
1259 { 'return_type': 'void', | |
1260 'names': ['glXDestroyPixmap'], | |
1261 'arguments': 'Display* dpy, GLXPixmap pixmap', }, | |
1262 { 'return_type': 'GLXPbuffer', | |
1263 'names': ['glXCreatePbuffer'], | |
1264 'arguments': 'Display* dpy, GLXFBConfig config, const int* attribList', }, | |
1265 { 'return_type': 'void', | |
1266 'names': ['glXDestroyPbuffer'], | |
1267 'arguments': 'Display* dpy, GLXPbuffer pbuf', }, | |
1268 { 'return_type': 'void', | |
1269 'names': ['glXQueryDrawable'], | |
1270 'arguments': | |
1271 'Display* dpy, GLXDrawable draw, int attribute, unsigned int* value', }, | |
1272 { 'return_type': 'GLXContext', | |
1273 'names': ['glXCreateNewContext'], | |
1274 'arguments': 'Display* dpy, GLXFBConfig config, int renderType, ' | |
1275 'GLXContext shareList, int direct', }, | |
1276 { 'return_type': 'int', | |
1277 'names': ['glXMakeContextCurrent'], | |
1278 'arguments': | |
1279 'Display* dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx', }, | |
1280 { 'return_type': 'GLXDrawable', | |
1281 'names': ['glXGetCurrentReadDrawable'], | |
1282 'arguments': 'void', }, | |
1283 { 'return_type': 'int', | |
1284 'names': ['glXQueryContext'], | |
1285 'arguments': 'Display* dpy, GLXContext ctx, int attribute, int* value', }, | |
1286 { 'return_type': 'void', | 1321 { 'return_type': 'void', |
1287 'names': ['glXSelectEvent'], | 1322 'names': ['glXSelectEvent'], |
1288 'arguments': 'Display* dpy, GLXDrawable drawable, unsigned long mask', }, | 1323 'arguments': 'Display* dpy, GLXDrawable drawable, unsigned long mask', }, |
1289 { 'return_type': 'void', | 1324 { 'return_type': 'void', |
1290 'names': ['glXGetSelectedEvent'], | 1325 'names': ['glXSwapBuffers'], |
1291 'arguments': 'Display* dpy, GLXDrawable drawable, unsigned long* mask', }, | 1326 'arguments': 'Display* dpy, GLXDrawable drawable', }, |
| 1327 { 'return_type': 'void', |
| 1328 'names': ['glXSwapIntervalEXT'], |
| 1329 'arguments': 'Display* dpy, GLXDrawable drawable, int interval', }, |
1292 { 'return_type': 'void', | 1330 { 'return_type': 'void', |
1293 'names': ['glXSwapIntervalMESA'], | 1331 'names': ['glXSwapIntervalMESA'], |
1294 'arguments': 'unsigned int interval', }, | 1332 'arguments': 'unsigned int interval', }, |
1295 { 'return_type': 'void', | 1333 { 'return_type': 'void', |
1296 'names': ['glXSwapIntervalEXT'], | 1334 'names': ['glXUseXFont'], |
1297 'arguments': 'Display* dpy, GLXDrawable drawable, int interval', }, | 1335 'arguments': 'Font font, int first, int count, int list', }, |
1298 { 'return_type': 'GLXFBConfig', | 1336 { 'return_type': 'void', |
1299 'names': ['glXGetFBConfigFromVisualSGIX'], | 1337 'names': ['glXWaitGL'], |
1300 'arguments': 'Display* dpy, XVisualInfo* visualInfo', }, | 1338 'arguments': 'void', }, |
1301 { 'return_type': 'GLXContext', | 1339 { 'return_type': 'int', |
1302 'names': ['glXCreateContextAttribsARB'], | 1340 'names': ['glXWaitVideoSyncSGI'], |
1303 'arguments': | 1341 'arguments': 'int divisor, int remainder, unsigned int* count', }, |
1304 'Display* dpy, GLXFBConfig config, GLXContext share_context, int direct, ' | 1342 { 'return_type': 'void', |
1305 'const int* attrib_list', }, | 1343 'names': ['glXWaitX'], |
1306 { 'return_type': 'bool', | 1344 'arguments': 'void', }, |
1307 'names': ['glXGetSyncValuesOML'], | |
1308 'arguments': | |
1309 'Display* dpy, GLXDrawable drawable, int64* ust, int64* msc, ' | |
1310 'int64* sbc' }, | |
1311 { 'return_type': 'bool', | |
1312 'names': ['glXGetMscRateOML'], | |
1313 'arguments': | |
1314 'Display* dpy, GLXDrawable drawable, int32* numerator, ' | |
1315 'int32* denominator' }, | |
1316 ] | 1345 ] |
1317 | 1346 |
1318 FUNCTION_SETS = [ | 1347 FUNCTION_SETS = [ |
1319 [GL_FUNCTIONS, 'gl', [ | 1348 [GL_FUNCTIONS, 'gl', [ |
1320 'GL/glext.h', | 1349 'GL/glext.h', |
1321 'GLES2/gl2ext.h', | 1350 'GLES2/gl2ext.h', |
1322 # Files below are Chromium-specific and shipped with Chromium sources. | 1351 # Files below are Chromium-specific and shipped with Chromium sources. |
1323 'GL/glextchromium.h', | 1352 'GL/glextchromium.h', |
1324 'GLES2/gl2chromium.h', | 1353 'GLES2/gl2chromium.h', |
1325 'GLES2/gl2extchromium.h' | 1354 'GLES2/gl2extchromium.h' |
1326 ], []], | 1355 ], []], |
1327 [OSMESA_FUNCTIONS, 'osmesa', [], []], | 1356 [OSMESA_FUNCTIONS, 'osmesa', [], []], |
1328 [EGL_FUNCTIONS, 'egl', [ | 1357 [EGL_FUNCTIONS, 'egl', [ |
1329 'EGL/eglext.h', | 1358 'EGL/eglext.h', |
1330 # Files below are Chromium-specific and shipped with Chromium sources. | 1359 # Files below are Chromium-specific and shipped with Chromium sources. |
1331 'EGL/eglextchromium.h', | 1360 'EGL/eglextchromium.h', |
1332 ], | 1361 ], |
1333 [ | 1362 [ |
1334 'EGL_ANGLE_d3d_share_handle_client_buffer', | 1363 'EGL_ANGLE_d3d_share_handle_client_buffer', |
1335 'EGL_ANGLE_surface_d3d_texture_2d_share_handle', | 1364 'EGL_ANGLE_surface_d3d_texture_2d_share_handle', |
1336 ], | 1365 ], |
1337 ], | 1366 ], |
1338 [WGL_FUNCTIONS, 'wgl', ['GL/wglext.h'], []], | 1367 [WGL_FUNCTIONS, 'wgl', ['GL/wglext.h'], []], |
1339 [GLX_FUNCTIONS, 'glx', ['GL/glx.h', 'GL/glxext.h'], []], | 1368 [GLX_FUNCTIONS, 'glx', ['GL/glx.h', 'GL/glxext.h'], []], |
1340 ] | 1369 ] |
1341 | 1370 |
| 1371 |
1342 def GenerateHeader(file, functions, set_name, used_extensions): | 1372 def GenerateHeader(file, functions, set_name, used_extensions): |
1343 """Generates gl_bindings_autogen_x.h""" | 1373 """Generates gl_bindings_autogen_x.h""" |
1344 | 1374 |
1345 # Write file header. | 1375 # Write file header. |
1346 file.write( | 1376 file.write( |
1347 """// Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1377 """// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
1348 // Use of this source code is governed by a BSD-style license that can be | 1378 // Use of this source code is governed by a BSD-style license that can be |
1349 // found in the LICENSE file. | 1379 // found in the LICENSE file. |
1350 | 1380 |
1351 // This file is automatically generated. | 1381 // This file is automatically generated. |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 | 2051 |
2022 raise Exception('Header %s not found.' % header) | 2052 raise Exception('Header %s not found.' % header) |
2023 | 2053 |
2024 | 2054 |
2025 def main(argv): | 2055 def main(argv): |
2026 """This is the main function.""" | 2056 """This is the main function.""" |
2027 | 2057 |
2028 parser = optparse.OptionParser() | 2058 parser = optparse.OptionParser() |
2029 parser.add_option('--inputs', action='store_true') | 2059 parser.add_option('--inputs', action='store_true') |
2030 parser.add_option('--header-paths') | 2060 parser.add_option('--header-paths') |
| 2061 parser.add_option('--verify-order', action='store_true') |
2031 | 2062 |
2032 options, args = parser.parse_args(argv) | 2063 options, args = parser.parse_args(argv) |
2033 | 2064 |
2034 if options.inputs: | 2065 if options.inputs: |
2035 for [_, _, headers, _] in FUNCTION_SETS: | 2066 for [_, _, headers, _] in FUNCTION_SETS: |
2036 for header in headers: | 2067 for header in headers: |
2037 print ResolveHeader(header, options.header_paths) | 2068 print ResolveHeader(header, options.header_paths) |
2038 return 0 | 2069 return 0 |
2039 | 2070 |
2040 directory = '.' | 2071 directory = '.' |
2041 if len(args) >= 1: | 2072 if len(args) >= 1: |
2042 directory = args[0] | 2073 directory = args[0] |
2043 | 2074 |
2044 for [functions, set_name, extension_headers, extensions] in FUNCTION_SETS: | 2075 for [functions, set_name, extension_headers, extensions] in FUNCTION_SETS: |
2045 # Function names can be specified in two ways (list of unique names or list | 2076 # Function names can be specified in two ways (list of unique names or list |
2046 # of versions with different binding conditions). Fill in the data to the | 2077 # of versions with different binding conditions). Fill in the data to the |
2047 # versions list in case it is missing, so that can be used from here on: | 2078 # versions list in case it is missing, so that can be used from here on: |
2048 for func in functions: | 2079 for func in functions: |
2049 assert 'versions' in func or 'names' in func, 'Function with no names' | 2080 assert 'versions' in func or 'names' in func, 'Function with no names' |
2050 if 'versions' not in func: | 2081 if 'versions' not in func: |
2051 func['versions'] = [{'name': n} for n in func['names']] | 2082 func['versions'] = [{'name': n} for n in func['names']] |
2052 # Use the first version's name unless otherwise specified | 2083 # Use the first version's name unless otherwise specified |
2053 if 'known_as' not in func: | 2084 if 'known_as' not in func: |
2054 func['known_as'] = func['versions'][0]['name'] | 2085 func['known_as'] = func['versions'][0]['name'] |
2055 # Make sure that 'names' is not accidentally used instead of 'versions' | 2086 # Make sure that 'names' is not accidentally used instead of 'versions' |
2056 if 'names' in func: | 2087 if 'names' in func: |
2057 del func['names'] | 2088 del func['names'] |
2058 | 2089 |
| 2090 # Check function names in each set is sorted in alphabetical order. |
| 2091 for index in range(len(functions) - 1): |
| 2092 func_name = functions[index]['known_as'] |
| 2093 next_func_name = functions[index + 1]['known_as'] |
| 2094 if func_name.lower() > next_func_name.lower(): |
| 2095 raise Exception( |
| 2096 'function %s is not in alphabetical order' % next_func_name) |
| 2097 if options.verify_order: |
| 2098 continue |
| 2099 |
2059 extension_headers = [ResolveHeader(h, options.header_paths) | 2100 extension_headers = [ResolveHeader(h, options.header_paths) |
2060 for h in extension_headers] | 2101 for h in extension_headers] |
2061 used_extensions = FillExtensionsFromHeaders( | 2102 used_extensions = FillExtensionsFromHeaders( |
2062 functions, extension_headers, extensions) | 2103 functions, extension_headers, extensions) |
2063 | 2104 |
2064 header_file = open( | 2105 header_file = open( |
2065 os.path.join(directory, 'gl_bindings_autogen_%s.h' % set_name), 'wb') | 2106 os.path.join(directory, 'gl_bindings_autogen_%s.h' % set_name), 'wb') |
2066 GenerateHeader(header_file, functions, set_name, used_extensions) | 2107 GenerateHeader(header_file, functions, set_name, used_extensions) |
2067 header_file.close() | 2108 header_file.close() |
2068 | 2109 |
2069 header_file = open( | 2110 header_file = open( |
2070 os.path.join(directory, 'gl_bindings_api_autogen_%s.h' % set_name), | 2111 os.path.join(directory, 'gl_bindings_api_autogen_%s.h' % set_name), |
2071 'wb') | 2112 'wb') |
2072 GenerateAPIHeader(header_file, functions, set_name) | 2113 GenerateAPIHeader(header_file, functions, set_name) |
2073 header_file.close() | 2114 header_file.close() |
2074 | 2115 |
2075 source_file = open( | 2116 source_file = open( |
2076 os.path.join(directory, 'gl_bindings_autogen_%s.cc' % set_name), 'wb') | 2117 os.path.join(directory, 'gl_bindings_autogen_%s.cc' % set_name), 'wb') |
2077 GenerateSource(source_file, functions, set_name, used_extensions) | 2118 GenerateSource(source_file, functions, set_name, used_extensions) |
2078 source_file.close() | 2119 source_file.close() |
2079 | 2120 |
2080 header_file = open( | 2121 if not options.verify_order: |
2081 os.path.join(directory, 'gl_mock_autogen_gl.h'), 'wb') | 2122 header_file = open( |
2082 GenerateMockHeader(header_file, GL_FUNCTIONS, 'gl') | 2123 os.path.join(directory, 'gl_mock_autogen_gl.h'), 'wb') |
2083 header_file.close() | 2124 GenerateMockHeader(header_file, GL_FUNCTIONS, 'gl') |
| 2125 header_file.close() |
2084 | 2126 |
2085 header_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.h'), | 2127 header_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.h'), |
2086 'wb') | 2128 'wb') |
2087 GenerateMockBindingsHeader(header_file, GL_FUNCTIONS) | 2129 GenerateMockBindingsHeader(header_file, GL_FUNCTIONS) |
2088 header_file.close() | 2130 header_file.close() |
2089 | 2131 |
2090 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), | 2132 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), |
2091 'wb') | 2133 'wb') |
2092 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) | 2134 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) |
2093 source_file.close() | 2135 source_file.close() |
2094 return 0 | 2136 return 0 |
2095 | 2137 |
2096 | 2138 |
2097 if __name__ == '__main__': | 2139 if __name__ == '__main__': |
2098 sys.exit(main(sys.argv[1:])) | 2140 sys.exit(main(sys.argv[1:])) |
OLD | NEW |