OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # | 2 # |
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """code generator for GL/GLES extension wrangler.""" | 7 """code generator for GL/GLES extension wrangler.""" |
8 | 8 |
9 import os | 9 import os |
10 import re | 10 import re |
11 import sys | 11 import sys |
12 | 12 |
13 GL_FUNCTIONS = [ | 13 GL_FUNCTIONS = [ |
14 ['void', ['glActiveTexture'], 'GLenum texture'], | 14 ['void', ['glActiveTexture'], 'GLenum texture'], |
15 ['void', ['glAttachShader'], 'GLuint program, GLuint shader'], | 15 ['void', ['glAttachShader'], 'GLuint program, GLuint shader'], |
16 ['void', ['glBindAttribLocation'], | 16 ['void', ['glBindAttribLocation'], |
17 'GLuint program, GLuint index, const char* name'], | 17 'GLuint program, GLuint index, const char* name'], |
18 ['void', ['glBindBuffer'], 'GLenum target, GLuint buffer'], | 18 ['void', ['glBindBuffer'], 'GLenum target, GLuint buffer'], |
| 19 ['void', ['glBindFragDataLocation'], |
| 20 'GLuint program, GLuint colorNumber, const char* name'], |
19 ['void', ['glBindFragDataLocationIndexedARB'], | 21 ['void', ['glBindFragDataLocationIndexedARB'], |
20 'GLuint program, GLuint colorNumber, GLuint index, const char* name'], | 22 'GLuint program, GLuint colorNumber, GLuint index, const char* name'], |
21 ['void', ['glBindFramebufferEXT', 'glBindFramebuffer'], | 23 ['void', ['glBindFramebufferEXT', 'glBindFramebuffer'], |
22 'GLenum target, GLuint framebuffer'], | 24 'GLenum target, GLuint framebuffer'], |
23 ['void', ['glBindRenderbufferEXT', 'glBindRenderbuffer'], | 25 ['void', ['glBindRenderbufferEXT', 'glBindRenderbuffer'], |
24 'GLenum target, GLuint renderbuffer'], | 26 'GLenum target, GLuint renderbuffer'], |
25 ['void', ['glBindTexture'], 'GLenum target, GLuint texture'], | 27 ['void', ['glBindTexture'], 'GLenum target, GLuint texture'], |
26 ['void', ['glBlendColor'], | 28 ['void', ['glBlendColor'], |
27 'GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha'], | 29 'GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha'], |
28 ['void', ['glBlendEquation'], ' GLenum mode '], | 30 ['void', ['glBlendEquation'], ' GLenum mode '], |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 GenerateSource(source_file, functions, set_name) | 663 GenerateSource(source_file, functions, set_name) |
662 source_file.close() | 664 source_file.close() |
663 | 665 |
664 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') | 666 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') |
665 GenerateMockSource(source_file, GL_FUNCTIONS) | 667 GenerateMockSource(source_file, GL_FUNCTIONS) |
666 source_file.close() | 668 source_file.close() |
667 | 669 |
668 | 670 |
669 if __name__ == '__main__': | 671 if __name__ == '__main__': |
670 main(sys.argv[1:]) | 672 main(sys.argv[1:]) |
OLD | NEW |