Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(583)

Side by Side Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 10290006: Update gl2.h and gl2ext.h headers from Khronos. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/c/ppb_opengles2.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 GLES2 command buffers.""" 6 """code generator for GLES2 command buffers."""
7 7
8 import os 8 import os
9 import os.path 9 import os.path
10 import sys 10 import sys
(...skipping 6071 matching lines...) Expand 10 before | Expand all | Expand 10 after
6082 file.Close() 6082 file.Close()
6083 6083
6084 def WriteGLES2ToPPAPIBridge(self, filename): 6084 def WriteGLES2ToPPAPIBridge(self, filename):
6085 """Connects GLES2 helper library to PPB_OpenGLES2 interface""" 6085 """Connects GLES2 helper library to PPB_OpenGLES2 interface"""
6086 6086
6087 file = CWriter(filename) 6087 file = CWriter(filename)
6088 file.Write(_LICENSE) 6088 file.Write(_LICENSE)
6089 file.Write(_DO_NOT_EDIT_WARNING) 6089 file.Write(_DO_NOT_EDIT_WARNING)
6090 6090
6091 file.Write("#include <GLES2/gl2.h>\n") 6091 file.Write("#include <GLES2/gl2.h>\n")
6092 file.Write("#include <GLES2/gl2ext.h>\n")
6092 file.Write("#include \"ppapi/lib/gl/gles2/gl2ext_ppapi.h\"\n\n") 6093 file.Write("#include \"ppapi/lib/gl/gles2/gl2ext_ppapi.h\"\n\n")
6093 6094
6094 for func in self.original_functions: 6095 for func in self.original_functions:
6095 if not func.InAnyPepperExtension(): 6096 if not func.InAnyPepperExtension():
6096 continue 6097 continue
6097 6098
6098 interface = self.interface_info[func.GetInfo('pepper_interface') or ''] 6099 interface = self.interface_info[func.GetInfo('pepper_interface') or '']
6099 6100
6100 file.Write("%s GL_APIENTRY gl%s(%s) {\n" % 6101 file.Write("%s GL_APIENTRY gl%s(%s) {\n" %
6101 (func.return_type, func.name, 6102 (func.return_type, func.name,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
6245 gen.WriteCommonUtilsImpl("common/gles2_cmd_utils_implementation_autogen.h") 6246 gen.WriteCommonUtilsImpl("common/gles2_cmd_utils_implementation_autogen.h")
6246 6247
6247 if gen.errors > 0: 6248 if gen.errors > 0:
6248 print "%d errors" % gen.errors 6249 print "%d errors" % gen.errors
6249 return 1 6250 return 1
6250 return 0 6251 return 0
6251 6252
6252 6253
6253 if __name__ == '__main__': 6254 if __name__ == '__main__':
6254 sys.exit(main(sys.argv[1:])) 6255 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/ppb_opengles2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698