| 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 collections | 10 import collections |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 'Display* dpy, GLXDrawable drawable, int interval'], | 466 'Display* dpy, GLXDrawable drawable, int interval'], |
| 467 ['GLXFBConfig', ['glXGetFBConfigFromVisualSGIX'], | 467 ['GLXFBConfig', ['glXGetFBConfigFromVisualSGIX'], |
| 468 'Display* dpy, XVisualInfo* visualInfo'], | 468 'Display* dpy, XVisualInfo* visualInfo'], |
| 469 ['GLXContext', ['glXCreateContextAttribsARB'], | 469 ['GLXContext', ['glXCreateContextAttribsARB'], |
| 470 'Display* dpy, GLXFBConfig config, GLXContext share_context, int direct, ' | 470 'Display* dpy, GLXFBConfig config, GLXContext share_context, int direct, ' |
| 471 'const int* attrib_list'], | 471 'const int* attrib_list'], |
| 472 ] | 472 ] |
| 473 | 473 |
| 474 FUNCTION_SETS = [ | 474 FUNCTION_SETS = [ |
| 475 [GL_FUNCTIONS, 'gl', ['../../../third_party/mesa/MesaLib/include/GL/glext.h', | 475 [GL_FUNCTIONS, 'gl', ['../../../third_party/mesa/MesaLib/include/GL/glext.h', |
| 476 '../../../third_party/khronos/GLES2/gl2ext.h']], | 476 '../../../gpu/GLES2/gl2ext.h']], |
| 477 [OSMESA_FUNCTIONS, 'osmesa', []], | 477 [OSMESA_FUNCTIONS, 'osmesa', []], |
| 478 [EGL_FUNCTIONS, 'egl', ['../../../third_party/khronos/EGL/eglext.h']], | 478 [EGL_FUNCTIONS, 'egl', ['../../../gpu/EGL/eglext.h']], |
| 479 [WGL_FUNCTIONS, 'wgl', [ | 479 [WGL_FUNCTIONS, 'wgl', [ |
| 480 '../../../third_party/mesa/MesaLib/include/GL/wglext.h']], | 480 '../../../third_party/mesa/MesaLib/include/GL/wglext.h']], |
| 481 [GLX_FUNCTIONS, 'glx', [ | 481 [GLX_FUNCTIONS, 'glx', [ |
| 482 '../../../third_party/mesa/MesaLib/include/GL/glxext.h']], | 482 '../../../third_party/mesa/MesaLib/include/GL/glxext.h']], |
| 483 ] | 483 ] |
| 484 | 484 |
| 485 def GenerateHeader(file, functions, set_name, used_extension_functions): | 485 def GenerateHeader(file, functions, set_name, used_extension_functions): |
| 486 """Generates gl_binding_autogen_x.h""" | 486 """Generates gl_binding_autogen_x.h""" |
| 487 | 487 |
| 488 # Write file header. | 488 # Write file header. |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 GenerateSource(source_file, functions, set_name, used_extension_functions) | 885 GenerateSource(source_file, functions, set_name, used_extension_functions) |
| 886 source_file.close() | 886 source_file.close() |
| 887 | 887 |
| 888 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') | 888 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') |
| 889 GenerateMockSource(source_file, GL_FUNCTIONS) | 889 GenerateMockSource(source_file, GL_FUNCTIONS) |
| 890 source_file.close() | 890 source_file.close() |
| 891 | 891 |
| 892 | 892 |
| 893 if __name__ == '__main__': | 893 if __name__ == '__main__': |
| 894 main(sys.argv[1:]) | 894 main(sys.argv[1:]) |
| OLD | NEW |