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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_opengles.cc

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

Powered by Google App Engine
This is Rietveld 408576698