summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer
diff options
context:
space:
mode:
authoralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 18:05:18 +0000
committeralokp@chromium.org <alokp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-15 18:05:18 +0000
commit865db8484614550a9086ff83584222426c44596b (patch)
tree0200042bc254c6d97ee22f364e6ed3922d3458c8 /gpu/command_buffer
parent55954d890dd1f817ea7f49374f1de14d826b2fa4 (diff)
downloadchromium_src-865db8484614550a9086ff83584222426c44596b.zip
chromium_src-865db8484614550a9086ff83584222426c44596b.tar.gz
chromium_src-865db8484614550a9086ff83584222426c44596b.tar.bz2
Added a stub gles2 implementation.
Review URL: http://codereview.chromium.org/5779006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69279 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer')
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index a3dabb2..46b6ea4 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -5326,6 +5326,26 @@ const PPB_OpenGLES_Dev* Graphics3D::GetOpenGLESInterface() {
file.Close()
+ def WriteGLES2ToPPAPIBridge(self, filename):
+ """Connects GLES2 helper library to PPB_OpenGLES2 interface"""
+
+ file = CWriter(filename)
+ file.Write(_LICENSE)
+ file.Write("// This file is auto-generated. DO NOT EDIT!\n\n")
+
+ file.Write("#include <GLES2/gl2.h>\n\n")
+
+ for func in self.original_functions:
+ if func.GetInfo('extension') or func.name == 'SwapBuffers':
+ continue
+
+ file.Write("%s GL_APIENTRY gl%s(%s) {\n" %
+ (func.return_type, func.name,
+ func.MakeTypedOriginalArgString("")))
+ if func.return_type != "void":
+ file.Write(" return 0;\n")
+ file.Write("}\n\n")
+
def main(argv):
"""This is the main function."""
parser = OptionParser()
@@ -5356,6 +5376,7 @@ def main(argv):
if options.alternate_mode == "ppapi":
gen.WritePepperGLES2Interface("ppapi/c/dev/ppb_opengles_dev.h")
+ gen.WriteGLES2ToPPAPIBridge("ppapi/lib/gl/gles2/gles2.c")
elif options.alternate_mode == "chrome_ppapi":
gen.WritePepperGLES2Implementation(