| Index: ppapi/lib/gl/gles2/gles2.c
|
| diff --git a/ppapi/lib/gl/gles2/gles2.c b/ppapi/lib/gl/gles2/gles2.c
|
| index 8dba4741ab57cc7d4b631e0d6205ac53d14abe71..37188e53e9def350c265030c7aec96d2e548984c 100644
|
| --- a/ppapi/lib/gl/gles2/gles2.c
|
| +++ b/ppapi/lib/gl/gles2/gles2.c
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -753,3 +753,95 @@ void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
|
| glGetCurrentContextPPAPI(), x, y, width, height);
|
| }
|
|
|
| +void GL_APIENTRY glBlitFramebufferEXT(
|
| + GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0,
|
| + GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
|
| + const struct PPB_OpenGLES2FramebufferBlit* ext =
|
| + glGetFramebufferBlitInterfacePPAPI();
|
| + if (ext)
|
| + ext->BlitFramebufferEXT(
|
| + glGetCurrentContextPPAPI(), srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
|
| + dstX1, dstY1, mask, filter);
|
| +}
|
| +
|
| +void GL_APIENTRY glRenderbufferStorageMultisampleEXT(
|
| + GLenum target, GLsizei samples, GLenum internalformat, GLsizei width,
|
| + GLsizei height) {
|
| + const struct PPB_OpenGLES2FramebufferMultisample* ext =
|
| + glGetFramebufferMultisampleInterfacePPAPI();
|
| + if (ext)
|
| + ext->RenderbufferStorageMultisampleEXT(
|
| + glGetCurrentContextPPAPI(), target, samples, internalformat, width,
|
| + height);
|
| +}
|
| +
|
| +GLboolean GL_APIENTRY glEnableFeatureCHROMIUM(const char* feature) {
|
| + const struct PPB_OpenGLES2ChromiumEnableFeature* ext =
|
| + glGetChromiumEnableFeatureInterfacePPAPI();
|
| + if (ext)
|
| + return ext->EnableFeatureCHROMIUM(glGetCurrentContextPPAPI(), feature);
|
| + return 0;
|
| +}
|
| +
|
| +void* GL_APIENTRY glMapBufferSubDataCHROMIUM(
|
| + GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) {
|
| + const struct PPB_OpenGLES2ChromiumMapSub* ext =
|
| + glGetChromiumMapSubInterfacePPAPI();
|
| + if (ext)
|
| + return ext->MapBufferSubDataCHROMIUM(
|
| + glGetCurrentContextPPAPI(), target, offset, size, access);
|
| + return 0;
|
| +}
|
| +
|
| +void GL_APIENTRY glUnmapBufferSubDataCHROMIUM(const void* mem) {
|
| + const struct PPB_OpenGLES2ChromiumMapSub* ext =
|
| + glGetChromiumMapSubInterfacePPAPI();
|
| + if (ext)
|
| + ext->UnmapBufferSubDataCHROMIUM(glGetCurrentContextPPAPI(), mem);
|
| +}
|
| +
|
| +void* GL_APIENTRY glMapTexSubImage2DCHROMIUM(
|
| + GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
|
| + GLsizei height, GLenum format, GLenum type, GLenum access) {
|
| + const struct PPB_OpenGLES2ChromiumMapSub* ext =
|
| + glGetChromiumMapSubInterfacePPAPI();
|
| + if (ext)
|
| + return ext->MapTexSubImage2DCHROMIUM(
|
| + glGetCurrentContextPPAPI(), target, level, xoffset, yoffset, width,
|
| + height, format, type, access);
|
| + return 0;
|
| +}
|
| +
|
| +void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM(const void* mem) {
|
| + const struct PPB_OpenGLES2ChromiumMapSub* ext =
|
| + glGetChromiumMapSubInterfacePPAPI();
|
| + if (ext)
|
| + ext->UnmapTexSubImage2DCHROMIUM(glGetCurrentContextPPAPI(), mem);
|
| +}
|
| +
|
| +void GL_APIENTRY glDrawArraysInstancedANGLE(
|
| + GLenum mode, GLint first, GLsizei count, GLsizei primcount) {
|
| + const struct PPB_OpenGLES2InstancedArrays* ext =
|
| + glGetInstancedArraysInterfacePPAPI();
|
| + if (ext)
|
| + ext->DrawArraysInstancedANGLE(
|
| + glGetCurrentContextPPAPI(), mode, first, count, primcount);
|
| +}
|
| +
|
| +void GL_APIENTRY glDrawElementsInstancedANGLE(
|
| + GLenum mode, GLsizei count, GLenum type, const void* indices,
|
| + GLsizei primcount) {
|
| + const struct PPB_OpenGLES2InstancedArrays* ext =
|
| + glGetInstancedArraysInterfacePPAPI();
|
| + if (ext)
|
| + ext->DrawElementsInstancedANGLE(
|
| + glGetCurrentContextPPAPI(), mode, count, type, indices, primcount);
|
| +}
|
| +
|
| +void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) {
|
| + const struct PPB_OpenGLES2InstancedArrays* ext =
|
| + glGetInstancedArraysInterfacePPAPI();
|
| + if (ext)
|
| + ext->VertexAttribDivisorANGLE(glGetCurrentContextPPAPI(), index, divisor);
|
| +}
|
| +
|
|
|