| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 { 'return_type': 'void', | 170 { 'return_type': 'void', |
| 171 'names': ['glDeleteFramebuffersEXT', 'glDeleteFramebuffers'], | 171 'names': ['glDeleteFramebuffersEXT', 'glDeleteFramebuffers'], |
| 172 'arguments': 'GLsizei n, const GLuint* framebuffers', }, | 172 'arguments': 'GLsizei n, const GLuint* framebuffers', }, |
| 173 { 'return_type': 'void', | 173 { 'return_type': 'void', |
| 174 'names': ['glDeleteProgram'], | 174 'names': ['glDeleteProgram'], |
| 175 'arguments': 'GLuint program', }, | 175 'arguments': 'GLuint program', }, |
| 176 { 'return_type': 'void', | 176 { 'return_type': 'void', |
| 177 'names': ['glDeleteQueries'], | 177 'names': ['glDeleteQueries'], |
| 178 'arguments': 'GLsizei n, const GLuint* ids', }, | 178 'arguments': 'GLsizei n, const GLuint* ids', }, |
| 179 { 'return_type': 'void', | 179 { 'return_type': 'void', |
| 180 'names': ['glDeleteQueriesARB', 'glDeleteQueriesEXT'], | 180 'names': ['glDeleteQueriesEXT'], |
| 181 'arguments': 'GLsizei n, const GLuint* ids', }, |
| 182 { 'return_type': 'void', |
| 183 'names': ['glDeleteQueriesARB'], |
| 181 'arguments': 'GLsizei n, const GLuint* ids', }, | 184 'arguments': 'GLsizei n, const GLuint* ids', }, |
| 182 { 'return_type': 'void', | 185 { 'return_type': 'void', |
| 183 'names': ['glDeleteRenderbuffersEXT', 'glDeleteRenderbuffers'], | 186 'names': ['glDeleteRenderbuffersEXT', 'glDeleteRenderbuffers'], |
| 184 'arguments': 'GLsizei n, const GLuint* renderbuffers', }, | 187 'arguments': 'GLsizei n, const GLuint* renderbuffers', }, |
| 185 { 'return_type': 'void', | 188 { 'return_type': 'void', |
| 186 'names': ['glDeleteShader'], | 189 'names': ['glDeleteShader'], |
| 187 'arguments': 'GLuint shader', }, | 190 'arguments': 'GLuint shader', }, |
| 188 { 'return_type': 'void', | 191 { 'return_type': 'void', |
| 189 'names': ['glDeleteTextures'], | 192 'names': ['glDeleteTextures'], |
| 190 'arguments': 'GLsizei n, const GLuint* textures', }, | 193 'arguments': 'GLsizei n, const GLuint* textures', }, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 { 'return_type': 'void', | 272 { 'return_type': 'void', |
| 270 'names': ['glFrontFace'], | 273 'names': ['glFrontFace'], |
| 271 'arguments': 'GLenum mode', }, | 274 'arguments': 'GLenum mode', }, |
| 272 { 'return_type': 'void', | 275 { 'return_type': 'void', |
| 273 'names': ['glGenBuffersARB', 'glGenBuffers'], | 276 'names': ['glGenBuffersARB', 'glGenBuffers'], |
| 274 'arguments': 'GLsizei n, GLuint* buffers', }, | 277 'arguments': 'GLsizei n, GLuint* buffers', }, |
| 275 { 'return_type': 'void', | 278 { 'return_type': 'void', |
| 276 'names': ['glGenQueries'], | 279 'names': ['glGenQueries'], |
| 277 'arguments': 'GLsizei n, GLuint* ids', }, | 280 'arguments': 'GLsizei n, GLuint* ids', }, |
| 278 { 'return_type': 'void', | 281 { 'return_type': 'void', |
| 279 'names': ['glGenQueriesARB', 'glGenQueriesEXT'], | 282 'names': ['glGenQueriesEXT'], |
| 283 'arguments': 'GLsizei n, GLuint* ids', }, |
| 284 { 'return_type': 'void', |
| 285 'names': ['glGenQueriesARB'], |
| 280 'arguments': 'GLsizei n, GLuint* ids', }, | 286 'arguments': 'GLsizei n, GLuint* ids', }, |
| 281 { 'return_type': 'void', | 287 { 'return_type': 'void', |
| 282 'names': ['glGenerateMipmapEXT', 'glGenerateMipmap'], | 288 'names': ['glGenerateMipmapEXT', 'glGenerateMipmap'], |
| 283 'arguments': 'GLenum target', }, | 289 'arguments': 'GLenum target', }, |
| 284 { 'return_type': 'void', | 290 { 'return_type': 'void', |
| 285 'names': ['glGenFramebuffersEXT', 'glGenFramebuffers'], | 291 'names': ['glGenFramebuffersEXT', 'glGenFramebuffers'], |
| 286 'arguments': 'GLsizei n, GLuint* framebuffers', }, | 292 'arguments': 'GLsizei n, GLuint* framebuffers', }, |
| 287 { 'return_type': 'void', | 293 { 'return_type': 'void', |
| 288 'names': ['glGenRenderbuffersEXT', 'glGenRenderbuffers'], | 294 'names': ['glGenRenderbuffersEXT', 'glGenRenderbuffers'], |
| 289 'arguments': 'GLsizei n, GLuint* renderbuffers', }, | 295 'arguments': 'GLsizei n, GLuint* renderbuffers', }, |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 { 'return_type': 'void', | 367 { 'return_type': 'void', |
| 362 'names': ['glGetQueryObjectiv'], | 368 'names': ['glGetQueryObjectiv'], |
| 363 'arguments': 'GLuint id, GLenum pname, GLint* params', }, | 369 'arguments': 'GLuint id, GLenum pname, GLint* params', }, |
| 364 { 'return_type': 'void', | 370 { 'return_type': 'void', |
| 365 'names': ['glGetQueryObjectui64v'], | 371 'names': ['glGetQueryObjectui64v'], |
| 366 'arguments': 'GLuint id, GLenum pname, GLuint64* params', }, | 372 'arguments': 'GLuint id, GLenum pname, GLuint64* params', }, |
| 367 { 'return_type': 'void', | 373 { 'return_type': 'void', |
| 368 'names': ['glGetQueryObjectuiv'], | 374 'names': ['glGetQueryObjectuiv'], |
| 369 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, | 375 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, |
| 370 { 'return_type': 'void', | 376 { 'return_type': 'void', |
| 371 'names': ['glGetQueryObjectuivARB', 'glGetQueryObjectuivEXT'], | 377 'names': ['glGetQueryObjecti64vEXT'], |
| 378 'arguments': 'GLuint id, GLenum pname, GLint64* params', }, |
| 379 { 'return_type': 'void', |
| 380 'names': ['glGetQueryObjectivEXT'], |
| 381 'arguments': 'GLuint id, GLenum pname, GLint* params', }, |
| 382 { 'return_type': 'void', |
| 383 'names': ['glGetQueryObjectui64vEXT'], |
| 384 'arguments': 'GLuint id, GLenum pname, GLuint64* params', }, |
| 385 { 'return_type': 'void', |
| 386 'names': ['glGetQueryObjectuivEXT'], |
| 387 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, |
| 388 { 'return_type': 'void', |
| 389 'names': ['glGetQueryObjectuivARB'], |
| 372 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, | 390 'arguments': 'GLuint id, GLenum pname, GLuint* params', }, |
| 373 { 'return_type': 'void', | 391 { 'return_type': 'void', |
| 374 'names': ['glGetRenderbufferParameterivEXT', 'glGetRenderbufferParameteriv'], | 392 'names': ['glGetRenderbufferParameterivEXT', 'glGetRenderbufferParameteriv'], |
| 375 'arguments': 'GLenum target, GLenum pname, GLint* params', }, | 393 'arguments': 'GLenum target, GLenum pname, GLint* params', }, |
| 376 { 'return_type': 'void', | 394 { 'return_type': 'void', |
| 377 'names': ['glGetShaderiv'], | 395 'names': ['glGetShaderiv'], |
| 378 'arguments': 'GLuint shader, GLenum pname, GLint* params', }, | 396 'arguments': 'GLuint shader, GLenum pname, GLint* params', }, |
| 379 { 'return_type': 'void', | 397 { 'return_type': 'void', |
| 380 'names': ['glGetShaderInfoLog'], | 398 'names': ['glGetShaderInfoLog'], |
| 381 'arguments': | 399 'arguments': |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 'extensions': ['GL_ARB_get_program_binary'] }, | 515 'extensions': ['GL_ARB_get_program_binary'] }, |
| 498 { 'name': 'glProgramParameteri' }], | 516 { 'name': 'glProgramParameteri' }], |
| 499 'arguments': 'GLuint program, GLenum pname, GLint value' }, | 517 'arguments': 'GLuint program, GLenum pname, GLint value' }, |
| 500 { 'return_type': 'void', | 518 { 'return_type': 'void', |
| 501 'names': ['glPushGroupMarkerEXT'], | 519 'names': ['glPushGroupMarkerEXT'], |
| 502 'arguments': 'GLsizei length, const char* marker', }, | 520 'arguments': 'GLsizei length, const char* marker', }, |
| 503 { 'return_type': 'void', | 521 { 'return_type': 'void', |
| 504 'names': ['glQueryCounter'], | 522 'names': ['glQueryCounter'], |
| 505 'arguments': 'GLuint id, GLenum target', }, | 523 'arguments': 'GLuint id, GLenum target', }, |
| 506 { 'return_type': 'void', | 524 { 'return_type': 'void', |
| 525 'names': ['glQueryCounterEXT'], |
| 526 'arguments': 'GLuint id, GLenum target', }, |
| 527 { 'return_type': 'void', |
| 507 'names': ['glReadBuffer'], | 528 'names': ['glReadBuffer'], |
| 508 'arguments': 'GLenum src', }, | 529 'arguments': 'GLenum src', }, |
| 509 { 'return_type': 'void', | 530 { 'return_type': 'void', |
| 510 'names': ['glReadPixels'], | 531 'names': ['glReadPixels'], |
| 511 'arguments': | 532 'arguments': |
| 512 'GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, ' | 533 'GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, ' |
| 513 'GLenum type, void* pixels', }, | 534 'GLenum type, void* pixels', }, |
| 514 { 'return_type': 'void', | 535 { 'return_type': 'void', |
| 515 'names': ['glReleaseShaderCompiler'], | 536 'names': ['glReleaseShaderCompiler'], |
| 516 'arguments': 'void', }, | 537 'arguments': 'void', }, |
| (...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2063 | 2084 |
| 2064 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), | 2085 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), |
| 2065 'wb') | 2086 'wb') |
| 2066 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) | 2087 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) |
| 2067 source_file.close() | 2088 source_file.close() |
| 2068 return 0 | 2089 return 0 |
| 2069 | 2090 |
| 2070 | 2091 |
| 2071 if __name__ == '__main__': | 2092 if __name__ == '__main__': |
| 2072 sys.exit(main(sys.argv[1:])) | 2093 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |