summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/pepper_graphics_3d_gl.cc
blob: 2ce8de012eb0b9905aa10b1f0a33b197205099b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
// Copyright (c) 2010 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.

// This file is auto-generated. DO NOT EDIT!

#include "webkit/glue/plugins/pepper_graphics_3d.h"

#include "gpu/command_buffer/client/gles2_implementation.h"
#include "ppapi/c/dev/ppb_opengles_dev.h"

namespace pepper {

namespace {

void ActiveTexture(GLenum texture) {
  Graphics3D::GetCurrent()->impl()->ActiveTexture(texture);
}
void AttachShader(GLuint program, GLuint shader) {
  Graphics3D::GetCurrent()->impl()->AttachShader(program, shader);
}
void BindAttribLocation(GLuint program, GLuint index, const char* name) {
  Graphics3D::GetCurrent()->impl()->BindAttribLocation(program, index, name);
}
void BindBuffer(GLenum target, GLuint buffer) {
  Graphics3D::GetCurrent()->impl()->BindBuffer(target, buffer);
}
void BindFramebuffer(GLenum target, GLuint framebuffer) {
  Graphics3D::GetCurrent()->impl()->BindFramebuffer(target, framebuffer);
}
void BindRenderbuffer(GLenum target, GLuint renderbuffer) {
  Graphics3D::GetCurrent()->impl()->BindRenderbuffer(target, renderbuffer);
}
void BindTexture(GLenum target, GLuint texture) {
  Graphics3D::GetCurrent()->impl()->BindTexture(target, texture);
}
void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
  Graphics3D::GetCurrent()->impl()->BlendColor(red, green, blue, alpha);
}
void BlendEquation(GLenum mode) {
  Graphics3D::GetCurrent()->impl()->BlendEquation(mode);
}
void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
  Graphics3D::GetCurrent()->impl()->BlendEquationSeparate(modeRGB, modeAlpha);
}
void BlendFunc(GLenum sfactor, GLenum dfactor) {
  Graphics3D::GetCurrent()->impl()->BlendFunc(sfactor, dfactor);
}
void BlendFuncSeparate(
    GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
  Graphics3D::GetCurrent()->impl()->BlendFuncSeparate(
      srcRGB, dstRGB, srcAlpha, dstAlpha);
}
void BufferData(
    GLenum target, GLsizeiptr size, const void* data, GLenum usage) {
  Graphics3D::GetCurrent()->impl()->BufferData(target, size, data, usage);
}
void BufferSubData(
    GLenum target, GLintptr offset, GLsizeiptr size, const void* data) {
  Graphics3D::GetCurrent()->impl()->BufferSubData(target, offset, size, data);
}
GLenum CheckFramebufferStatus(GLenum target) {
  return Graphics3D::GetCurrent()->impl()->CheckFramebufferStatus(target);
}
void Clear(GLbitfield mask) {
  Graphics3D::GetCurrent()->impl()->Clear(mask);
}
void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
  Graphics3D::GetCurrent()->impl()->ClearColor(red, green, blue, alpha);
}
void ClearDepthf(GLclampf depth) {
  Graphics3D::GetCurrent()->impl()->ClearDepthf(depth);
}
void ClearStencil(GLint s) {
  Graphics3D::GetCurrent()->impl()->ClearStencil(s);
}
void ColorMask(
    GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
  Graphics3D::GetCurrent()->impl()->ColorMask(red, green, blue, alpha);
}
void CompileShader(GLuint shader) {
  Graphics3D::GetCurrent()->impl()->CompileShader(shader);
}
void CompressedTexImage2D(
    GLenum target, GLint level, GLenum internalformat, GLsizei width,
    GLsizei height, GLint border, GLsizei imageSize, const void* data) {
  Graphics3D::GetCurrent()->impl()->CompressedTexImage2D(
      target, level, internalformat, width, height, border, imageSize, data);
}
void CompressedTexSubImage2D(
    GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
    GLsizei height, GLenum format, GLsizei imageSize, const void* data) {
  Graphics3D::GetCurrent()->impl()->CompressedTexSubImage2D(
      target, level, xoffset, yoffset, width, height, format, imageSize, data);
}
void CopyTexImage2D(
    GLenum target, GLint level, GLenum internalformat, GLint x, GLint y,
    GLsizei width, GLsizei height, GLint border) {
  Graphics3D::GetCurrent()->impl()->CopyTexImage2D(
      target, level, internalformat, x, y, width, height, border);
}
void CopyTexSubImage2D(
    GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y,
    GLsizei width, GLsizei height) {
  Graphics3D::GetCurrent()->impl()->CopyTexSubImage2D(
      target, level, xoffset, yoffset, x, y, width, height);
}
GLuint CreateProgram() {
  return Graphics3D::GetCurrent()->impl()->CreateProgram();
}
GLuint CreateShader(GLenum type) {
  return Graphics3D::GetCurrent()->impl()->CreateShader(type);
}
void CullFace(GLenum mode) {
  Graphics3D::GetCurrent()->impl()->CullFace(mode);
}
void DeleteBuffers(GLsizei n, const GLuint* buffers) {
  Graphics3D::GetCurrent()->impl()->DeleteBuffers(n, buffers);
}
void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
  Graphics3D::GetCurrent()->impl()->DeleteFramebuffers(n, framebuffers);
}
void DeleteProgram(GLuint program) {
  Graphics3D::GetCurrent()->impl()->DeleteProgram(program);
}
void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
  Graphics3D::GetCurrent()->impl()->DeleteRenderbuffers(n, renderbuffers);
}
void DeleteShader(GLuint shader) {
  Graphics3D::GetCurrent()->impl()->DeleteShader(shader);
}
void DeleteTextures(GLsizei n, const GLuint* textures) {
  Graphics3D::GetCurrent()->impl()->DeleteTextures(n, textures);
}
void DepthFunc(GLenum func) {
  Graphics3D::GetCurrent()->impl()->DepthFunc(func);
}
void DepthMask(GLboolean flag) {
  Graphics3D::GetCurrent()->impl()->DepthMask(flag);
}
void DepthRangef(GLclampf zNear, GLclampf zFar) {
  Graphics3D::GetCurrent()->impl()->DepthRangef(zNear, zFar);
}
void DetachShader(GLuint program, GLuint shader) {
  Graphics3D::GetCurrent()->impl()->DetachShader(program, shader);
}
void Disable(GLenum cap) {
  Graphics3D::GetCurrent()->impl()->Disable(cap);
}
void DisableVertexAttribArray(GLuint index) {
  Graphics3D::GetCurrent()->impl()->DisableVertexAttribArray(index);
}
void DrawArrays(GLenum mode, GLint first, GLsizei count) {
  Graphics3D::GetCurrent()->impl()->DrawArrays(mode, first, count);
}
void DrawElements(
    GLenum mode, GLsizei count, GLenum type, const void* indices) {
  Graphics3D::GetCurrent()->impl()->DrawElements(mode, count, type, indices);
}
void Enable(GLenum cap) {
  Graphics3D::GetCurrent()->impl()->Enable(cap);
}
void EnableVertexAttribArray(GLuint index) {
  Graphics3D::GetCurrent()->impl()->EnableVertexAttribArray(index);
}
void Finish() {
  Graphics3D::GetCurrent()->impl()->Finish();
}
void Flush() {
  Graphics3D::GetCurrent()->impl()->Flush();
}
void FramebufferRenderbuffer(
    GLenum target, GLenum attachment, GLenum renderbuffertarget,
    GLuint renderbuffer) {
  Graphics3D::GetCurrent()->impl()->FramebufferRenderbuffer(
      target, attachment, renderbuffertarget, renderbuffer);
}
void FramebufferTexture2D(
    GLenum target, GLenum attachment, GLenum textarget, GLuint texture,
    GLint level) {
  Graphics3D::GetCurrent()->impl()->FramebufferTexture2D(
      target, attachment, textarget, texture, level);
}
void FrontFace(GLenum mode) {
  Graphics3D::GetCurrent()->impl()->FrontFace(mode);
}
void GenBuffers(GLsizei n, GLuint* buffers) {
  Graphics3D::GetCurrent()->impl()->GenBuffers(n, buffers);
}
void GenerateMipmap(GLenum target) {
  Graphics3D::GetCurrent()->impl()->GenerateMipmap(target);
}
void GenFramebuffers(GLsizei n, GLuint* framebuffers) {
  Graphics3D::GetCurrent()->impl()->GenFramebuffers(n, framebuffers);
}
void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
  Graphics3D::GetCurrent()->impl()->GenRenderbuffers(n, renderbuffers);
}
void GenTextures(GLsizei n, GLuint* textures) {
  Graphics3D::GetCurrent()->impl()->GenTextures(n, textures);
}
void GetActiveAttrib(
    GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size,
    GLenum* type, char* name) {
  Graphics3D::GetCurrent()->impl()->GetActiveAttrib(
      program, index, bufsize, length, size, type, name);
}
void GetActiveUniform(
    GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size,
    GLenum* type, char* name) {
  Graphics3D::GetCurrent()->impl()->GetActiveUniform(
      program, index, bufsize, length, size, type, name);
}
void GetAttachedShaders(
    GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
  Graphics3D::GetCurrent()->impl()->GetAttachedShaders(
      program, maxcount, count, shaders);
}
GLint GetAttribLocation(GLuint program, const char* name) {
  return Graphics3D::GetCurrent()->impl()->GetAttribLocation(program, name);
}
void GetBooleanv(GLenum pname, GLboolean* params) {
  Graphics3D::GetCurrent()->impl()->GetBooleanv(pname, params);
}
void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetBufferParameteriv(
      target, pname, params);
}
GLenum GetError() {
  return Graphics3D::GetCurrent()->impl()->GetError();
}
void GetFloatv(GLenum pname, GLfloat* params) {
  Graphics3D::GetCurrent()->impl()->GetFloatv(pname, params);
}
void GetFramebufferAttachmentParameteriv(
    GLenum target, GLenum attachment, GLenum pname, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetFramebufferAttachmentParameteriv(
      target, attachment, pname, params);
}
void GetIntegerv(GLenum pname, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetIntegerv(pname, params);
}
void GetProgramiv(GLuint program, GLenum pname, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetProgramiv(program, pname, params);
}
void GetProgramInfoLog(
    GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) {
  Graphics3D::GetCurrent()->impl()->GetProgramInfoLog(
      program, bufsize, length, infolog);
}
void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetRenderbufferParameteriv(
      target, pname, params);
}
void GetShaderiv(GLuint shader, GLenum pname, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetShaderiv(shader, pname, params);
}
void GetShaderInfoLog(
    GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) {
  Graphics3D::GetCurrent()->impl()->GetShaderInfoLog(
      shader, bufsize, length, infolog);
}
void GetShaderPrecisionFormat(
    GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
  Graphics3D::GetCurrent()->impl()->GetShaderPrecisionFormat(
      shadertype, precisiontype, range, precision);
}
void GetShaderSource(
    GLuint shader, GLsizei bufsize, GLsizei* length, char* source) {
  Graphics3D::GetCurrent()->impl()->GetShaderSource(
      shader, bufsize, length, source);
}
const GLubyte* GetString(GLenum name) {
  return Graphics3D::GetCurrent()->impl()->GetString(name);
}
void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
  Graphics3D::GetCurrent()->impl()->GetTexParameterfv(target, pname, params);
}
void GetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetTexParameteriv(target, pname, params);
}
void GetUniformfv(GLuint program, GLint location, GLfloat* params) {
  Graphics3D::GetCurrent()->impl()->GetUniformfv(program, location, params);
}
void GetUniformiv(GLuint program, GLint location, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetUniformiv(program, location, params);
}
GLint GetUniformLocation(GLuint program, const char* name) {
  return Graphics3D::GetCurrent()->impl()->GetUniformLocation(program, name);
}
void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) {
  Graphics3D::GetCurrent()->impl()->GetVertexAttribfv(index, pname, params);
}
void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params) {
  Graphics3D::GetCurrent()->impl()->GetVertexAttribiv(index, pname, params);
}
void GetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) {
  Graphics3D::GetCurrent()->impl()->GetVertexAttribPointerv(
      index, pname, pointer);
}
void Hint(GLenum target, GLenum mode) {
  Graphics3D::GetCurrent()->impl()->Hint(target, mode);
}
GLboolean IsBuffer(GLuint buffer) {
  return Graphics3D::GetCurrent()->impl()->IsBuffer(buffer);
}
GLboolean IsEnabled(GLenum cap) {
  return Graphics3D::GetCurrent()->impl()->IsEnabled(cap);
}
GLboolean IsFramebuffer(GLuint framebuffer) {
  return Graphics3D::GetCurrent()->impl()->IsFramebuffer(framebuffer);
}
GLboolean IsProgram(GLuint program) {
  return Graphics3D::GetCurrent()->impl()->IsProgram(program);
}
GLboolean IsRenderbuffer(GLuint renderbuffer) {
  return Graphics3D::GetCurrent()->impl()->IsRenderbuffer(renderbuffer);
}
GLboolean IsShader(GLuint shader) {
  return Graphics3D::GetCurrent()->impl()->IsShader(shader);
}
GLboolean IsTexture(GLuint texture) {
  return Graphics3D::GetCurrent()->impl()->IsTexture(texture);
}
void LineWidth(GLfloat width) {
  Graphics3D::GetCurrent()->impl()->LineWidth(width);
}
void LinkProgram(GLuint program) {
  Graphics3D::GetCurrent()->impl()->LinkProgram(program);
}
void PixelStorei(GLenum pname, GLint param) {
  Graphics3D::GetCurrent()->impl()->PixelStorei(pname, param);
}
void PolygonOffset(GLfloat factor, GLfloat units) {
  Graphics3D::GetCurrent()->impl()->PolygonOffset(factor, units);
}
void ReadPixels(
    GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
    void* pixels) {
  Graphics3D::GetCurrent()->impl()->ReadPixels(
      x, y, width, height, format, type, pixels);
}
void ReleaseShaderCompiler() {
  Graphics3D::GetCurrent()->impl()->ReleaseShaderCompiler();
}
void RenderbufferStorage(
    GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
  Graphics3D::GetCurrent()->impl()->RenderbufferStorage(
      target, internalformat, width, height);
}
void SampleCoverage(GLclampf value, GLboolean invert) {
  Graphics3D::GetCurrent()->impl()->SampleCoverage(value, invert);
}
void Scissor(GLint x, GLint y, GLsizei width, GLsizei height) {
  Graphics3D::GetCurrent()->impl()->Scissor(x, y, width, height);
}
void ShaderBinary(
    GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary,
    GLsizei length) {
  Graphics3D::GetCurrent()->impl()->ShaderBinary(
      n, shaders, binaryformat, binary, length);
}
void ShaderSource(
    GLuint shader, GLsizei count, const char** str, const GLint* length) {
  Graphics3D::GetCurrent()->impl()->ShaderSource(shader, count, str, length);
}
void StencilFunc(GLenum func, GLint ref, GLuint mask) {
  Graphics3D::GetCurrent()->impl()->StencilFunc(func, ref, mask);
}
void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) {
  Graphics3D::GetCurrent()->impl()->StencilFuncSeparate(face, func, ref, mask);
}
void StencilMask(GLuint mask) {
  Graphics3D::GetCurrent()->impl()->StencilMask(mask);
}
void StencilMaskSeparate(GLenum face, GLuint mask) {
  Graphics3D::GetCurrent()->impl()->StencilMaskSeparate(face, mask);
}
void StencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
  Graphics3D::GetCurrent()->impl()->StencilOp(fail, zfail, zpass);
}
void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
  Graphics3D::GetCurrent()->impl()->StencilOpSeparate(
      face, fail, zfail, zpass);
}
void TexImage2D(
    GLenum target, GLint level, GLint internalformat, GLsizei width,
    GLsizei height, GLint border, GLenum format, GLenum type,
    const void* pixels) {
  Graphics3D::GetCurrent()->impl()->TexImage2D(
      target, level, internalformat, width, height, border, format, type,
      pixels);
}
void TexParameterf(GLenum target, GLenum pname, GLfloat param) {
  Graphics3D::GetCurrent()->impl()->TexParameterf(target, pname, param);
}
void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params) {
  Graphics3D::GetCurrent()->impl()->TexParameterfv(target, pname, params);
}
void TexParameteri(GLenum target, GLenum pname, GLint param) {
  Graphics3D::GetCurrent()->impl()->TexParameteri(target, pname, param);
}
void TexParameteriv(GLenum target, GLenum pname, const GLint* params) {
  Graphics3D::GetCurrent()->impl()->TexParameteriv(target, pname, params);
}
void TexSubImage2D(
    GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
    GLsizei height, GLenum format, GLenum type, const void* pixels) {
  Graphics3D::GetCurrent()->impl()->TexSubImage2D(
      target, level, xoffset, yoffset, width, height, format, type, pixels);
}
void Uniform1f(GLint location, GLfloat x) {
  Graphics3D::GetCurrent()->impl()->Uniform1f(location, x);
}
void Uniform1fv(GLint location, GLsizei count, const GLfloat* v) {
  Graphics3D::GetCurrent()->impl()->Uniform1fv(location, count, v);
}
void Uniform1i(GLint location, GLint x) {
  Graphics3D::GetCurrent()->impl()->Uniform1i(location, x);
}
void Uniform1iv(GLint location, GLsizei count, const GLint* v) {
  Graphics3D::GetCurrent()->impl()->Uniform1iv(location, count, v);
}
void Uniform2f(GLint location, GLfloat x, GLfloat y) {
  Graphics3D::GetCurrent()->impl()->Uniform2f(location, x, y);
}
void Uniform2fv(GLint location, GLsizei count, const GLfloat* v) {
  Graphics3D::GetCurrent()->impl()->Uniform2fv(location, count, v);
}
void Uniform2i(GLint location, GLint x, GLint y) {
  Graphics3D::GetCurrent()->impl()->Uniform2i(location, x, y);
}
void Uniform2iv(GLint location, GLsizei count, const GLint* v) {
  Graphics3D::GetCurrent()->impl()->Uniform2iv(location, count, v);
}
void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
  Graphics3D::GetCurrent()->impl()->Uniform3f(location, x, y, z);
}
void Uniform3fv(GLint location, GLsizei count, const GLfloat* v) {
  Graphics3D::GetCurrent()->impl()->Uniform3fv(location, count, v);
}
void Uniform3i(GLint location, GLint x, GLint y, GLint z) {
  Graphics3D::GetCurrent()->impl()->Uniform3i(location, x, y, z);
}
void Uniform3iv(GLint location, GLsizei count, const GLint* v) {
  Graphics3D::GetCurrent()->impl()->Uniform3iv(location, count, v);
}
void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
  Graphics3D::GetCurrent()->impl()->Uniform4f(location, x, y, z, w);
}
void Uniform4fv(GLint location, GLsizei count, const GLfloat* v) {
  Graphics3D::GetCurrent()->impl()->Uniform4fv(location, count, v);
}
void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
  Graphics3D::GetCurrent()->impl()->Uniform4i(location, x, y, z, w);
}
void Uniform4iv(GLint location, GLsizei count, const GLint* v) {
  Graphics3D::GetCurrent()->impl()->Uniform4iv(location, count, v);
}
void UniformMatrix2fv(
    GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
  Graphics3D::GetCurrent()->impl()->UniformMatrix2fv(
      location, count, transpose, value);
}
void UniformMatrix3fv(
    GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
  Graphics3D::GetCurrent()->impl()->UniformMatrix3fv(
      location, count, transpose, value);
}
void UniformMatrix4fv(
    GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
  Graphics3D::GetCurrent()->impl()->UniformMatrix4fv(
      location, count, transpose, value);
}
void UseProgram(GLuint program) {
  Graphics3D::GetCurrent()->impl()->UseProgram(program);
}
void ValidateProgram(GLuint program) {
  Graphics3D::GetCurrent()->impl()->ValidateProgram(program);
}
void VertexAttrib1f(GLuint indx, GLfloat x) {
  Graphics3D::GetCurrent()->impl()->VertexAttrib1f(indx, x);
}
void VertexAttrib1fv(GLuint indx, const GLfloat* values) {
  Graphics3D::GetCurrent()->impl()->VertexAttrib1fv(indx, values);
}
void VertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
  Graphics3D::GetCurrent()->impl()->VertexAttrib2f(indx, x, y);
}
void VertexAttrib2fv(GLuint indx, const GLfloat* values) {
  Graphics3D::GetCurrent()->impl()->VertexAttrib2fv(indx, values);
}
void VertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
  Graphics3D::GetCurrent()->impl()->VertexAttrib3f(indx, x, y, z);
}
void VertexAttrib3fv(GLuint indx, const GLfloat* values) {
  Graphics3D::GetCurrent()->impl()->VertexAttrib3fv(indx, values);
}
void VertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
  Graphics3D::GetCurrent()->impl()->VertexAttrib4f(indx, x, y, z, w);
}
void VertexAttrib4fv(GLuint indx, const GLfloat* values) {
  Graphics3D::GetCurrent()->impl()->VertexAttrib4fv(indx, values);
}
void VertexAttribPointer(
    GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride,
    const void* ptr) {
  Graphics3D::GetCurrent()->impl()->VertexAttribPointer(
      indx, size, type, normalized, stride, ptr);
}
void Viewport(GLint x, GLint y, GLsizei width, GLsizei height) {
  Graphics3D::GetCurrent()->impl()->Viewport(x, y, width, height);
}
void SwapBuffers() {
  Graphics3D::GetCurrent()->impl()->SwapBuffers();
}
GLuint GetMaxValueInBuffer(
    GLuint buffer_id, GLsizei count, GLenum type, GLuint offset) {
  return Graphics3D::GetCurrent()->impl()->GetMaxValueInBuffer(
      buffer_id, count, type, offset);
}
void GenSharedIds(
    GLuint namespace_id, GLuint id_offset, GLsizei n, GLuint* ids) {
  Graphics3D::GetCurrent()->impl()->GenSharedIds(
      namespace_id, id_offset, n, ids);
}
void DeleteSharedIds(GLuint namespace_id, GLsizei n, const GLuint* ids) {
  Graphics3D::GetCurrent()->impl()->DeleteSharedIds(namespace_id, n, ids);
}
void RegisterSharedIds(GLuint namespace_id, GLsizei n, const GLuint* ids) {
  Graphics3D::GetCurrent()->impl()->RegisterSharedIds(namespace_id, n, ids);
}
GLboolean CommandBufferEnable(const char* feature) {
  return Graphics3D::GetCurrent()->impl()->CommandBufferEnable(feature);
}
void* MapBufferSubData(
    GLuint target, GLintptr offset, GLsizeiptr size, GLenum access) {
  return Graphics3D::GetCurrent()->impl()->MapBufferSubData(
      target, offset, size, access);
}
void UnmapBufferSubData(const void* mem) {
  Graphics3D::GetCurrent()->impl()->UnmapBufferSubData(mem);
}
void* MapTexSubImage2D(
    GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width,
    GLsizei height, GLenum format, GLenum type, GLenum access) {
  return Graphics3D::GetCurrent()->impl()->MapTexSubImage2D(
      target, level, xoffset, yoffset, width, height, format, type, access);
}
void UnmapTexSubImage2D(const void* mem) {
  Graphics3D::GetCurrent()->impl()->UnmapTexSubImage2D(mem);
}

