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

Side by Side Diff: ui/gl/generate_bindings.py

Issue 780433006: Add framebuffer object related commands to command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tex
Patch Set: Created 6 years 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
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 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 { 'return_type': 'void', 319 { 'return_type': 'void',
320 'names': ['glDetachShader'], 320 'names': ['glDetachShader'],
321 'arguments': 'GLuint program, GLuint shader', }, 321 'arguments': 'GLuint program, GLuint shader', },
322 { 'return_type': 'void', 322 { 'return_type': 'void',
323 'names': ['glDisable'], 323 'names': ['glDisable'],
324 'arguments': 'GLenum cap', }, 324 'arguments': 'GLenum cap', },
325 { 'return_type': 'void', 325 { 'return_type': 'void',
326 'names': ['glDisableVertexAttribArray'], 326 'names': ['glDisableVertexAttribArray'],
327 'arguments': 'GLuint index', }, 327 'arguments': 'GLuint index', },
328 { 'return_type': 'void', 328 { 'return_type': 'void',
329 'known_as': 'glDiscardFramebufferEXT', 329 'versions': [{ 'name': 'glDiscardFramebufferEXT',
330 'versions': [{ 'name': 'glInvalidateFramebuffer', 330 'extensions': ['GL_EXT_discard_framebuffer'] }],
331 'gl_versions': ['es3'],
332 'extensions': [] },
333 { 'name': 'glDiscardFramebufferEXT',
334 'gl_versions': ['es1', 'es2'] }],
335 'arguments': 'GLenum target, GLsizei numAttachments, ' 331 'arguments': 'GLenum target, GLsizei numAttachments, '
336 'const GLenum* attachments' }, 332 'const GLenum* attachments' },
337 { 'return_type': 'void', 333 { 'return_type': 'void',
338 'names': ['glDrawArrays'], 334 'names': ['glDrawArrays'],
339 'arguments': 'GLenum mode, GLint first, GLsizei count', }, 335 'arguments': 'GLenum mode, GLint first, GLsizei count', },
340 { 'return_type': 'void', 336 { 'return_type': 'void',
341 'known_as': 'glDrawArraysInstancedANGLE', 337 'known_as': 'glDrawArraysInstancedANGLE',
342 'names': ['glDrawArraysInstancedARB', 'glDrawArraysInstancedANGLE', 338 'names': ['glDrawArraysInstancedARB', 'glDrawArraysInstancedANGLE',
343 'glDrawArraysInstanced'], 339 'glDrawArraysInstanced'],
344 'arguments': 'GLenum mode, GLint first, GLsizei count, GLsizei primcount', }, 340 'arguments': 'GLenum mode, GLint first, GLsizei count, GLsizei primcount', },
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 { 'return_type': 'void', 687 { 'return_type': 'void',
692 'names': ['glGetVertexAttribPointerv'], 688 'names': ['glGetVertexAttribPointerv'],
693 'arguments': 'GLuint index, GLenum pname, void** pointer', }, 689 'arguments': 'GLuint index, GLenum pname, void** pointer', },
694 { 'return_type': 'void', 690 { 'return_type': 'void',
695 'names': ['glHint'], 691 'names': ['glHint'],
696 'arguments': 'GLenum target, GLenum mode', }, 692 'arguments': 'GLenum target, GLenum mode', },
697 { 'return_type': 'void', 693 { 'return_type': 'void',
698 'names': ['glInsertEventMarkerEXT'], 694 'names': ['glInsertEventMarkerEXT'],
699 'arguments': 'GLsizei length, const char* marker', }, 695 'arguments': 'GLsizei length, const char* marker', },
700 { 'return_type': 'void', 696 { 'return_type': 'void',
697 'versions': [{ 'name': 'glInvalidateFramebuffer',
698 'gl_versions': ['gl4', 'es3'] }], # GL 4.3 or higher.
699 'arguments': 'GLenum target, GLsizei numAttachments, '
700 'const GLenum* attachments' },
701 { 'return_type': 'void',
701 'versions': [{ 'name': 'glInvalidateSubFramebuffer', 702 'versions': [{ 'name': 'glInvalidateSubFramebuffer',
702 'gl_versions': ['gl4', 'es3'] }], # GL 4.3 or higher. 703 'gl_versions': ['gl4', 'es3'] }], # GL 4.3 or higher.
703 'arguments': 704 'arguments':
704 'GLenum target, GLsizei numAttachments, const GLenum* attachments, ' 705 'GLenum target, GLsizei numAttachments, const GLenum* attachments, '
705 'GLint x, GLint y, GLint width, GLint height', }, 706 'GLint x, GLint y, GLint width, GLint height', },
706 { 'return_type': 'GLboolean', 707 { 'return_type': 'GLboolean',
707 'names': ['glIsBuffer'], 708 'names': ['glIsBuffer'],
708 'arguments': 'GLuint buffer', }, 709 'arguments': 'GLuint buffer', },
709 { 'return_type': 'GLboolean', 710 { 'return_type': 'GLboolean',
710 'names': ['glIsEnabled'], 711 'names': ['glIsEnabled'],
(...skipping 1739 matching lines...) Expand 10 before | Expand all | Expand 10 after
2450 2451
2451 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), 2452 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'),
2452 'wb') 2453 'wb')
2453 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) 2454 GenerateMockBindingsSource(source_file, GL_FUNCTIONS)
2454 source_file.close() 2455 source_file.close()
2455 return 0 2456 return 0
2456 2457
2457 2458
2458 if __name__ == '__main__': 2459 if __name__ == '__main__':
2459 sys.exit(main(sys.argv[1:])) 2460 sys.exit(main(sys.argv[1:]))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698