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 |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 ['EGLDisplay', ['eglGetCurrentDisplay'], 'void'], | 344 ['EGLDisplay', ['eglGetCurrentDisplay'], 'void'], |
345 ['EGLBoolean', ['eglQueryContext'], | 345 ['EGLBoolean', ['eglQueryContext'], |
346 'EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value'], | 346 'EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value'], |
347 ['EGLBoolean', ['eglWaitGL'], 'void'], | 347 ['EGLBoolean', ['eglWaitGL'], 'void'], |
348 ['EGLBoolean', ['eglWaitNative'], 'EGLint engine'], | 348 ['EGLBoolean', ['eglWaitNative'], 'EGLint engine'], |
349 ['EGLBoolean', ['eglSwapBuffers'], 'EGLDisplay dpy, EGLSurface surface'], | 349 ['EGLBoolean', ['eglSwapBuffers'], 'EGLDisplay dpy, EGLSurface surface'], |
350 ['EGLBoolean', ['eglCopyBuffers'], | 350 ['EGLBoolean', ['eglCopyBuffers'], |
351 'EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target'], | 351 'EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target'], |
352 ['__eglMustCastToProperFunctionPointerType', ['eglGetProcAddress'], | 352 ['__eglMustCastToProperFunctionPointerType', ['eglGetProcAddress'], |
353 'const char* procname'], | 353 'const char* procname'], |
| 354 ['EGLBoolean', ['eglQuerySurfacePointerANGLE'], |
| 355 'EGLDisplay dpy, EGLSurface surface, EGLint attribute, void** value'], |
354 ] | 356 ] |
355 | 357 |
356 WGL_FUNCTIONS = [ | 358 WGL_FUNCTIONS = [ |
357 ['HGLRC', ['wglCreateContext'], 'HDC hdc'], | 359 ['HGLRC', ['wglCreateContext'], 'HDC hdc'], |
358 ['HGLRC', ['wglCreateLayerContext'], 'HDC hdc, int iLayerPlane'], | 360 ['HGLRC', ['wglCreateLayerContext'], 'HDC hdc, int iLayerPlane'], |
359 ['BOOL', ['wglCopyContext'], 'HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask'], | 361 ['BOOL', ['wglCopyContext'], 'HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask'], |
360 ['BOOL', ['wglDeleteContext'], 'HGLRC hglrc'], | 362 ['BOOL', ['wglDeleteContext'], 'HGLRC hglrc'], |
361 ['HGLRC', ['wglGetCurrentContext'], ''], | 363 ['HGLRC', ['wglGetCurrentContext'], ''], |
362 ['HDC', ['wglGetCurrentDC'], ''], | 364 ['HDC', ['wglGetCurrentDC'], ''], |
363 ['BOOL', ['wglMakeCurrent'], 'HDC hdc, HGLRC hglrc'], | 365 ['BOOL', ['wglMakeCurrent'], 'HDC hdc, HGLRC hglrc'], |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 GenerateSource(source_file, functions, set_name) | 667 GenerateSource(source_file, functions, set_name) |
666 source_file.close() | 668 source_file.close() |
667 | 669 |
668 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') | 670 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') |
669 GenerateMockSource(source_file, GL_FUNCTIONS) | 671 GenerateMockSource(source_file, GL_FUNCTIONS) |
670 source_file.close() | 672 source_file.close() |
671 | 673 |
672 | 674 |
673 if __name__ == '__main__': | 675 if __name__ == '__main__': |
674 main(sys.argv[1:]) | 676 main(sys.argv[1:]) |
OLD | NEW |