const PPB_OpenGLES_Dev ppb_opengles = {
  &ActiveTexture,
  &AttachShader,
  &BindAttribLocation,
  &BindBuffer,
  &BindFramebuffer,
  &BindRenderbuffer,
  &BindTexture,
  &BlendColor,
  &BlendEquation,
  &BlendEquationSeparate,
  &BlendFunc,
  &BlendFuncSeparate,
  &BufferData,
  &BufferSubData,
  &CheckFramebufferStatus,
  &Clear,
  &ClearColor,
  &ClearDepthf,
  &ClearStencil,
  &ColorMask,
  &CompileShader,
  &CompressedTexImage2D,
  &CompressedTexSubImage2D,
  &CopyTexImage2D,
  &CopyTexSubImage2D,
  &CreateProgram,
  &CreateShader,
  &CullFace,
  &DeleteBuffers,
  &DeleteFramebuffers,
  &DeleteProgram,
  &DeleteRenderbuffers,
  &DeleteShader,
  &DeleteTextures,
  &DepthFunc,
  &DepthMask,
  &DepthRangef,
  &DetachShader,
  &Disable,
  &DisableVertexAttribArray,
  &DrawArrays,
  &DrawElements,
  &Enable,
  &EnableVertexAttribArray,
  &Finish,
  &Flush,
  &FramebufferRenderbuffer,
  &FramebufferTexture2D,
  &FrontFace,
  &GenBuffers,
  &GenerateMipmap,
  &GenFramebuffers,
  &GenRenderbuffers,
  &GenTextures,
  &GetActiveAttrib,
  &GetActiveUniform,
  &GetAttachedShaders,
  &GetAttribLocation,
  &GetBooleanv,
  &GetBufferParameteriv,
  &GetError,
  &GetFloatv,
  &GetFramebufferAttachmentParameteriv,
  &GetIntegerv,
  &GetProgramiv,
  &GetProgramInfoLog,
  &GetRenderbufferParameteriv,
  &GetShaderiv,
  &GetShaderInfoLog,
  &GetShaderPrecisionFormat,
  &GetShaderSource,
  &GetString,
  &GetTexParameterfv,
  &GetTexParameteriv,
  &GetUniformfv,
  &GetUniformiv,
  &GetUniformLocation,
  &GetVertexAttribfv,
  &GetVertexAttribiv,
  &GetVertexAttribPointerv,
  &Hint,
  &IsBuffer,
  &IsEnabled,
  &IsFramebuffer,
  &IsProgram,
  &IsRenderbuffer,
  &IsShader,
  &IsTexture,
  &LineWidth,
  &LinkProgram,
  &PixelStorei,
  &PolygonOffset,
  &ReadPixels,
  &ReleaseShaderCompiler,
  &RenderbufferStorage,
  &SampleCoverage,
  &Scissor,
  &ShaderBinary,
  &ShaderSource,
  &StencilFunc,
  &StencilFuncSeparate,
  &StencilMask,
  &StencilMaskSeparate,
  &StencilOp,
  &StencilOpSeparate,
  &TexImage2D,
  &TexParameterf,
  &TexParameterfv,
  &TexParameteri,
  &TexParameteriv,
  &TexSubImage2D,
  &Uniform1f,
  &Uniform1fv,
  &Uniform1i,
  &Uniform1iv,
  &Uniform2f,
  &Uniform2fv,
  &Uniform2i,
  &Uniform2iv,
  &Uniform3f,
  &Uniform3fv,
  &Uniform3i,
  &Uniform3iv,
  &Uniform4f,
  &Uniform4fv,
  &Uniform4i,
  &Uniform4iv,
  &UniformMatrix2fv,
  &UniformMatrix3fv,
  &UniformMatrix4fv,
  &UseProgram,
  &ValidateProgram,
  &VertexAttrib1f,
  &VertexAttrib1fv,
  &VertexAttrib2f,
  &VertexAttrib2fv,
  &VertexAttrib3f,
  &VertexAttrib3fv,
  &VertexAttrib4f,
  &VertexAttrib4fv,
  &VertexAttribPointer,
  &Viewport,
  &SwapBuffers,
  &GetMaxValueInBuffer,
  &GenSharedIds,
  &DeleteSharedIds,
  &RegisterSharedIds,
  &CommandBufferEnable,
  &MapBufferSubData,
  &UnmapBufferSubData,
  &MapTexSubImage2D,
  &UnmapTexSubImage2D
};

}  // namespace

const PPB_OpenGLES_Dev* Graphics3D::GetOpenGLESInterface() {
  return &ppb_opengles;
}

}  // namespace pepper