| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 'names': ['glBindBuffer'], | 72 'names': ['glBindBuffer'], |
| 73 'arguments': 'GLenum target, GLuint buffer', }, | 73 'arguments': 'GLenum target, GLuint buffer', }, |
| 74 { 'return_type': 'void', | 74 { 'return_type': 'void', |
| 75 'versions': [{ 'name': 'glBindBufferBase' }], | 75 'versions': [{ 'name': 'glBindBufferBase' }], |
| 76 'arguments': 'GLenum target, GLuint index, GLuint buffer', }, | 76 'arguments': 'GLenum target, GLuint index, GLuint buffer', }, |
| 77 { 'return_type': 'void', | 77 { 'return_type': 'void', |
| 78 'versions': [{ 'name': 'glBindBufferRange' }], | 78 'versions': [{ 'name': 'glBindBufferRange' }], |
| 79 'arguments': 'GLenum target, GLuint index, GLuint buffer, GLintptr offset, ' | 79 'arguments': 'GLenum target, GLuint index, GLuint buffer, GLintptr offset, ' |
| 80 'GLsizeiptr size', }, | 80 'GLsizeiptr size', }, |
| 81 { 'return_type': 'void', | 81 { 'return_type': 'void', |
| 82 'names': ['glBindFragDataLocation'], | 82 'versions': [{ 'name': 'glBindFragDataLocation', |
| 83 'extensions': ['GL_ARB_blend_func_extended'] }, |
| 84 { 'name': 'glBindFragDataLocationEXT', |
| 85 'extensions': ['GL_EXT_blend_func_extended'] }], |
| 83 'arguments': 'GLuint program, GLuint colorNumber, const char* name', }, | 86 'arguments': 'GLuint program, GLuint colorNumber, const char* name', }, |
| 84 { 'return_type': 'void', | 87 { 'return_type': 'void', |
| 85 'names': ['glBindFragDataLocationIndexed'], | 88 'versions': [{ 'name': 'glBindFragDataLocationIndexed', |
| 89 'extensions': ['GL_ARB_blend_func_extended'] }, |
| 90 { 'name': 'glBindFragDataLocationIndexedEXT', |
| 91 'extensions': ['GL_EXT_blend_func_extended'] }], |
| 86 'arguments': | 92 'arguments': |
| 87 'GLuint program, GLuint colorNumber, GLuint index, const char* name', }, | 93 'GLuint program, GLuint colorNumber, GLuint index, const char* name', |
| 94 }, |
| 88 { 'return_type': 'void', | 95 { 'return_type': 'void', |
| 89 'names': ['glBindFramebufferEXT', 'glBindFramebuffer'], | 96 'names': ['glBindFramebufferEXT', 'glBindFramebuffer'], |
| 90 'arguments': 'GLenum target, GLuint framebuffer', }, | 97 'arguments': 'GLenum target, GLuint framebuffer', }, |
| 91 { 'return_type': 'void', | 98 { 'return_type': 'void', |
| 92 'names': ['glBindRenderbufferEXT', 'glBindRenderbuffer'], | 99 'names': ['glBindRenderbufferEXT', 'glBindRenderbuffer'], |
| 93 'arguments': 'GLenum target, GLuint renderbuffer', }, | 100 'arguments': 'GLenum target, GLuint renderbuffer', }, |
| 94 { 'return_type': 'void', | 101 { 'return_type': 'void', |
| 95 'versions': [{ 'name': 'glBindSampler' }], | 102 'versions': [{ 'name': 'glBindSampler' }], |
| 96 'arguments': 'GLuint unit, GLuint sampler', }, | 103 'arguments': 'GLuint unit, GLuint sampler', }, |
| 97 { 'return_type': 'void', | 104 { 'return_type': 'void', |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 'logging_code': """ | 543 'logging_code': """ |
| 537 GL_SERVICE_LOG("GL_RESULT: " << GLEnums::GetStringError(result)); | 544 GL_SERVICE_LOG("GL_RESULT: " << GLEnums::GetStringError(result)); |
| 538 """, }, | 545 """, }, |
| 539 { 'return_type': 'void', | 546 { 'return_type': 'void', |
| 540 'names': ['glGetFenceivNV'], | 547 'names': ['glGetFenceivNV'], |
| 541 'arguments': 'GLuint fence, GLenum pname, GLint* params', }, | 548 'arguments': 'GLuint fence, GLenum pname, GLint* params', }, |
| 542 { 'return_type': 'void', | 549 { 'return_type': 'void', |
| 543 'names': ['glGetFloatv'], | 550 'names': ['glGetFloatv'], |
| 544 'arguments': 'GLenum pname, GLfloat* params', }, | 551 'arguments': 'GLenum pname, GLfloat* params', }, |
| 545 { 'return_type': 'GLint', | 552 { 'return_type': 'GLint', |
| 553 'versions': [{'name': 'glGetFragDataIndex', |
| 554 'extensions': ['GL_ARB_blend_func_extended']}, |
| 555 {'name': 'glGetFragDataIndexEXT', |
| 556 'extensions': ['GL_EXT_blend_func_extended']}], |
| 557 'arguments': 'GLuint program, const char* name', }, |
| 558 { 'return_type': 'GLint', |
| 546 'versions': [{ 'name': 'glGetFragDataLocation' }], | 559 'versions': [{ 'name': 'glGetFragDataLocation' }], |
| 547 'arguments': 'GLuint program, const char* name', }, | 560 'arguments': 'GLuint program, const char* name', }, |
| 548 { 'return_type': 'void', | 561 { 'return_type': 'void', |
| 549 'names': ['glGetFramebufferAttachmentParameterivEXT', | 562 'names': ['glGetFramebufferAttachmentParameterivEXT', |
| 550 'glGetFramebufferAttachmentParameteriv'], | 563 'glGetFramebufferAttachmentParameteriv'], |
| 551 'arguments': 'GLenum target, ' | 564 'arguments': 'GLenum target, ' |
| 552 'GLenum attachment, GLenum pname, GLint* params', }, | 565 'GLenum attachment, GLenum pname, GLint* params', }, |
| 553 { 'return_type': 'GLenum', | 566 { 'return_type': 'GLenum', |
| 554 'names': ['glGetGraphicsResetStatusARB', | 567 'names': ['glGetGraphicsResetStatusARB', |
| 555 'glGetGraphicsResetStatusKHR', | 568 'glGetGraphicsResetStatusKHR', |
| (...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2737 'gl_enums_implementation_autogen.h'), | 2750 'gl_enums_implementation_autogen.h'), |
| 2738 'wb') | 2751 'wb') |
| 2739 GenerateEnumUtils(header_file, enum_header_filenames) | 2752 GenerateEnumUtils(header_file, enum_header_filenames) |
| 2740 header_file.close() | 2753 header_file.close() |
| 2741 ClangFormat(header_file.name) | 2754 ClangFormat(header_file.name) |
| 2742 return 0 | 2755 return 0 |
| 2743 | 2756 |
| 2744 | 2757 |
| 2745 if __name__ == '__main__': | 2758 if __name__ == '__main__': |
| 2746 sys.exit(main(sys.argv[1:])) | 2759 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |