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