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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 'versions': [{ 'name': 'glMatrixLoadfEXT', | 840 'versions': [{ 'name': 'glMatrixLoadfEXT', |
841 'gl_versions': ['gl4'], | 841 'gl_versions': ['gl4'], |
842 'extensions': ['GL_EXT_direct_state_access'] }], | 842 'extensions': ['GL_EXT_direct_state_access'] }], |
843 'arguments': 'GLenum matrixMode, const GLfloat* m' }, | 843 'arguments': 'GLenum matrixMode, const GLfloat* m' }, |
844 { 'return_type': 'void', | 844 { 'return_type': 'void', |
845 'known_as': 'glMatrixLoadIdentityEXT', | 845 'known_as': 'glMatrixLoadIdentityEXT', |
846 'versions': [{ 'name': 'glMatrixLoadIdentityEXT', | 846 'versions': [{ 'name': 'glMatrixLoadIdentityEXT', |
847 'gl_versions': ['gl4'], | 847 'gl_versions': ['gl4'], |
848 'extensions': ['GL_EXT_direct_state_access'] }], | 848 'extensions': ['GL_EXT_direct_state_access'] }], |
849 'arguments': 'GLenum matrixMode' }, | 849 'arguments': 'GLenum matrixMode' }, |
| 850 { 'return_type': 'GLuint', |
| 851 'known_as': 'glGenPathsNV', |
| 852 'versions': [{ 'name': 'glGenPathsNV', |
| 853 'gl_versions': ['gl4'], |
| 854 'extensions': ['GL_NV_path_rendering'] }], |
| 855 'arguments': 'GLsizei range' }, |
| 856 { 'return_type': 'void', |
| 857 'known_as': 'glDeletePathsNV', |
| 858 'versions': [{ 'name': 'glDeletePathsNV', |
| 859 'gl_versions': ['gl4'], |
| 860 'extensions': ['GL_NV_path_rendering'] }], |
| 861 'arguments': 'GLuint path, GLsizei range' }, |
| 862 { 'return_type': 'void', |
| 863 'known_as': 'glPathCommandsNV', |
| 864 'versions': [{ 'name': 'glPathCommandsNV', |
| 865 'gl_versions': ['gl4'], |
| 866 'extensions': ['GL_NV_path_rendering'] }], |
| 867 'arguments': 'GLuint path, GLsizei numCommands, const GLubyte* commands, ' |
| 868 'GLsizei numCoords, GLenum coordType, const GLvoid* coords' }, |
| 869 { 'return_type': 'void', |
| 870 'known_as': 'glPathParameteriNV', |
| 871 'versions': [{ 'name': 'glPathParameteriNV', |
| 872 'gl_versions': ['gl4'], |
| 873 'extensions': ['GL_NV_path_rendering'] }], |
| 874 'arguments': 'GLuint path, GLenum pname, GLint value' }, |
| 875 { 'return_type': 'void', |
| 876 'known_as': 'glPathParameterfNV', |
| 877 'versions': [{ 'name': 'glPathParameterfNV', |
| 878 'gl_versions': ['gl4'], |
| 879 'extensions': ['GL_NV_path_rendering'] }], |
| 880 'arguments': 'GLuint path, GLenum pname, GLfloat value' }, |
| 881 { 'return_type': 'void', |
| 882 'known_as': 'glPathStencilFuncNV', |
| 883 'versions': [{ 'name': 'glPathStencilFuncNV', |
| 884 'gl_versions': ['gl4'], |
| 885 'extensions': ['GL_NV_path_rendering'] }], |
| 886 'arguments': 'GLenum func, GLint ref, GLuint mask' }, |
| 887 { 'return_type': 'void', |
| 888 'known_as': 'glStencilFillPathNV', |
| 889 'versions': [{ 'name': 'glStencilFillPathNV', |
| 890 'gl_versions': ['gl4'], |
| 891 'extensions': ['GL_NV_path_rendering'] }], |
| 892 'arguments': 'GLuint path, GLenum fillMode, GLuint mask' }, |
| 893 { 'return_type': 'void', |
| 894 'known_as': 'glStencilFillPathInstancedNV', |
| 895 'versions': [{ 'name': 'glStencilFillPathInstancedNV', |
| 896 'gl_versions': ['gl4'], |
| 897 'extensions': ['GL_NV_path_rendering'] }], |
| 898 'arguments': 'GLsizei numPaths, GLenum pathNameType, const void* paths, ' |
| 899 'GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, ' |
| 900 'const GLfloat* transformValues' }, |
| 901 { 'return_type': 'void', |
| 902 'known_as': 'glStencilStrokePathNV', |
| 903 'versions': [{ 'name': 'glStencilStrokePathNV', |
| 904 'gl_versions': ['gl4'], |
| 905 'extensions': ['GL_NV_path_rendering'] }], |
| 906 'arguments': 'GLuint path, GLint reference, GLuint mask' }, |
| 907 { 'return_type': 'void', |
| 908 'known_as': 'glStencilStrokePathInstancedNV', |
| 909 'versions': [{ 'name': 'glStencilStrokePathInstancedNV', |
| 910 'gl_versions': ['gl4'], |
| 911 'extensions': ['GL_NV_path_rendering'] }], |
| 912 'arguments': 'GLsizei numPaths, GLenum pathNameType, const void* paths, ' |
| 913 'GLuint pathBase, GLint ref, GLuint mask, GLenum transformType, ' |
| 914 'const GLfloat* transformValues' }, |
| 915 { 'return_type': 'void', |
| 916 'known_as': 'glPathTexGenNV', |
| 917 'versions': [{ 'name': 'glPathTexGenNV', |
| 918 'gl_versions': ['gl4'], |
| 919 'extensions': ['GL_NV_path_rendering'] }], |
| 920 'arguments': 'GLenum texCoordSet, GLenum genMode, ' |
| 921 'GLint components, const GLfloat* coeffs', }, |
| 922 { 'return_type': 'void', |
| 923 'known_as': 'glCoverFillPathNV', |
| 924 'versions': [{ 'name': 'glCoverFillPathNV', |
| 925 'gl_versions': ['gl4'], |
| 926 'extensions': ['GL_NV_path_rendering'] }], |
| 927 'arguments': 'GLuint path, GLenum coverMode' }, |
| 928 { 'return_type': 'void', |
| 929 'known_as': 'glCoverFillPathInstancedNV', |
| 930 'versions': [{ 'name': 'glCoverFillPathInstancedNV', |
| 931 'gl_versions': ['gl4'], |
| 932 'extensions': ['GL_NV_path_rendering'] }], |
| 933 'arguments': 'GLsizei numPaths, GLenum pathNameType, const void* paths, ' |
| 934 'GLuint pathBase, GLenum coverMode, GLenum transformType, ' |
| 935 'const GLfloat* transformValues' }, |
| 936 { 'return_type': 'void', |
| 937 'known_as': 'glCoverStrokePathNV', |
| 938 'versions': [{ 'name': 'glCoverStrokePathNV', |
| 939 'gl_versions': ['gl4'], |
| 940 'extensions': ['GL_NV_path_rendering'] }], |
| 941 'arguments': 'GLuint name, GLenum coverMode' }, |
| 942 { 'return_type': 'void', |
| 943 'known_as': 'glCoverStrokePathInstancedNV', |
| 944 'versions': [{ 'name': 'glCoverStrokePathInstancedNV', |
| 945 'gl_versions': ['gl4'], |
| 946 'extensions': ['GL_NV_path_rendering'] }], |
| 947 'arguments': 'GLsizei numPaths, GLenum pathNameType, const void* paths, ' |
| 948 'GLuint pathBase, GLenum coverMode, GLenum transformType, ' |
| 949 'const GLfloat* transformValues' }, |
850 ] | 950 ] |
851 | 951 |
852 OSMESA_FUNCTIONS = [ | 952 OSMESA_FUNCTIONS = [ |
853 { 'return_type': 'OSMesaContext', | 953 { 'return_type': 'OSMesaContext', |
854 'names': ['OSMesaCreateContext'], | 954 'names': ['OSMesaCreateContext'], |
855 'arguments': 'GLenum format, OSMesaContext sharelist', }, | 955 'arguments': 'GLenum format, OSMesaContext sharelist', }, |
856 { 'return_type': 'OSMesaContext', | 956 { 'return_type': 'OSMesaContext', |
857 'names': ['OSMesaCreateContextExt'], | 957 'names': ['OSMesaCreateContextExt'], |
858 'arguments': | 958 'arguments': |
859 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, ' | 959 'GLenum format, GLint depthBits, GLint stencilBits, GLint accumBits, ' |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 | 2159 |
2060 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), | 2160 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), |
2061 'wb') | 2161 'wb') |
2062 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) | 2162 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) |
2063 source_file.close() | 2163 source_file.close() |
2064 return 0 | 2164 return 0 |
2065 | 2165 |
2066 | 2166 |
2067 if __name__ == '__main__': | 2167 if __name__ == '__main__': |
2068 sys.exit(main(sys.argv[1:])) | 2168 sys.exit(main(sys.argv[1:])) |
OLD | NEW |