| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file is auto-generated. DO NOT EDIT! | 5 // This file is auto-generated. DO NOT EDIT! |
| 6 | 6 |
| 7 #include "native_client/src/shared/ppapi_proxy/plugin_context_3d.h" | 7 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.h" |
| 8 | 8 |
| 9 #include "gpu/command_buffer/client/gles2_implementation.h" | 9 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 10 #include "native_client/src/third_party/ppapi/c/dev/ppb_opengles_dev.h" | 10 #include "native_client/src/third_party/ppapi/c/dev/ppb_opengles_dev.h" |
| 11 | 11 |
| 12 using ppapi_proxy::PluginContext3D; | 12 using ppapi_proxy::PluginGraphics3D; |
| 13 using ppapi_proxy::PluginResource; | 13 using ppapi_proxy::PluginResource; |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 void ActiveTexture(PP_Resource context, GLenum texture) { | 17 void ActiveTexture(PP_Resource context, GLenum texture) { |
| 18 PluginContext3D::implFromResource(context)->ActiveTexture(texture); | 18 PluginGraphics3D::implFromResource(context)->ActiveTexture(texture); |
| 19 } | 19 } |
| 20 void AttachShader(PP_Resource context, GLuint program, GLuint shader) { | 20 void AttachShader(PP_Resource context, GLuint program, GLuint shader) { |
| 21 PluginContext3D::implFromResource(context)->AttachShader(program, shader); | 21 PluginGraphics3D::implFromResource(context)->AttachShader(program, shader); |
| 22 } | 22 } |
| 23 void BindAttribLocation( | 23 void BindAttribLocation( |
| 24 PP_Resource context, GLuint program, GLuint index, const char* name) { | 24 PP_Resource context, GLuint program, GLuint index, const char* name) { |
| 25 PluginContext3D::implFromResource( | 25 PluginGraphics3D::implFromResource( |
| 26 context)->BindAttribLocation(program, index, name); | 26 context)->BindAttribLocation(program, index, name); |
| 27 } | 27 } |
| 28 void BindBuffer(PP_Resource context, GLenum target, GLuint buffer) { | 28 void BindBuffer(PP_Resource context, GLenum target, GLuint buffer) { |
| 29 PluginContext3D::implFromResource(context)->BindBuffer(target, buffer); | 29 PluginGraphics3D::implFromResource(context)->BindBuffer(target, buffer); |
| 30 } | 30 } |
| 31 void BindFramebuffer(PP_Resource context, GLenum target, GLuint framebuffer) { | 31 void BindFramebuffer(PP_Resource context, GLenum target, GLuint framebuffer) { |
| 32 PluginContext3D::implFromResource( | 32 PluginGraphics3D::implFromResource( |
| 33 context)->BindFramebuffer(target, framebuffer); | 33 context)->BindFramebuffer(target, framebuffer); |
| 34 } | 34 } |
| 35 void BindRenderbuffer( | 35 void BindRenderbuffer( |
| 36 PP_Resource context, GLenum target, GLuint renderbuffer) { | 36 PP_Resource context, GLenum target, GLuint renderbuffer) { |
| 37 PluginContext3D::implFromResource( | 37 PluginGraphics3D::implFromResource( |
| 38 context)->BindRenderbuffer(target, renderbuffer); | 38 context)->BindRenderbuffer(target, renderbuffer); |
| 39 } | 39 } |
| 40 void BindTexture(PP_Resource context, GLenum target, GLuint texture) { | 40 void BindTexture(PP_Resource context, GLenum target, GLuint texture) { |
| 41 PluginContext3D::implFromResource(context)->BindTexture(target, texture); | 41 PluginGraphics3D::implFromResource(context)->BindTexture(target, texture); |
| 42 } | 42 } |
| 43 void BlendColor( | 43 void BlendColor( |
| 44 PP_Resource context, GLclampf red, GLclampf green, GLclampf blue, | 44 PP_Resource context, GLclampf red, GLclampf green, GLclampf blue, |
| 45 GLclampf alpha) { | 45 GLclampf alpha) { |
| 46 PluginContext3D::implFromResource( | 46 PluginGraphics3D::implFromResource( |
| 47 context)->BlendColor(red, green, blue, alpha); | 47 context)->BlendColor(red, green, blue, alpha); |
| 48 } | 48 } |
| 49 void BlendEquation(PP_Resource context, GLenum mode) { | 49 void BlendEquation(PP_Resource context, GLenum mode) { |
| 50 PluginContext3D::implFromResource(context)->BlendEquation(mode); | 50 PluginGraphics3D::implFromResource(context)->BlendEquation(mode); |
| 51 } | 51 } |
| 52 void BlendEquationSeparate( | 52 void BlendEquationSeparate( |
| 53 PP_Resource context, GLenum modeRGB, GLenum modeAlpha) { | 53 PP_Resource context, GLenum modeRGB, GLenum modeAlpha) { |
| 54 PluginContext3D::implFromResource( | 54 PluginGraphics3D::implFromResource( |
| 55 context)->BlendEquationSeparate(modeRGB, modeAlpha); | 55 context)->BlendEquationSeparate(modeRGB, modeAlpha); |
| 56 } | 56 } |
| 57 void BlendFunc(PP_Resource context, GLenum sfactor, GLenum dfactor) { | 57 void BlendFunc(PP_Resource context, GLenum sfactor, GLenum dfactor) { |
| 58 PluginContext3D::implFromResource(context)->BlendFunc(sfactor, dfactor); | 58 PluginGraphics3D::implFromResource(context)->BlendFunc(sfactor, dfactor); |
| 59 } | 59 } |
| 60 void BlendFuncSeparate( | 60 void BlendFuncSeparate( |
| 61 PP_Resource context, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, | 61 PP_Resource context, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, |
| 62 GLenum dstAlpha) { | 62 GLenum dstAlpha) { |
| 63 PluginContext3D::implFromResource( | 63 PluginGraphics3D::implFromResource( |
| 64 context)->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); | 64 context)->BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); |
| 65 } | 65 } |
| 66 void BufferData( | 66 void BufferData( |
| 67 PP_Resource context, GLenum target, GLsizeiptr size, const void* data, | 67 PP_Resource context, GLenum target, GLsizeiptr size, const void* data, |
| 68 GLenum usage) { | 68 GLenum usage) { |
| 69 PluginContext3D::implFromResource( | 69 PluginGraphics3D::implFromResource( |
| 70 context)->BufferData(target, size, data, usage); | 70 context)->BufferData(target, size, data, usage); |
| 71 } | 71 } |
| 72 void BufferSubData( | 72 void BufferSubData( |
| 73 PP_Resource context, GLenum target, GLintptr offset, GLsizeiptr size, | 73 PP_Resource context, GLenum target, GLintptr offset, GLsizeiptr size, |
| 74 const void* data) { | 74 const void* data) { |
| 75 PluginContext3D::implFromResource( | 75 PluginGraphics3D::implFromResource( |
| 76 context)->BufferSubData(target, offset, size, data); | 76 context)->BufferSubData(target, offset, size, data); |
| 77 } | 77 } |
| 78 GLenum CheckFramebufferStatus(PP_Resource context, GLenum target) { | 78 GLenum CheckFramebufferStatus(PP_Resource context, GLenum target) { |
| 79 return PluginContext3D::implFromResource( | 79 return PluginGraphics3D::implFromResource( |
| 80 context)->CheckFramebufferStatus(target); | 80 context)->CheckFramebufferStatus(target); |
| 81 } | 81 } |
| 82 void Clear(PP_Resource context, GLbitfield mask) { | 82 void Clear(PP_Resource context, GLbitfield mask) { |
| 83 PluginContext3D::implFromResource(context)->Clear(mask); | 83 PluginGraphics3D::implFromResource(context)->Clear(mask); |
| 84 } | 84 } |
| 85 void ClearColor( | 85 void ClearColor( |
| 86 PP_Resource context, GLclampf red, GLclampf green, GLclampf blue, | 86 PP_Resource context, GLclampf red, GLclampf green, GLclampf blue, |
| 87 GLclampf alpha) { | 87 GLclampf alpha) { |
| 88 PluginContext3D::implFromResource( | 88 PluginGraphics3D::implFromResource( |
| 89 context)->ClearColor(red, green, blue, alpha); | 89 context)->ClearColor(red, green, blue, alpha); |
| 90 } | 90 } |
| 91 void ClearDepthf(PP_Resource context, GLclampf depth) { | 91 void ClearDepthf(PP_Resource context, GLclampf depth) { |
| 92 PluginContext3D::implFromResource(context)->ClearDepthf(depth); | 92 PluginGraphics3D::implFromResource(context)->ClearDepthf(depth); |
| 93 } | 93 } |
| 94 void ClearStencil(PP_Resource context, GLint s) { | 94 void ClearStencil(PP_Resource context, GLint s) { |
| 95 PluginContext3D::implFromResource(context)->ClearStencil(s); | 95 PluginGraphics3D::implFromResource(context)->ClearStencil(s); |
| 96 } | 96 } |
| 97 void ColorMask( | 97 void ColorMask( |
| 98 PP_Resource context, GLboolean red, GLboolean green, GLboolean blue, | 98 PP_Resource context, GLboolean red, GLboolean green, GLboolean blue, |
| 99 GLboolean alpha) { | 99 GLboolean alpha) { |
| 100 PluginContext3D::implFromResource( | 100 PluginGraphics3D::implFromResource( |
| 101 context)->ColorMask(red, green, blue, alpha); | 101 context)->ColorMask(red, green, blue, alpha); |
| 102 } | 102 } |
| 103 void CompileShader(PP_Resource context, GLuint shader) { | 103 void CompileShader(PP_Resource context, GLuint shader) { |
| 104 PluginContext3D::implFromResource(context)->CompileShader(shader); | 104 PluginGraphics3D::implFromResource(context)->CompileShader(shader); |
| 105 } | 105 } |
| 106 void CompressedTexImage2D( | 106 void CompressedTexImage2D( |
| 107 PP_Resource context, GLenum target, GLint level, GLenum internalformat, | 107 PP_Resource context, GLenum target, GLint level, GLenum internalformat, |
| 108 GLsizei width, GLsizei height, GLint border, GLsizei imageSize, | 108 GLsizei width, GLsizei height, GLint border, GLsizei imageSize, |
| 109 const void* data) { | 109 const void* data) { |
| 110 PluginContext3D::implFromResource( | 110 PluginGraphics3D::implFromResource( |
| 111 context)->CompressedTexImage2D( | 111 context)->CompressedTexImage2D( |
| 112 target, level, internalformat, width, height, border, imageSize, | 112 target, level, internalformat, width, height, border, imageSize, |
| 113 data); | 113 data); |
| 114 } | 114 } |
| 115 void CompressedTexSubImage2D( | 115 void CompressedTexSubImage2D( |
| 116 PP_Resource context, GLenum target, GLint level, GLint xoffset, | 116 PP_Resource context, GLenum target, GLint level, GLint xoffset, |
| 117 GLint yoffset, GLsizei width, GLsizei height, GLenum format, | 117 GLint yoffset, GLsizei width, GLsizei height, GLenum format, |
| 118 GLsizei imageSize, const void* data) { | 118 GLsizei imageSize, const void* data) { |
| 119 PluginContext3D::implFromResource( | 119 PluginGraphics3D::implFromResource( |
| 120 context)->CompressedTexSubImage2D( | 120 context)->CompressedTexSubImage2D( |
| 121 target, level, xoffset, yoffset, width, height, format, imageSize, | 121 target, level, xoffset, yoffset, width, height, format, imageSize, |
| 122 data); | 122 data); |
| 123 } | 123 } |
| 124 void CopyTexImage2D( | 124 void CopyTexImage2D( |
| 125 PP_Resource context, GLenum target, GLint level, GLenum internalformat, | 125 PP_Resource context, GLenum target, GLint level, GLenum internalformat, |
| 126 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { | 126 GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { |
| 127 PluginContext3D::implFromResource( | 127 PluginGraphics3D::implFromResource( |
| 128 context)->CopyTexImage2D( | 128 context)->CopyTexImage2D( |
| 129 target, level, internalformat, x, y, width, height, border); | 129 target, level, internalformat, x, y, width, height, border); |
| 130 } | 130 } |
| 131 void CopyTexSubImage2D( | 131 void CopyTexSubImage2D( |
| 132 PP_Resource context, GLenum target, GLint level, GLint xoffset, | 132 PP_Resource context, GLenum target, GLint level, GLint xoffset, |
| 133 GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { | 133 GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { |
| 134 PluginContext3D::implFromResource( | 134 PluginGraphics3D::implFromResource( |
| 135 context)->CopyTexSubImage2D( | 135 context)->CopyTexSubImage2D( |
| 136 target, level, xoffset, yoffset, x, y, width, height); | 136 target, level, xoffset, yoffset, x, y, width, height); |
| 137 } | 137 } |
| 138 GLuint CreateProgram(PP_Resource context) { | 138 GLuint CreateProgram(PP_Resource context) { |
| 139 return PluginContext3D::implFromResource(context)->CreateProgram(); | 139 return PluginGraphics3D::implFromResource(context)->CreateProgram(); |
| 140 } | 140 } |
| 141 GLuint CreateShader(PP_Resource context, GLenum type) { | 141 GLuint CreateShader(PP_Resource context, GLenum type) { |
| 142 return PluginContext3D::implFromResource(context)->CreateShader(type); | 142 return PluginGraphics3D::implFromResource(context)->CreateShader(type); |
| 143 } | 143 } |
| 144 void CullFace(PP_Resource context, GLenum mode) { | 144 void CullFace(PP_Resource context, GLenum mode) { |
| 145 PluginContext3D::implFromResource(context)->CullFace(mode); | 145 PluginGraphics3D::implFromResource(context)->CullFace(mode); |
| 146 } | 146 } |
| 147 void DeleteBuffers(PP_Resource context, GLsizei n, const GLuint* buffers) { | 147 void DeleteBuffers(PP_Resource context, GLsizei n, const GLuint* buffers) { |
| 148 PluginContext3D::implFromResource(context)->DeleteBuffers(n, buffers); | 148 PluginGraphics3D::implFromResource(context)->DeleteBuffers(n, buffers); |
| 149 } | 149 } |
| 150 void DeleteFramebuffers( | 150 void DeleteFramebuffers( |
| 151 PP_Resource context, GLsizei n, const GLuint* framebuffers) { | 151 PP_Resource context, GLsizei n, const GLuint* framebuffers) { |
| 152 PluginContext3D::implFromResource( | 152 PluginGraphics3D::implFromResource( |
| 153 context)->DeleteFramebuffers(n, framebuffers); | 153 context)->DeleteFramebuffers(n, framebuffers); |
| 154 } | 154 } |
| 155 void DeleteProgram(PP_Resource context, GLuint program) { | 155 void DeleteProgram(PP_Resource context, GLuint program) { |
| 156 PluginContext3D::implFromResource(context)->DeleteProgram(program); | 156 PluginGraphics3D::implFromResource(context)->DeleteProgram(program); |
| 157 } | 157 } |
| 158 void DeleteRenderbuffers( | 158 void DeleteRenderbuffers( |
| 159 PP_Resource context, GLsizei n, const GLuint* renderbuffers) { | 159 PP_Resource context, GLsizei n, const GLuint* renderbuffers) { |
| 160 PluginContext3D::implFromResource( | 160 PluginGraphics3D::implFromResource( |
| 161 context)->DeleteRenderbuffers(n, renderbuffers); | 161 context)->DeleteRenderbuffers(n, renderbuffers); |
| 162 } | 162 } |
| 163 void DeleteShader(PP_Resource context, GLuint shader) { | 163 void DeleteShader(PP_Resource context, GLuint shader) { |
| 164 PluginContext3D::implFromResource(context)->DeleteShader(shader); | 164 PluginGraphics3D::implFromResource(context)->DeleteShader(shader); |
| 165 } | 165 } |
| 166 void DeleteTextures(PP_Resource context, GLsizei n, const GLuint* textures) { | 166 void DeleteTextures(PP_Resource context, GLsizei n, const GLuint* textures) { |
| 167 PluginContext3D::implFromResource(context)->DeleteTextures(n, textures); | 167 PluginGraphics3D::implFromResource(context)->DeleteTextures(n, textures); |
| 168 } | 168 } |
| 169 void DepthFunc(PP_Resource context, GLenum func) { | 169 void DepthFunc(PP_Resource context, GLenum func) { |
| 170 PluginContext3D::implFromResource(context)->DepthFunc(func); | 170 PluginGraphics3D::implFromResource(context)->DepthFunc(func); |
| 171 } | 171 } |
| 172 void DepthMask(PP_Resource context, GLboolean flag) { | 172 void DepthMask(PP_Resource context, GLboolean flag) { |
| 173 PluginContext3D::implFromResource(context)->DepthMask(flag); | 173 PluginGraphics3D::implFromResource(context)->DepthMask(flag); |
| 174 } | 174 } |
| 175 void DepthRangef(PP_Resource context, GLclampf zNear, GLclampf zFar) { | 175 void DepthRangef(PP_Resource context, GLclampf zNear, GLclampf zFar) { |
| 176 PluginContext3D::implFromResource(context)->DepthRangef(zNear, zFar); | 176 PluginGraphics3D::implFromResource(context)->DepthRangef(zNear, zFar); |
| 177 } | 177 } |
| 178 void DetachShader(PP_Resource context, GLuint program, GLuint shader) { | 178 void DetachShader(PP_Resource context, GLuint program, GLuint shader) { |
| 179 PluginContext3D::implFromResource(context)->DetachShader(program, shader); | 179 PluginGraphics3D::implFromResource(context)->DetachShader(program, shader); |
| 180 } | 180 } |
| 181 void Disable(PP_Resource context, GLenum cap) { | 181 void Disable(PP_Resource context, GLenum cap) { |
| 182 PluginContext3D::implFromResource(context)->Disable(cap); | 182 PluginGraphics3D::implFromResource(context)->Disable(cap); |
| 183 } | 183 } |
| 184 void DisableVertexAttribArray(PP_Resource context, GLuint index) { | 184 void DisableVertexAttribArray(PP_Resource context, GLuint index) { |
| 185 PluginContext3D::implFromResource(context)->DisableVertexAttribArray(index); | 185 PluginGraphics3D::implFromResource(context)->DisableVertexAttribArray(index); |
| 186 } | 186 } |
| 187 void DrawArrays(PP_Resource context, GLenum mode, GLint first, GLsizei count) { | 187 void DrawArrays(PP_Resource context, GLenum mode, GLint first, GLsizei count) { |
| 188 PluginContext3D::implFromResource(context)->DrawArrays(mode, first, count); | 188 PluginGraphics3D::implFromResource(context)->DrawArrays(mode, first, count); |
| 189 } | 189 } |
| 190 void DrawElements( | 190 void DrawElements( |
| 191 PP_Resource context, GLenum mode, GLsizei count, GLenum type, | 191 PP_Resource context, GLenum mode, GLsizei count, GLenum type, |
| 192 const void* indices) { | 192 const void* indices) { |
| 193 PluginContext3D::implFromResource( | 193 PluginGraphics3D::implFromResource( |
| 194 context)->DrawElements(mode, count, type, indices); | 194 context)->DrawElements(mode, count, type, indices); |
| 195 } | 195 } |
| 196 void Enable(PP_Resource context, GLenum cap) { | 196 void Enable(PP_Resource context, GLenum cap) { |
| 197 PluginContext3D::implFromResource(context)->Enable(cap); | 197 PluginGraphics3D::implFromResource(context)->Enable(cap); |
| 198 } | 198 } |
| 199 void EnableVertexAttribArray(PP_Resource context, GLuint index) { | 199 void EnableVertexAttribArray(PP_Resource context, GLuint index) { |
| 200 PluginContext3D::implFromResource(context)->EnableVertexAttribArray(index); | 200 PluginGraphics3D::implFromResource(context)->EnableVertexAttribArray(index); |
| 201 } | 201 } |
| 202 void Finish(PP_Resource context) { | 202 void Finish(PP_Resource context) { |
| 203 PluginContext3D::implFromResource(context)->Finish(); | 203 PluginGraphics3D::implFromResource(context)->Finish(); |
| 204 } | 204 } |
| 205 void Flush(PP_Resource context) { | 205 void Flush(PP_Resource context) { |
| 206 PluginContext3D::implFromResource(context)->Flush(); | 206 PluginGraphics3D::implFromResource(context)->Flush(); |
| 207 } | 207 } |
| 208 void FramebufferRenderbuffer( | 208 void FramebufferRenderbuffer( |
| 209 PP_Resource context, GLenum target, GLenum attachment, | 209 PP_Resource context, GLenum target, GLenum attachment, |
| 210 GLenum renderbuffertarget, GLuint renderbuffer) { | 210 GLenum renderbuffertarget, GLuint renderbuffer) { |
| 211 PluginContext3D::implFromResource( | 211 PluginGraphics3D::implFromResource( |
| 212 context)->FramebufferRenderbuffer( | 212 context)->FramebufferRenderbuffer( |
| 213 target, attachment, renderbuffertarget, renderbuffer); | 213 target, attachment, renderbuffertarget, renderbuffer); |
| 214 } | 214 } |
| 215 void FramebufferTexture2D( | 215 void FramebufferTexture2D( |
| 216 PP_Resource context, GLenum target, GLenum attachment, GLenum textarget, | 216 PP_Resource context, GLenum target, GLenum attachment, GLenum textarget, |
| 217 GLuint texture, GLint level) { | 217 GLuint texture, GLint level) { |
| 218 PluginContext3D::implFromResource( | 218 PluginGraphics3D::implFromResource( |
| 219 context)->FramebufferTexture2D( | 219 context)->FramebufferTexture2D( |
| 220 target, attachment, textarget, texture, level); | 220 target, attachment, textarget, texture, level); |
| 221 } | 221 } |
| 222 void FrontFace(PP_Resource context, GLenum mode) { | 222 void FrontFace(PP_Resource context, GLenum mode) { |
| 223 PluginContext3D::implFromResource(context)->FrontFace(mode); | 223 PluginGraphics3D::implFromResource(context)->FrontFace(mode); |
| 224 } | 224 } |
| 225 void GenBuffers(PP_Resource context, GLsizei n, GLuint* buffers) { | 225 void GenBuffers(PP_Resource context, GLsizei n, GLuint* buffers) { |
| 226 PluginContext3D::implFromResource(context)->GenBuffers(n, buffers); | 226 PluginGraphics3D::implFromResource(context)->GenBuffers(n, buffers); |
| 227 } | 227 } |
| 228 void GenerateMipmap(PP_Resource context, GLenum target) { | 228 void GenerateMipmap(PP_Resource context, GLenum target) { |
| 229 PluginContext3D::implFromResource(context)->GenerateMipmap(target); | 229 PluginGraphics3D::implFromResource(context)->GenerateMipmap(target); |
| 230 } | 230 } |
| 231 void GenFramebuffers(PP_Resource context, GLsizei n, GLuint* framebuffers) { | 231 void GenFramebuffers(PP_Resource context, GLsizei n, GLuint* framebuffers) { |
| 232 PluginContext3D::implFromResource(context)->GenFramebuffers(n, framebuffers); | 232 PluginGraphics3D::implFromResource(context)->GenFramebuffers(n, framebuffers); |
| 233 } | 233 } |
| 234 void GenRenderbuffers(PP_Resource context, GLsizei n, GLuint* renderbuffers) { | 234 void GenRenderbuffers(PP_Resource context, GLsizei n, GLuint* renderbuffers) { |
| 235 PluginContext3D::implFromResource( | 235 PluginGraphics3D::implFromResource( |
| 236 context)->GenRenderbuffers(n, renderbuffers); | 236 context)->GenRenderbuffers(n, renderbuffers); |
| 237 } | 237 } |
| 238 void GenTextures(PP_Resource context, GLsizei n, GLuint* textures) { | 238 void GenTextures(PP_Resource context, GLsizei n, GLuint* textures) { |
| 239 PluginContext3D::implFromResource(context)->GenTextures(n, textures); | 239 PluginGraphics3D::implFromResource(context)->GenTextures(n, textures); |
| 240 } | 240 } |
| 241 void GetActiveAttrib( | 241 void GetActiveAttrib( |
| 242 PP_Resource context, GLuint program, GLuint index, GLsizei bufsize, | 242 PP_Resource context, GLuint program, GLuint index, GLsizei bufsize, |
| 243 GLsizei* length, GLint* size, GLenum* type, char* name) { | 243 GLsizei* length, GLint* size, GLenum* type, char* name) { |
| 244 PluginContext3D::implFromResource( | 244 PluginGraphics3D::implFromResource( |
| 245 context)->GetActiveAttrib( | 245 context)->GetActiveAttrib( |
| 246 program, index, bufsize, length, size, type, name); | 246 program, index, bufsize, length, size, type, name); |
| 247 } | 247 } |
| 248 void GetActiveUniform( | 248 void GetActiveUniform( |
| 249 PP_Resource context, GLuint program, GLuint index, GLsizei bufsize, | 249 PP_Resource context, GLuint program, GLuint index, GLsizei bufsize, |
| 250 GLsizei* length, GLint* size, GLenum* type, char* name) { | 250 GLsizei* length, GLint* size, GLenum* type, char* name) { |
| 251 PluginContext3D::implFromResource( | 251 PluginGraphics3D::implFromResource( |
| 252 context)->GetActiveUniform( | 252 context)->GetActiveUniform( |
| 253 program, index, bufsize, length, size, type, name); | 253 program, index, bufsize, length, size, type, name); |
| 254 } | 254 } |
| 255 void GetAttachedShaders( | 255 void GetAttachedShaders( |
| 256 PP_Resource context, GLuint program, GLsizei maxcount, GLsizei* count, | 256 PP_Resource context, GLuint program, GLsizei maxcount, GLsizei* count, |
| 257 GLuint* shaders) { | 257 GLuint* shaders) { |
| 258 PluginContext3D::implFromResource( | 258 PluginGraphics3D::implFromResource( |
| 259 context)->GetAttachedShaders(program, maxcount, count, shaders); | 259 context)->GetAttachedShaders(program, maxcount, count, shaders); |
| 260 } | 260 } |
| 261 GLint GetAttribLocation( | 261 GLint GetAttribLocation( |
| 262 PP_Resource context, GLuint program, const char* name) { | 262 PP_Resource context, GLuint program, const char* name) { |
| 263 return PluginContext3D::implFromResource( | 263 return PluginGraphics3D::implFromResource( |
| 264 context)->GetAttribLocation(program, name); | 264 context)->GetAttribLocation(program, name); |
| 265 } | 265 } |
| 266 void GetBooleanv(PP_Resource context, GLenum pname, GLboolean* params) { | 266 void GetBooleanv(PP_Resource context, GLenum pname, GLboolean* params) { |
| 267 PluginContext3D::implFromResource(context)->GetBooleanv(pname, params); | 267 PluginGraphics3D::implFromResource(context)->GetBooleanv(pname, params); |
| 268 } | 268 } |
| 269 void GetBufferParameteriv( | 269 void GetBufferParameteriv( |
| 270 PP_Resource context, GLenum target, GLenum pname, GLint* params) { | 270 PP_Resource context, GLenum target, GLenum pname, GLint* params) { |
| 271 PluginContext3D::implFromResource( | 271 PluginGraphics3D::implFromResource( |
| 272 context)->GetBufferParameteriv(target, pname, params); | 272 context)->GetBufferParameteriv(target, pname, params); |
| 273 } | 273 } |
| 274 GLenum GetError(PP_Resource context) { | 274 GLenum GetError(PP_Resource context) { |
| 275 return PluginContext3D::implFromResource(context)->GetError(); | 275 return PluginGraphics3D::implFromResource(context)->GetError(); |
| 276 } | 276 } |
| 277 void GetFloatv(PP_Resource context, GLenum pname, GLfloat* params) { | 277 void GetFloatv(PP_Resource context, GLenum pname, GLfloat* params) { |
| 278 PluginContext3D::implFromResource(context)->GetFloatv(pname, params); | 278 PluginGraphics3D::implFromResource(context)->GetFloatv(pname, params); |
| 279 } | 279 } |
| 280 void GetFramebufferAttachmentParameteriv( | 280 void GetFramebufferAttachmentParameteriv( |
| 281 PP_Resource context, GLenum target, GLenum attachment, GLenum pname, | 281 PP_Resource context, GLenum target, GLenum attachment, GLenum pname, |
| 282 GLint* params) { | 282 GLint* params) { |
| 283 PluginContext3D::implFromResource( | 283 PluginGraphics3D::implFromResource( |
| 284 context)->GetFramebufferAttachmentParameteriv( | 284 context)->GetFramebufferAttachmentParameteriv( |
| 285 target, attachment, pname, params); | 285 target, attachment, pname, params); |
| 286 } | 286 } |
| 287 void GetIntegerv(PP_Resource context, GLenum pname, GLint* params) { | 287 void GetIntegerv(PP_Resource context, GLenum pname, GLint* params) { |
| 288 PluginContext3D::implFromResource(context)->GetIntegerv(pname, params); | 288 PluginGraphics3D::implFromResource(context)->GetIntegerv(pname, params); |
| 289 } | 289 } |
| 290 void GetProgramiv( | 290 void GetProgramiv( |
| 291 PP_Resource context, GLuint program, GLenum pname, GLint* params) { | 291 PP_Resource context, GLuint program, GLenum pname, GLint* params) { |
| 292 PluginContext3D::implFromResource( | 292 PluginGraphics3D::implFromResource( |
| 293 context)->GetProgramiv(program, pname, params); | 293 context)->GetProgramiv(program, pname, params); |
| 294 } | 294 } |
| 295 void GetProgramInfoLog( | 295 void GetProgramInfoLog( |
| 296 PP_Resource context, GLuint program, GLsizei bufsize, GLsizei* length, | 296 PP_Resource context, GLuint program, GLsizei bufsize, GLsizei* length, |
| 297 char* infolog) { | 297 char* infolog) { |
| 298 PluginContext3D::implFromResource( | 298 PluginGraphics3D::implFromResource( |
| 299 context)->GetProgramInfoLog(program, bufsize, length, infolog); | 299 context)->GetProgramInfoLog(program, bufsize, length, infolog); |
| 300 } | 300 } |
| 301 void GetRenderbufferParameteriv( | 301 void GetRenderbufferParameteriv( |
| 302 PP_Resource context, GLenum target, GLenum pname, GLint* params) { | 302 PP_Resource context, GLenum target, GLenum pname, GLint* params) { |
| 303 PluginContext3D::implFromResource( | 303 PluginGraphics3D::implFromResource( |
| 304 context)->GetRenderbufferParameteriv(target, pname, params); | 304 context)->GetRenderbufferParameteriv(target, pname, params); |
| 305 } | 305 } |
| 306 void GetShaderiv( | 306 void GetShaderiv( |
| 307 PP_Resource context, GLuint shader, GLenum pname, GLint* params) { | 307 PP_Resource context, GLuint shader, GLenum pname, GLint* params) { |
| 308 PluginContext3D::implFromResource( | 308 PluginGraphics3D::implFromResource( |
| 309 context)->GetShaderiv(shader, pname, params); | 309 context)->GetShaderiv(shader, pname, params); |
| 310 } | 310 } |
| 311 void GetShaderInfoLog( | 311 void GetShaderInfoLog( |
| 312 PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length, | 312 PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length, |
| 313 char* infolog) { | 313 char* infolog) { |
| 314 PluginContext3D::implFromResource( | 314 PluginGraphics3D::implFromResource( |
| 315 context)->GetShaderInfoLog(shader, bufsize, length, infolog); | 315 context)->GetShaderInfoLog(shader, bufsize, length, infolog); |
| 316 } | 316 } |
| 317 void GetShaderPrecisionFormat( | 317 void GetShaderPrecisionFormat( |
| 318 PP_Resource context, GLenum shadertype, GLenum precisiontype, GLint* range, | 318 PP_Resource context, GLenum shadertype, GLenum precisiontype, GLint* range, |
| 319 GLint* precision) { | 319 GLint* precision) { |
| 320 PluginContext3D::implFromResource( | 320 PluginGraphics3D::implFromResource( |
| 321 context)->GetShaderPrecisionFormat( | 321 context)->GetShaderPrecisionFormat( |
| 322 shadertype, precisiontype, range, precision); | 322 shadertype, precisiontype, range, precision); |
| 323 } | 323 } |
| 324 void GetShaderSource( | 324 void GetShaderSource( |
| 325 PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length, | 325 PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length, |
| 326 char* source) { | 326 char* source) { |
| 327 PluginContext3D::implFromResource( | 327 PluginGraphics3D::implFromResource( |
| 328 context)->GetShaderSource(shader, bufsize, length, source); | 328 context)->GetShaderSource(shader, bufsize, length, source); |
| 329 } | 329 } |
| 330 const GLubyte* GetString(PP_Resource context, GLenum name) { | 330 const GLubyte* GetString(PP_Resource context, GLenum name) { |
| 331 return PluginContext3D::implFromResource(context)->GetString(name); | 331 return PluginGraphics3D::implFromResource(context)->GetString(name); |
| 332 } | 332 } |
| 333 void GetTexParameterfv( | 333 void GetTexParameterfv( |
| 334 PP_Resource context, GLenum target, GLenum pname, GLfloat* params) { | 334 PP_Resource context, GLenum target, GLenum pname, GLfloat* params) { |
| 335 PluginContext3D::implFromResource( | 335 PluginGraphics3D::implFromResource( |
| 336 context)->GetTexParameterfv(target, pname, params); | 336 context)->GetTexParameterfv(target, pname, params); |
| 337 } | 337 } |
| 338 void GetTexParameteriv( | 338 void GetTexParameteriv( |
| 339 PP_Resource context, GLenum target, GLenum pname, GLint* params) { | 339 PP_Resource context, GLenum target, GLenum pname, GLint* params) { |
| 340 PluginContext3D::implFromResource( | 340 PluginGraphics3D::implFromResource( |
| 341 context)->GetTexParameteriv(target, pname, params); | 341 context)->GetTexParameteriv(target, pname, params); |
| 342 } | 342 } |
| 343 void GetUniformfv( | 343 void GetUniformfv( |
| 344 PP_Resource context, GLuint program, GLint location, GLfloat* params) { | 344 PP_Resource context, GLuint program, GLint location, GLfloat* params) { |
| 345 PluginContext3D::implFromResource( | 345 PluginGraphics3D::implFromResource( |
| 346 context)->GetUniformfv(program, location, params); | 346 context)->GetUniformfv(program, location, params); |
| 347 } | 347 } |
| 348 void GetUniformiv( | 348 void GetUniformiv( |
| 349 PP_Resource context, GLuint program, GLint location, GLint* params) { | 349 PP_Resource context, GLuint program, GLint location, GLint* params) { |
| 350 PluginContext3D::implFromResource( | 350 PluginGraphics3D::implFromResource( |
| 351 context)->GetUniformiv(program, location, params); | 351 context)->GetUniformiv(program, location, params); |
| 352 } | 352 } |
| 353 GLint GetUniformLocation( | 353 GLint GetUniformLocation( |
| 354 PP_Resource context, GLuint program, const char* name) { | 354 PP_Resource context, GLuint program, const char* name) { |
| 355 return PluginContext3D::implFromResource( | 355 return PluginGraphics3D::implFromResource( |
| 356 context)->GetUniformLocation(program, name); | 356 context)->GetUniformLocation(program, name); |
| 357 } | 357 } |
| 358 void GetVertexAttribfv( | 358 void GetVertexAttribfv( |
| 359 PP_Resource context, GLuint index, GLenum pname, GLfloat* params) { | 359 PP_Resource context, GLuint index, GLenum pname, GLfloat* params) { |
| 360 PluginContext3D::implFromResource( | 360 PluginGraphics3D::implFromResource( |
| 361 context)->GetVertexAttribfv(index, pname, params); | 361 context)->GetVertexAttribfv(index, pname, params); |
| 362 } | 362 } |
| 363 void GetVertexAttribiv( | 363 void GetVertexAttribiv( |
| 364 PP_Resource context, GLuint index, GLenum pname, GLint* params) { | 364 PP_Resource context, GLuint index, GLenum pname, GLint* params) { |
| 365 PluginContext3D::implFromResource( | 365 PluginGraphics3D::implFromResource( |
| 366 context)->GetVertexAttribiv(index, pname, params); | 366 context)->GetVertexAttribiv(index, pname, params); |
| 367 } | 367 } |
| 368 void GetVertexAttribPointerv( | 368 void GetVertexAttribPointerv( |
| 369 PP_Resource context, GLuint index, GLenum pname, void** pointer) { | 369 PP_Resource context, GLuint index, GLenum pname, void** pointer) { |
| 370 PluginContext3D::implFromResource( | 370 PluginGraphics3D::implFromResource( |
| 371 context)->GetVertexAttribPointerv(index, pname, pointer); | 371 context)->GetVertexAttribPointerv(index, pname, pointer); |
| 372 } | 372 } |
| 373 void Hint(PP_Resource context, GLenum target, GLenum mode) { | 373 void Hint(PP_Resource context, GLenum target, GLenum mode) { |
| 374 PluginContext3D::implFromResource(context)->Hint(target, mode); | 374 PluginGraphics3D::implFromResource(context)->Hint(target, mode); |
| 375 } | 375 } |
| 376 GLboolean IsBuffer(PP_Resource context, GLuint buffer) { | 376 GLboolean IsBuffer(PP_Resource context, GLuint buffer) { |
| 377 return PluginContext3D::implFromResource(context)->IsBuffer(buffer); | 377 return PluginGraphics3D::implFromResource(context)->IsBuffer(buffer); |
| 378 } | 378 } |
| 379 GLboolean IsEnabled(PP_Resource context, GLenum cap) { | 379 GLboolean IsEnabled(PP_Resource context, GLenum cap) { |
| 380 return PluginContext3D::implFromResource(context)->IsEnabled(cap); | 380 return PluginGraphics3D::implFromResource(context)->IsEnabled(cap); |
| 381 } | 381 } |
| 382 GLboolean IsFramebuffer(PP_Resource context, GLuint framebuffer) { | 382 GLboolean IsFramebuffer(PP_Resource context, GLuint framebuffer) { |
| 383 return PluginContext3D::implFromResource( | 383 return PluginGraphics3D::implFromResource( |
| 384 context)->IsFramebuffer(framebuffer); | 384 context)->IsFramebuffer(framebuffer); |
| 385 } | 385 } |
| 386 GLboolean IsProgram(PP_Resource context, GLuint program) { | 386 GLboolean IsProgram(PP_Resource context, GLuint program) { |
| 387 return PluginContext3D::implFromResource(context)->IsProgram(program); | 387 return PluginGraphics3D::implFromResource(context)->IsProgram(program); |
| 388 } | 388 } |
| 389 GLboolean IsRenderbuffer(PP_Resource context, GLuint renderbuffer) { | 389 GLboolean IsRenderbuffer(PP_Resource context, GLuint renderbuffer) { |
| 390 return PluginContext3D::implFromResource( | 390 return PluginGraphics3D::implFromResource( |
| 391 context)->IsRenderbuffer(renderbuffer); | 391 context)->IsRenderbuffer(renderbuffer); |
| 392 } | 392 } |
| 393 GLboolean IsShader(PP_Resource context, GLuint shader) { | 393 GLboolean IsShader(PP_Resource context, GLuint shader) { |
| 394 return PluginContext3D::implFromResource(context)->IsShader(shader); | 394 return PluginGraphics3D::implFromResource(context)->IsShader(shader); |
| 395 } | 395 } |
| 396 GLboolean IsTexture(PP_Resource context, GLuint texture) { | 396 GLboolean IsTexture(PP_Resource context, GLuint texture) { |
| 397 return PluginContext3D::implFromResource(context)->IsTexture(texture); | 397 return PluginGraphics3D::implFromResource(context)->IsTexture(texture); |
| 398 } | 398 } |
| 399 void LineWidth(PP_Resource context, GLfloat width) { | 399 void LineWidth(PP_Resource context, GLfloat width) { |
| 400 PluginContext3D::implFromResource(context)->LineWidth(width); | 400 PluginGraphics3D::implFromResource(context)->LineWidth(width); |
| 401 } | 401 } |
| 402 void LinkProgram(PP_Resource context, GLuint program) { | 402 void LinkProgram(PP_Resource context, GLuint program) { |
| 403 PluginContext3D::implFromResource(context)->LinkProgram(program); | 403 PluginGraphics3D::implFromResource(context)->LinkProgram(program); |
| 404 } | 404 } |
| 405 void PixelStorei(PP_Resource context, GLenum pname, GLint param) { | 405 void PixelStorei(PP_Resource context, GLenum pname, GLint param) { |
| 406 PluginContext3D::implFromResource(context)->PixelStorei(pname, param); | 406 PluginGraphics3D::implFromResource(context)->PixelStorei(pname, param); |
| 407 } | 407 } |
| 408 void PolygonOffset(PP_Resource context, GLfloat factor, GLfloat units) { | 408 void PolygonOffset(PP_Resource context, GLfloat factor, GLfloat units) { |
| 409 PluginContext3D::implFromResource(context)->PolygonOffset(factor, units); | 409 PluginGraphics3D::implFromResource(context)->PolygonOffset(factor, units); |
| 410 } | 410 } |
| 411 void ReadPixels( | 411 void ReadPixels( |
| 412 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height, | 412 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height, |
| 413 GLenum format, GLenum type, void* pixels) { | 413 GLenum format, GLenum type, void* pixels) { |
| 414 PluginContext3D::implFromResource( | 414 PluginGraphics3D::implFromResource( |
| 415 context)->ReadPixels(x, y, width, height, format, type, pixels); | 415 context)->ReadPixels(x, y, width, height, format, type, pixels); |
| 416 } | 416 } |
| 417 void ReleaseShaderCompiler(PP_Resource context) { | 417 void ReleaseShaderCompiler(PP_Resource context) { |
| 418 PluginContext3D::implFromResource(context)->ReleaseShaderCompiler(); | 418 PluginGraphics3D::implFromResource(context)->ReleaseShaderCompiler(); |
| 419 } | 419 } |
| 420 void RenderbufferStorage( | 420 void RenderbufferStorage( |
| 421 PP_Resource context, GLenum target, GLenum internalformat, GLsizei width, | 421 PP_Resource context, GLenum target, GLenum internalformat, GLsizei width, |
| 422 GLsizei height) { | 422 GLsizei height) { |
| 423 PluginContext3D::implFromResource( | 423 PluginGraphics3D::implFromResource( |
| 424 context)->RenderbufferStorage(target, internalformat, width, height); | 424 context)->RenderbufferStorage(target, internalformat, width, height); |
| 425 } | 425 } |
| 426 void SampleCoverage(PP_Resource context, GLclampf value, GLboolean invert) { | 426 void SampleCoverage(PP_Resource context, GLclampf value, GLboolean invert) { |
| 427 PluginContext3D::implFromResource(context)->SampleCoverage(value, invert); | 427 PluginGraphics3D::implFromResource(context)->SampleCoverage(value, invert); |
| 428 } | 428 } |
| 429 void Scissor( | 429 void Scissor( |
| 430 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height) { | 430 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height) { |
| 431 PluginContext3D::implFromResource(context)->Scissor(x, y, width, height); | 431 PluginGraphics3D::implFromResource(context)->Scissor(x, y, width, height); |
| 432 } | 432 } |
| 433 void ShaderBinary( | 433 void ShaderBinary( |
| 434 PP_Resource context, GLsizei n, const GLuint* shaders, GLenum binaryformat, | 434 PP_Resource context, GLsizei n, const GLuint* shaders, GLenum binaryformat, |
| 435 const void* binary, GLsizei length) { | 435 const void* binary, GLsizei length) { |
| 436 PluginContext3D::implFromResource( | 436 PluginGraphics3D::implFromResource( |
| 437 context)->ShaderBinary(n, shaders, binaryformat, binary, length); | 437 context)->ShaderBinary(n, shaders, binaryformat, binary, length); |
| 438 } | 438 } |
| 439 void ShaderSource( | 439 void ShaderSource( |
| 440 PP_Resource context, GLuint shader, GLsizei count, const char** str, | 440 PP_Resource context, GLuint shader, GLsizei count, const char** str, |
| 441 const GLint* length) { | 441 const GLint* length) { |
| 442 PluginContext3D::implFromResource( | 442 PluginGraphics3D::implFromResource( |
| 443 context)->ShaderSource(shader, count, str, length); | 443 context)->ShaderSource(shader, count, str, length); |
| 444 } | 444 } |
| 445 void StencilFunc(PP_Resource context, GLenum func, GLint ref, GLuint mask) { | 445 void StencilFunc(PP_Resource context, GLenum func, GLint ref, GLuint mask) { |
| 446 PluginContext3D::implFromResource(context)->StencilFunc(func, ref, mask); | 446 PluginGraphics3D::implFromResource(context)->StencilFunc(func, ref, mask); |
| 447 } | 447 } |
| 448 void StencilFuncSeparate( | 448 void StencilFuncSeparate( |
| 449 PP_Resource context, GLenum face, GLenum func, GLint ref, GLuint mask) { | 449 PP_Resource context, GLenum face, GLenum func, GLint ref, GLuint mask) { |
| 450 PluginContext3D::implFromResource( | 450 PluginGraphics3D::implFromResource( |
| 451 context)->StencilFuncSeparate(face, func, ref, mask); | 451 context)->StencilFuncSeparate(face, func, ref, mask); |
| 452 } | 452 } |
| 453 void StencilMask(PP_Resource context, GLuint mask) { | 453 void StencilMask(PP_Resource context, GLuint mask) { |
| 454 PluginContext3D::implFromResource(context)->StencilMask(mask); | 454 PluginGraphics3D::implFromResource(context)->StencilMask(mask); |
| 455 } | 455 } |
| 456 void StencilMaskSeparate(PP_Resource context, GLenum face, GLuint mask) { | 456 void StencilMaskSeparate(PP_Resource context, GLenum face, GLuint mask) { |
| 457 PluginContext3D::implFromResource(context)->StencilMaskSeparate(face, mask); | 457 PluginGraphics3D::implFromResource(context)->StencilMaskSeparate(face, mask); |
| 458 } | 458 } |
| 459 void StencilOp(PP_Resource context, GLenum fail, GLenum zfail, GLenum zpass) { | 459 void StencilOp(PP_Resource context, GLenum fail, GLenum zfail, GLenum zpass) { |
| 460 PluginContext3D::implFromResource(context)->StencilOp(fail, zfail, zpass); | 460 PluginGraphics3D::implFromResource(context)->StencilOp(fail, zfail, zpass); |
| 461 } | 461 } |
| 462 void StencilOpSeparate( | 462 void StencilOpSeparate( |
| 463 PP_Resource context, GLenum face, GLenum fail, GLenum zfail, | 463 PP_Resource context, GLenum face, GLenum fail, GLenum zfail, |
| 464 GLenum zpass) { | 464 GLenum zpass) { |
| 465 PluginContext3D::implFromResource( | 465 PluginGraphics3D::implFromResource( |
| 466 context)->StencilOpSeparate(face, fail, zfail, zpass); | 466 context)->StencilOpSeparate(face, fail, zfail, zpass); |
| 467 } | 467 } |
| 468 void TexImage2D( | 468 void TexImage2D( |
| 469 PP_Resource context, GLenum target, GLint level, GLint internalformat, | 469 PP_Resource context, GLenum target, GLint level, GLint internalformat, |
| 470 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, | 470 GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, |
| 471 const void* pixels) { | 471 const void* pixels) { |
| 472 PluginContext3D::implFromResource( | 472 PluginGraphics3D::implFromResource( |
| 473 context)->TexImage2D( | 473 context)->TexImage2D( |
| 474 target, level, internalformat, width, height, border, format, type, | 474 target, level, internalformat, width, height, border, format, type, |
| 475 pixels); | 475 pixels); |
| 476 } | 476 } |
| 477 void TexParameterf( | 477 void TexParameterf( |
| 478 PP_Resource context, GLenum target, GLenum pname, GLfloat param) { | 478 PP_Resource context, GLenum target, GLenum pname, GLfloat param) { |
| 479 PluginContext3D::implFromResource( | 479 PluginGraphics3D::implFromResource( |
| 480 context)->TexParameterf(target, pname, param); | 480 context)->TexParameterf(target, pname, param); |
| 481 } | 481 } |
| 482 void TexParameterfv( | 482 void TexParameterfv( |
| 483 PP_Resource context, GLenum target, GLenum pname, const GLfloat* params) { | 483 PP_Resource context, GLenum target, GLenum pname, const GLfloat* params) { |
| 484 PluginContext3D::implFromResource( | 484 PluginGraphics3D::implFromResource( |
| 485 context)->TexParameterfv(target, pname, params); | 485 context)->TexParameterfv(target, pname, params); |
| 486 } | 486 } |
| 487 void TexParameteri( | 487 void TexParameteri( |
| 488 PP_Resource context, GLenum target, GLenum pname, GLint param) { | 488 PP_Resource context, GLenum target, GLenum pname, GLint param) { |
| 489 PluginContext3D::implFromResource( | 489 PluginGraphics3D::implFromResource( |
| 490 context)->TexParameteri(target, pname, param); | 490 context)->TexParameteri(target, pname, param); |
| 491 } | 491 } |
| 492 void TexParameteriv( | 492 void TexParameteriv( |
| 493 PP_Resource context, GLenum target, GLenum pname, const GLint* params) { | 493 PP_Resource context, GLenum target, GLenum pname, const GLint* params) { |
| 494 PluginContext3D::implFromResource( | 494 PluginGraphics3D::implFromResource( |
| 495 context)->TexParameteriv(target, pname, params); | 495 context)->TexParameteriv(target, pname, params); |
| 496 } | 496 } |
| 497 void TexSubImage2D( | 497 void TexSubImage2D( |
| 498 PP_Resource context, GLenum target, GLint level, GLint xoffset, | 498 PP_Resource context, GLenum target, GLint level, GLint xoffset, |
| 499 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, | 499 GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, |
| 500 const void* pixels) { | 500 const void* pixels) { |
| 501 PluginContext3D::implFromResource( | 501 PluginGraphics3D::implFromResource( |
| 502 context)->TexSubImage2D( | 502 context)->TexSubImage2D( |
| 503 target, level, xoffset, yoffset, width, height, format, type, | 503 target, level, xoffset, yoffset, width, height, format, type, |
| 504 pixels); | 504 pixels); |
| 505 } | 505 } |
| 506 void Uniform1f(PP_Resource context, GLint location, GLfloat x) { | 506 void Uniform1f(PP_Resource context, GLint location, GLfloat x) { |
| 507 PluginContext3D::implFromResource(context)->Uniform1f(location, x); | 507 PluginGraphics3D::implFromResource(context)->Uniform1f(location, x); |
| 508 } | 508 } |
| 509 void Uniform1fv( | 509 void Uniform1fv( |
| 510 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { | 510 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { |
| 511 PluginContext3D::implFromResource(context)->Uniform1fv(location, count, v); | 511 PluginGraphics3D::implFromResource(context)->Uniform1fv(location, count, v); |
| 512 } | 512 } |
| 513 void Uniform1i(PP_Resource context, GLint location, GLint x) { | 513 void Uniform1i(PP_Resource context, GLint location, GLint x) { |
| 514 PluginContext3D::implFromResource(context)->Uniform1i(location, x); | 514 PluginGraphics3D::implFromResource(context)->Uniform1i(location, x); |
| 515 } | 515 } |
| 516 void Uniform1iv( | 516 void Uniform1iv( |
| 517 PP_Resource context, GLint location, GLsizei count, const GLint* v) { | 517 PP_Resource context, GLint location, GLsizei count, const GLint* v) { |
| 518 PluginContext3D::implFromResource(context)->Uniform1iv(location, count, v); | 518 PluginGraphics3D::implFromResource(context)->Uniform1iv(location, count, v); |
| 519 } | 519 } |
| 520 void Uniform2f(PP_Resource context, GLint location, GLfloat x, GLfloat y) { | 520 void Uniform2f(PP_Resource context, GLint location, GLfloat x, GLfloat y) { |
| 521 PluginContext3D::implFromResource(context)->Uniform2f(location, x, y); | 521 PluginGraphics3D::implFromResource(context)->Uniform2f(location, x, y); |
| 522 } | 522 } |
| 523 void Uniform2fv( | 523 void Uniform2fv( |
| 524 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { | 524 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { |
| 525 PluginContext3D::implFromResource(context)->Uniform2fv(location, count, v); | 525 PluginGraphics3D::implFromResource(context)->Uniform2fv(location, count, v); |
| 526 } | 526 } |
| 527 void Uniform2i(PP_Resource context, GLint location, GLint x, GLint y) { | 527 void Uniform2i(PP_Resource context, GLint location, GLint x, GLint y) { |
| 528 PluginContext3D::implFromResource(context)->Uniform2i(location, x, y); | 528 PluginGraphics3D::implFromResource(context)->Uniform2i(location, x, y); |
| 529 } | 529 } |
| 530 void Uniform2iv( | 530 void Uniform2iv( |
| 531 PP_Resource context, GLint location, GLsizei count, const GLint* v) { | 531 PP_Resource context, GLint location, GLsizei count, const GLint* v) { |
| 532 PluginContext3D::implFromResource(context)->Uniform2iv(location, count, v); | 532 PluginGraphics3D::implFromResource(context)->Uniform2iv(location, count, v); |
| 533 } | 533 } |
| 534 void Uniform3f( | 534 void Uniform3f( |
| 535 PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z) { | 535 PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z) { |
| 536 PluginContext3D::implFromResource(context)->Uniform3f(location, x, y, z); | 536 PluginGraphics3D::implFromResource(context)->Uniform3f(location, x, y, z); |
| 537 } | 537 } |
| 538 void Uniform3fv( | 538 void Uniform3fv( |
| 539 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { | 539 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { |
| 540 PluginContext3D::implFromResource(context)->Uniform3fv(location, count, v); | 540 PluginGraphics3D::implFromResource(context)->Uniform3fv(location, count, v); |
| 541 } | 541 } |
| 542 void Uniform3i( | 542 void Uniform3i( |
| 543 PP_Resource context, GLint location, GLint x, GLint y, GLint z) { | 543 PP_Resource context, GLint location, GLint x, GLint y, GLint z) { |
| 544 PluginContext3D::implFromResource(context)->Uniform3i(location, x, y, z); | 544 PluginGraphics3D::implFromResource(context)->Uniform3i(location, x, y, z); |
| 545 } | 545 } |
| 546 void Uniform3iv( | 546 void Uniform3iv( |
| 547 PP_Resource context, GLint location, GLsizei count, const GLint* v) { | 547 PP_Resource context, GLint location, GLsizei count, const GLint* v) { |
| 548 PluginContext3D::implFromResource(context)->Uniform3iv(location, count, v); | 548 PluginGraphics3D::implFromResource(context)->Uniform3iv(location, count, v); |
| 549 } | 549 } |
| 550 void Uniform4f( | 550 void Uniform4f( |
| 551 PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z, | 551 PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z, |
| 552 GLfloat w) { | 552 GLfloat w) { |
| 553 PluginContext3D::implFromResource(context)->Uniform4f(location, x, y, z, w); | 553 PluginGraphics3D::implFromResource(context)->Uniform4f(location, x, y, z, w); |
| 554 } | 554 } |
| 555 void Uniform4fv( | 555 void Uniform4fv( |
| 556 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { | 556 PP_Resource context, GLint location, GLsizei count, const GLfloat* v) { |
| 557 PluginContext3D::implFromResource(context)->Uniform4fv(location, count, v); | 557 PluginGraphics3D::implFromResource(context)->Uniform4fv(location, count, v); |
| 558 } | 558 } |
| 559 void Uniform4i( | 559 void Uniform4i( |
| 560 PP_Resource context, GLint location, GLint x, GLint y, GLint z, GLint w) { | 560 PP_Resource context, GLint location, GLint x, GLint y, GLint z, GLint w) { |
| 561 PluginContext3D::implFromResource(context)->Uniform4i(location, x, y, z, w); | 561 PluginGraphics3D::implFromResource(context)->Uniform4i(location, x, y, z, w); |
| 562 } | 562 } |
| 563 void Uniform4iv( | 563 void Uniform4iv( |
| 564 PP_Resource context, GLint location, GLsizei count, const GLint* v) { | 564 PP_Resource context, GLint location, GLsizei count, const GLint* v) { |
| 565 PluginContext3D::implFromResource(context)->Uniform4iv(location, count, v); | 565 PluginGraphics3D::implFromResource(context)->Uniform4iv(location, count, v); |
| 566 } | 566 } |
| 567 void UniformMatrix2fv( | 567 void UniformMatrix2fv( |
| 568 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, | 568 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, |
| 569 const GLfloat* value) { | 569 const GLfloat* value) { |
| 570 PluginContext3D::implFromResource( | 570 PluginGraphics3D::implFromResource( |
| 571 context)->UniformMatrix2fv(location, count, transpose, value); | 571 context)->UniformMatrix2fv(location, count, transpose, value); |
| 572 } | 572 } |
| 573 void UniformMatrix3fv( | 573 void UniformMatrix3fv( |
| 574 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, | 574 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, |
| 575 const GLfloat* value) { | 575 const GLfloat* value) { |
| 576 PluginContext3D::implFromResource( | 576 PluginGraphics3D::implFromResource( |
| 577 context)->UniformMatrix3fv(location, count, transpose, value); | 577 context)->UniformMatrix3fv(location, count, transpose, value); |
| 578 } | 578 } |
| 579 void UniformMatrix4fv( | 579 void UniformMatrix4fv( |
| 580 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, | 580 PP_Resource context, GLint location, GLsizei count, GLboolean transpose, |
| 581 const GLfloat* value) { | 581 const GLfloat* value) { |
| 582 PluginContext3D::implFromResource( | 582 PluginGraphics3D::implFromResource( |
| 583 context)->UniformMatrix4fv(location, count, transpose, value); | 583 context)->UniformMatrix4fv(location, count, transpose, value); |
| 584 } | 584 } |
| 585 void UseProgram(PP_Resource context, GLuint program) { | 585 void UseProgram(PP_Resource context, GLuint program) { |
| 586 PluginContext3D::implFromResource(context)->UseProgram(program); | 586 PluginGraphics3D::implFromResource(context)->UseProgram(program); |
| 587 } | 587 } |
| 588 void ValidateProgram(PP_Resource context, GLuint program) { | 588 void ValidateProgram(PP_Resource context, GLuint program) { |
| 589 PluginContext3D::implFromResource(context)->ValidateProgram(program); | 589 PluginGraphics3D::implFromResource(context)->ValidateProgram(program); |
| 590 } | 590 } |
| 591 void VertexAttrib1f(PP_Resource context, GLuint indx, GLfloat x) { | 591 void VertexAttrib1f(PP_Resource context, GLuint indx, GLfloat x) { |
| 592 PluginContext3D::implFromResource(context)->VertexAttrib1f(indx, x); | 592 PluginGraphics3D::implFromResource(context)->VertexAttrib1f(indx, x); |
| 593 } | 593 } |
| 594 void VertexAttrib1fv(PP_Resource context, GLuint indx, const GLfloat* values) { | 594 void VertexAttrib1fv(PP_Resource context, GLuint indx, const GLfloat* values) { |
| 595 PluginContext3D::implFromResource(context)->VertexAttrib1fv(indx, values); | 595 PluginGraphics3D::implFromResource(context)->VertexAttrib1fv(indx, values); |
| 596 } | 596 } |
| 597 void VertexAttrib2f(PP_Resource context, GLuint indx, GLfloat x, GLfloat y) { | 597 void VertexAttrib2f(PP_Resource context, GLuint indx, GLfloat x, GLfloat y) { |
| 598 PluginContext3D::implFromResource(context)->VertexAttrib2f(indx, x, y); | 598 PluginGraphics3D::implFromResource(context)->VertexAttrib2f(indx, x, y); |
| 599 } | 599 } |
| 600 void VertexAttrib2fv(PP_Resource context, GLuint indx, const GLfloat* values) { | 600 void VertexAttrib2fv(PP_Resource context, GLuint indx, const GLfloat* values) { |
| 601 PluginContext3D::implFromResource(context)->VertexAttrib2fv(indx, values); | 601 PluginGraphics3D::implFromResource(context)->VertexAttrib2fv(indx, values); |
| 602 } | 602 } |
| 603 void VertexAttrib3f( | 603 void VertexAttrib3f( |
| 604 PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z) { | 604 PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z) { |
| 605 PluginContext3D::implFromResource(context)->VertexAttrib3f(indx, x, y, z); | 605 PluginGraphics3D::implFromResource(context)->VertexAttrib3f(indx, x, y, z); |
| 606 } | 606 } |
| 607 void VertexAttrib3fv(PP_Resource context, GLuint indx, const GLfloat* values) { | 607 void VertexAttrib3fv(PP_Resource context, GLuint indx, const GLfloat* values) { |
| 608 PluginContext3D::implFromResource(context)->VertexAttrib3fv(indx, values); | 608 PluginGraphics3D::implFromResource(context)->VertexAttrib3fv(indx, values); |
| 609 } | 609 } |
| 610 void VertexAttrib4f( | 610 void VertexAttrib4f( |
| 611 PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z, | 611 PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z, |
| 612 GLfloat w) { | 612 GLfloat w) { |
| 613 PluginContext3D::implFromResource(context)->VertexAttrib4f(indx, x, y, z, w); | 613 PluginGraphics3D::implFromResource(context)->VertexAttrib4f(indx, x, y, z, w); |
| 614 } | 614 } |
| 615 void VertexAttrib4fv(PP_Resource context, GLuint indx, const GLfloat* values) { | 615 void VertexAttrib4fv(PP_Resource context, GLuint indx, const GLfloat* values) { |
| 616 PluginContext3D::implFromResource(context)->VertexAttrib4fv(indx, values); | 616 PluginGraphics3D::implFromResource(context)->VertexAttrib4fv(indx, values); |
| 617 } | 617 } |
| 618 void VertexAttribPointer( | 618 void VertexAttribPointer( |
| 619 PP_Resource context, GLuint indx, GLint size, GLenum type, | 619 PP_Resource context, GLuint indx, GLint size, GLenum type, |
| 620 GLboolean normalized, GLsizei stride, const void* ptr) { | 620 GLboolean normalized, GLsizei stride, const void* ptr) { |
| 621 PluginContext3D::implFromResource( | 621 PluginGraphics3D::implFromResource( |
| 622 context)->VertexAttribPointer(indx, size, type, normalized, stride, ptr); | 622 context)->VertexAttribPointer(indx, size, type, normalized, stride, ptr); |
| 623 } | 623 } |
| 624 void Viewport( | 624 void Viewport( |
| 625 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height) { | 625 PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height) { |
| 626 PluginContext3D::implFromResource(context)->Viewport(x, y, width, height); | 626 PluginGraphics3D::implFromResource(context)->Viewport(x, y, width, height); |
| 627 } | 627 } |
| 628 | 628 |
| 629 } // namespace | 629 } // namespace |
| 630 | 630 |
| 631 const PPB_OpenGLES2_Dev* PluginContext3D::GetOpenGLESInterface() { | 631 const PPB_OpenGLES2_Dev* PluginGraphics3D::GetOpenGLESInterface() { |
| 632 const static struct PPB_OpenGLES2_Dev ppb_opengles = { | 632 const static struct PPB_OpenGLES2_Dev ppb_opengles = { |
| 633 &ActiveTexture, | 633 &ActiveTexture, |
| 634 &AttachShader, | 634 &AttachShader, |
| 635 &BindAttribLocation, | 635 &BindAttribLocation, |
| 636 &BindBuffer, | 636 &BindBuffer, |
| 637 &BindFramebuffer, | 637 &BindFramebuffer, |
| 638 &BindRenderbuffer, | 638 &BindRenderbuffer, |
| 639 &BindTexture, | 639 &BindTexture, |
| 640 &BlendColor, | 640 &BlendColor, |
| 641 &BlendEquation, | 641 &BlendEquation, |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 &VertexAttrib2fv, | 768 &VertexAttrib2fv, |
| 769 &VertexAttrib3f, | 769 &VertexAttrib3f, |
| 770 &VertexAttrib3fv, | 770 &VertexAttrib3fv, |
| 771 &VertexAttrib4f, | 771 &VertexAttrib4f, |
| 772 &VertexAttrib4fv, | 772 &VertexAttrib4fv, |
| 773 &VertexAttribPointer, | 773 &VertexAttribPointer, |
| 774 &Viewport | 774 &Viewport |
| 775 }; | 775 }; |
| 776 return &ppb_opengles; | 776 return &ppb_opengles; |
| 777 } | 777 } |
| OLD | NEW |