| 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 'arguments': 'GLenum matrixMode, const GLfloat* m' }, | 861 'arguments': 'GLenum matrixMode, const GLfloat* m' }, |
| 862 { 'return_type': 'void', | 862 { 'return_type': 'void', |
| 863 'known_as': 'glMatrixLoadIdentityEXT', | 863 'known_as': 'glMatrixLoadIdentityEXT', |
| 864 'versions': [{ 'name': 'glMatrixLoadIdentityEXT', | 864 'versions': [{ 'name': 'glMatrixLoadIdentityEXT', |
| 865 'gl_versions': ['gl4'], | 865 'gl_versions': ['gl4'], |
| 866 'extensions': ['GL_EXT_direct_state_access'] }, | 866 'extensions': ['GL_EXT_direct_state_access'] }, |
| 867 { 'name': 'glMatrixLoadIdentityEXT', | 867 { 'name': 'glMatrixLoadIdentityEXT', |
| 868 'gl_versions': ['es3'], | 868 'gl_versions': ['es3'], |
| 869 'extensions': ['GL_NV_path_rendering'] }], | 869 'extensions': ['GL_NV_path_rendering'] }], |
| 870 'arguments': 'GLenum matrixMode' }, | 870 'arguments': 'GLenum matrixMode' }, |
| 871 { 'return_type': 'void', |
| 872 'known_as': 'glBlendBarrierKHR', |
| 873 'versions': [{ 'name': 'glBlendBarrierNV', |
| 874 'extensions': ['GL_NV_blend_equation_advanced'] }, |
| 875 { 'name': 'glBlendBarrierKHR', |
| 876 'extensions': ['GL_KHR_blend_equation_advanced'] }], |
| 877 'arguments': 'void' }, |
| 871 ] | 878 ] |
| 872 | 879 |
| 873 OSMESA_FUNCTIONS = [ | 880 OSMESA_FUNCTIONS = [ |
| 874 { 'return_type': 'OSMesaContext', | 881 { 'return_type': 'OSMesaContext', |
| 875 'names': ['OSMesaCreateContext'], | 882 'names': ['OSMesaCreateContext'], |
| 876 'arguments': 'GLenum format, OSMesaContext sharelist', }, | 883 'arguments': 'GLenum format, OSMesaContext sharelist', }, |
| 877 { 'return_type': 'OSMesaContext', | 884 { 'return_type': 'OSMesaContext', |
| 878 'names': ['OSMesaCreateContextExt'], | 885 'names': ['OSMesaCreateContextExt'], |
| 879 'arguments': | 886 'arguments': |
| 880 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, ' | 887 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, ' |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 'extensions': ['EGL_KHR_fence_sync'] }], | 1079 'extensions': ['EGL_KHR_fence_sync'] }], |
| 1073 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync' }, | 1080 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync' }, |
| 1074 { 'return_type': 'EGLBoolean', | 1081 { 'return_type': 'EGLBoolean', |
| 1075 'names': ['eglGetSyncValuesCHROMIUM'], | 1082 'names': ['eglGetSyncValuesCHROMIUM'], |
| 1076 'arguments': | 1083 'arguments': |
| 1077 'EGLDisplay dpy, EGLSurface surface, ' | 1084 'EGLDisplay dpy, EGLSurface surface, ' |
| 1078 'EGLuint64CHROMIUM* ust, EGLuint64CHROMIUM* msc, ' | 1085 'EGLuint64CHROMIUM* ust, EGLuint64CHROMIUM* msc, ' |
| 1079 'EGLuint64CHROMIUM* sbc', }, | 1086 'EGLuint64CHROMIUM* sbc', }, |
| 1080 { 'return_type': 'EGLint', | 1087 { 'return_type': 'EGLint', |
| 1081 'versions': [{ 'name': 'eglWaitSyncKHR', | 1088 'versions': [{ 'name': 'eglWaitSyncKHR', |
| 1082 'extensions': ['EGL_KHR_fence_sync'] }], | 1089 'extensions': ['EGL_KHR_fence_sync', 'EGL_KHR_wait_sync'] }], |
| 1083 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync, EGLint flags' } | 1090 'arguments': 'EGLDisplay dpy, EGLSyncKHR sync, EGLint flags' } |
| 1084 ] | 1091 ] |
| 1085 | 1092 |
| 1086 WGL_FUNCTIONS = [ | 1093 WGL_FUNCTIONS = [ |
| 1087 { 'return_type': 'HGLRC', | 1094 { 'return_type': 'HGLRC', |
| 1088 'names': ['wglCreateContext'], | 1095 'names': ['wglCreateContext'], |
| 1089 'arguments': 'HDC hdc', }, | 1096 'arguments': 'HDC hdc', }, |
| 1090 { 'return_type': 'HGLRC', | 1097 { 'return_type': 'HGLRC', |
| 1091 'names': ['wglCreateLayerContext'], | 1098 'names': ['wglCreateLayerContext'], |
| 1092 'arguments': 'HDC hdc, int iLayerPlane', }, | 1099 'arguments': 'HDC hdc, int iLayerPlane', }, |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2080 | 2087 |
| 2081 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), | 2088 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), |
| 2082 'wb') | 2089 'wb') |
| 2083 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) | 2090 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) |
| 2084 source_file.close() | 2091 source_file.close() |
| 2085 return 0 | 2092 return 0 |
| 2086 | 2093 |
| 2087 | 2094 |
| 2088 if __name__ == '__main__': | 2095 if __name__ == '__main__': |
| 2089 sys.exit(main(sys.argv[1:])) | 2096 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |