Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ppapi / lib / gl / gles2 / gles2.c
blob187d1a2478d227c9f7149eb3863e563b06a20788
1 // Copyright 2014 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.
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT!
11 #ifndef GL_GLEXT_PROTOTYPES
12 #define GL_GLEXT_PROTOTYPES
13 #endif
14 #include <GLES2/gl2.h>
15 #include <GLES2/gl2ext.h>
16 #include "ppapi/lib/gl/gles2/gl2ext_ppapi.h"
18 void GL_APIENTRY glActiveTexture(GLenum texture) {
19 glGetInterfacePPAPI()->ActiveTexture(glGetCurrentContextPPAPI(), texture);
22 void GL_APIENTRY glAttachShader(GLuint program, GLuint shader) {
23 glGetInterfacePPAPI()->AttachShader(glGetCurrentContextPPAPI(), program,
24 shader);
27 void GL_APIENTRY glBindAttribLocation(GLuint program,
28 GLuint index,
29 const char* name) {
30 glGetInterfacePPAPI()->BindAttribLocation(glGetCurrentContextPPAPI(), program,
31 index, name);
34 void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer) {
35 glGetInterfacePPAPI()->BindBuffer(glGetCurrentContextPPAPI(), target, buffer);
38 void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer) {
39 glGetInterfacePPAPI()->BindFramebuffer(glGetCurrentContextPPAPI(), target,
40 framebuffer);
43 void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
44 glGetInterfacePPAPI()->BindRenderbuffer(glGetCurrentContextPPAPI(), target,
45 renderbuffer);
48 void GL_APIENTRY glBindTexture(GLenum target, GLuint texture) {
49 glGetInterfacePPAPI()->BindTexture(glGetCurrentContextPPAPI(), target,
50 texture);
53 void GL_APIENTRY glBlendColor(GLclampf red,
54 GLclampf green,
55 GLclampf blue,
56 GLclampf alpha) {
57 glGetInterfacePPAPI()->BlendColor(glGetCurrentContextPPAPI(), red, green,
58 blue, alpha);
61 void GL_APIENTRY glBlendEquation(GLenum mode) {
62 glGetInterfacePPAPI()->BlendEquation(glGetCurrentContextPPAPI(), mode);
65 void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
66 glGetInterfacePPAPI()->BlendEquationSeparate(glGetCurrentContextPPAPI(),
67 modeRGB, modeAlpha);
70 void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor) {
71 glGetInterfacePPAPI()->BlendFunc(glGetCurrentContextPPAPI(), sfactor,
72 dfactor);
75 void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB,
76 GLenum dstRGB,
77 GLenum srcAlpha,
78 GLenum dstAlpha) {
79 glGetInterfacePPAPI()->BlendFuncSeparate(glGetCurrentContextPPAPI(), srcRGB,
80 dstRGB, srcAlpha, dstAlpha);
83 void GL_APIENTRY glBufferData(GLenum target,
84 GLsizeiptr size,
85 const void* data,
86 GLenum usage) {
87 glGetInterfacePPAPI()->BufferData(glGetCurrentContextPPAPI(), target, size,
88 data, usage);
91 void GL_APIENTRY glBufferSubData(GLenum target,
92 GLintptr offset,
93 GLsizeiptr size,
94 const void* data) {
95 glGetInterfacePPAPI()->BufferSubData(glGetCurrentContextPPAPI(), target,
96 offset, size, data);
99 GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target) {
100 return glGetInterfacePPAPI()->CheckFramebufferStatus(
101 glGetCurrentContextPPAPI(), target);
104 void GL_APIENTRY glClear(GLbitfield mask) {
105 glGetInterfacePPAPI()->Clear(glGetCurrentContextPPAPI(), mask);
108 void GL_APIENTRY glClearColor(GLclampf red,
109 GLclampf green,
110 GLclampf blue,
111 GLclampf alpha) {
112 glGetInterfacePPAPI()->ClearColor(glGetCurrentContextPPAPI(), red, green,
113 blue, alpha);
116 void GL_APIENTRY glClearDepthf(GLclampf depth) {
117 glGetInterfacePPAPI()->ClearDepthf(glGetCurrentContextPPAPI(), depth);
120 void GL_APIENTRY glClearStencil(GLint s) {
121 glGetInterfacePPAPI()->ClearStencil(glGetCurrentContextPPAPI(), s);
124 void GL_APIENTRY glColorMask(GLboolean red,
125 GLboolean green,
126 GLboolean blue,
127 GLboolean alpha) {
128 glGetInterfacePPAPI()->ColorMask(glGetCurrentContextPPAPI(), red, green, blue,
129 alpha);
132 void GL_APIENTRY glCompileShader(GLuint shader) {
133 glGetInterfacePPAPI()->CompileShader(glGetCurrentContextPPAPI(), shader);
136 void GL_APIENTRY glCompressedTexImage2D(GLenum target,
137 GLint level,
138 GLenum internalformat,
139 GLsizei width,
140 GLsizei height,
141 GLint border,
142 GLsizei imageSize,
143 const void* data) {
144 glGetInterfacePPAPI()->CompressedTexImage2D(
145 glGetCurrentContextPPAPI(), target, level, internalformat, width, height,
146 border, imageSize, data);
149 void GL_APIENTRY glCompressedTexSubImage2D(GLenum target,
150 GLint level,
151 GLint xoffset,
152 GLint yoffset,
153 GLsizei width,
154 GLsizei height,
155 GLenum format,
156 GLsizei imageSize,
157 const void* data) {
158 glGetInterfacePPAPI()->CompressedTexSubImage2D(
159 glGetCurrentContextPPAPI(), target, level, xoffset, yoffset, width,
160 height, format, imageSize, data);
163 void GL_APIENTRY glCopyTexImage2D(GLenum target,
164 GLint level,
165 GLenum internalformat,
166 GLint x,
167 GLint y,
168 GLsizei width,
169 GLsizei height,
170 GLint border) {
171 glGetInterfacePPAPI()->CopyTexImage2D(glGetCurrentContextPPAPI(), target,
172 level, internalformat, x, y, width,
173 height, border);
176 void GL_APIENTRY glCopyTexSubImage2D(GLenum target,
177 GLint level,
178 GLint xoffset,
179 GLint yoffset,
180 GLint x,
181 GLint y,
182 GLsizei width,
183 GLsizei height) {
184 glGetInterfacePPAPI()->CopyTexSubImage2D(glGetCurrentContextPPAPI(), target,
185 level, xoffset, yoffset, x, y, width,
186 height);
189 GLuint GL_APIENTRY glCreateProgram() {
190 return glGetInterfacePPAPI()->CreateProgram(glGetCurrentContextPPAPI());
193 GLuint GL_APIENTRY glCreateShader(GLenum type) {
194 return glGetInterfacePPAPI()->CreateShader(glGetCurrentContextPPAPI(), type);
197 void GL_APIENTRY glCullFace(GLenum mode) {
198 glGetInterfacePPAPI()->CullFace(glGetCurrentContextPPAPI(), mode);
201 void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers) {
202 glGetInterfacePPAPI()->DeleteBuffers(glGetCurrentContextPPAPI(), n, buffers);
205 void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
206 glGetInterfacePPAPI()->DeleteFramebuffers(glGetCurrentContextPPAPI(), n,
207 framebuffers);
210 void GL_APIENTRY glDeleteProgram(GLuint program) {
211 glGetInterfacePPAPI()->DeleteProgram(glGetCurrentContextPPAPI(), program);
214 void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
215 glGetInterfacePPAPI()->DeleteRenderbuffers(glGetCurrentContextPPAPI(), n,
216 renderbuffers);
219 void GL_APIENTRY glDeleteShader(GLuint shader) {
220 glGetInterfacePPAPI()->DeleteShader(glGetCurrentContextPPAPI(), shader);
223 void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures) {
224 glGetInterfacePPAPI()->DeleteTextures(glGetCurrentContextPPAPI(), n,
225 textures);
228 void GL_APIENTRY glDepthFunc(GLenum func) {
229 glGetInterfacePPAPI()->DepthFunc(glGetCurrentContextPPAPI(), func);
232 void GL_APIENTRY glDepthMask(GLboolean flag) {
233 glGetInterfacePPAPI()->DepthMask(glGetCurrentContextPPAPI(), flag);
236 void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar) {
237 glGetInterfacePPAPI()->DepthRangef(glGetCurrentContextPPAPI(), zNear, zFar);
240 void GL_APIENTRY glDetachShader(GLuint program, GLuint shader) {
241 glGetInterfacePPAPI()->DetachShader(glGetCurrentContextPPAPI(), program,
242 shader);
245 void GL_APIENTRY glDisable(GLenum cap) {
246 glGetInterfacePPAPI()->Disable(glGetCurrentContextPPAPI(), cap);
249 void GL_APIENTRY glDisableVertexAttribArray(GLuint index) {
250 glGetInterfacePPAPI()->DisableVertexAttribArray(glGetCurrentContextPPAPI(),
251 index);
254 void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count) {
255 glGetInterfacePPAPI()->DrawArrays(glGetCurrentContextPPAPI(), mode, first,
256 count);
259 void GL_APIENTRY glDrawElements(GLenum mode,
260 GLsizei count,
261 GLenum type,
262 const void* indices) {
263 glGetInterfacePPAPI()->DrawElements(glGetCurrentContextPPAPI(), mode, count,
264 type, indices);
267 void GL_APIENTRY glEnable(GLenum cap) {
268 glGetInterfacePPAPI()->Enable(glGetCurrentContextPPAPI(), cap);
271 void GL_APIENTRY glEnableVertexAttribArray(GLuint index) {
272 glGetInterfacePPAPI()->EnableVertexAttribArray(glGetCurrentContextPPAPI(),
273 index);
276 void GL_APIENTRY glFinish() {
277 glGetInterfacePPAPI()->Finish(glGetCurrentContextPPAPI());
280 void GL_APIENTRY glFlush() {
281 glGetInterfacePPAPI()->Flush(glGetCurrentContextPPAPI());
284 void GL_APIENTRY glFramebufferRenderbuffer(GLenum target,
285 GLenum attachment,
286 GLenum renderbuffertarget,
287 GLuint renderbuffer) {
288 glGetInterfacePPAPI()->FramebufferRenderbuffer(
289 glGetCurrentContextPPAPI(), target, attachment, renderbuffertarget,
290 renderbuffer);
293 void GL_APIENTRY glFramebufferTexture2D(GLenum target,
294 GLenum attachment,
295 GLenum textarget,
296 GLuint texture,
297 GLint level) {
298 glGetInterfacePPAPI()->FramebufferTexture2D(glGetCurrentContextPPAPI(),
299 target, attachment, textarget,
300 texture, level);
303 void GL_APIENTRY glFrontFace(GLenum mode) {
304 glGetInterfacePPAPI()->FrontFace(glGetCurrentContextPPAPI(), mode);
307 void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers) {
308 glGetInterfacePPAPI()->GenBuffers(glGetCurrentContextPPAPI(), n, buffers);
311 void GL_APIENTRY glGenerateMipmap(GLenum target) {
312 glGetInterfacePPAPI()->GenerateMipmap(glGetCurrentContextPPAPI(), target);
315 void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
316 glGetInterfacePPAPI()->GenFramebuffers(glGetCurrentContextPPAPI(), n,
317 framebuffers);
320 void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
321 glGetInterfacePPAPI()->GenRenderbuffers(glGetCurrentContextPPAPI(), n,
322 renderbuffers);
325 void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures) {
326 glGetInterfacePPAPI()->GenTextures(glGetCurrentContextPPAPI(), n, textures);
329 void GL_APIENTRY glGetActiveAttrib(GLuint program,
330 GLuint index,
331 GLsizei bufsize,
332 GLsizei* length,
333 GLint* size,
334 GLenum* type,
335 char* name) {
336 glGetInterfacePPAPI()->GetActiveAttrib(glGetCurrentContextPPAPI(), program,
337 index, bufsize, length, size, type,
338 name);
341 void GL_APIENTRY glGetActiveUniform(GLuint program,
342 GLuint index,
343 GLsizei bufsize,
344 GLsizei* length,
345 GLint* size,
346 GLenum* type,
347 char* name) {
348 glGetInterfacePPAPI()->GetActiveUniform(glGetCurrentContextPPAPI(), program,
349 index, bufsize, length, size, type,
350 name);
353 void GL_APIENTRY glGetAttachedShaders(GLuint program,
354 GLsizei maxcount,
355 GLsizei* count,
356 GLuint* shaders) {
357 glGetInterfacePPAPI()->GetAttachedShaders(glGetCurrentContextPPAPI(), program,
358 maxcount, count, shaders);
361 GLint GL_APIENTRY glGetAttribLocation(GLuint program, const char* name) {
362 return glGetInterfacePPAPI()->GetAttribLocation(glGetCurrentContextPPAPI(),
363 program, name);
366 void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params) {
367 glGetInterfacePPAPI()->GetBooleanv(glGetCurrentContextPPAPI(), pname, params);
370 void GL_APIENTRY glGetBufferParameteriv(GLenum target,
371 GLenum pname,
372 GLint* params) {
373 glGetInterfacePPAPI()->GetBufferParameteriv(glGetCurrentContextPPAPI(),
374 target, pname, params);
377 GLenum GL_APIENTRY glGetError() {
378 return glGetInterfacePPAPI()->GetError(glGetCurrentContextPPAPI());
381 void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params) {
382 glGetInterfacePPAPI()->GetFloatv(glGetCurrentContextPPAPI(), pname, params);
385 void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target,
386 GLenum attachment,
387 GLenum pname,
388 GLint* params) {
389 glGetInterfacePPAPI()->GetFramebufferAttachmentParameteriv(
390 glGetCurrentContextPPAPI(), target, attachment, pname, params);
393 void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params) {
394 glGetInterfacePPAPI()->GetIntegerv(glGetCurrentContextPPAPI(), pname, params);
397 void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
398 glGetInterfacePPAPI()->GetProgramiv(glGetCurrentContextPPAPI(), program,
399 pname, params);
402 void GL_APIENTRY glGetProgramInfoLog(GLuint program,
403 GLsizei bufsize,
404 GLsizei* length,
405 char* infolog) {
406 glGetInterfacePPAPI()->GetProgramInfoLog(glGetCurrentContextPPAPI(), program,
407 bufsize, length, infolog);
410 void GL_APIENTRY glGetRenderbufferParameteriv(GLenum target,
411 GLenum pname,
412 GLint* params) {
413 glGetInterfacePPAPI()->GetRenderbufferParameteriv(glGetCurrentContextPPAPI(),
414 target, pname, params);
417 void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params) {
418 glGetInterfacePPAPI()->GetShaderiv(glGetCurrentContextPPAPI(), shader, pname,
419 params);
422 void GL_APIENTRY glGetShaderInfoLog(GLuint shader,
423 GLsizei bufsize,
424 GLsizei* length,
425 char* infolog) {
426 glGetInterfacePPAPI()->GetShaderInfoLog(glGetCurrentContextPPAPI(), shader,
427 bufsize, length, infolog);
430 void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype,
431 GLenum precisiontype,
432 GLint* range,
433 GLint* precision) {
434 glGetInterfacePPAPI()->GetShaderPrecisionFormat(
435 glGetCurrentContextPPAPI(), shadertype, precisiontype, range, precision);
438 void GL_APIENTRY glGetShaderSource(GLuint shader,
439 GLsizei bufsize,
440 GLsizei* length,
441 char* source) {
442 glGetInterfacePPAPI()->GetShaderSource(glGetCurrentContextPPAPI(), shader,
443 bufsize, length, source);
446 const GLubyte* GL_APIENTRY glGetString(GLenum name) {
447 return glGetInterfacePPAPI()->GetString(glGetCurrentContextPPAPI(), name);
450 void GL_APIENTRY glGetTexParameterfv(GLenum target,
451 GLenum pname,
452 GLfloat* params) {
453 glGetInterfacePPAPI()->GetTexParameterfv(glGetCurrentContextPPAPI(), target,
454 pname, params);
457 void GL_APIENTRY glGetTexParameteriv(GLenum target,
458 GLenum pname,
459 GLint* params) {
460 glGetInterfacePPAPI()->GetTexParameteriv(glGetCurrentContextPPAPI(), target,
461 pname, params);
464 void GL_APIENTRY glGetUniformfv(GLuint program,
465 GLint location,
466 GLfloat* params) {
467 glGetInterfacePPAPI()->GetUniformfv(glGetCurrentContextPPAPI(), program,
468 location, params);
471 void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params) {
472 glGetInterfacePPAPI()->GetUniformiv(glGetCurrentContextPPAPI(), program,
473 location, params);
476 GLint GL_APIENTRY glGetUniformLocation(GLuint program, const char* name) {
477 return glGetInterfacePPAPI()->GetUniformLocation(glGetCurrentContextPPAPI(),
478 program, name);
481 void GL_APIENTRY glGetVertexAttribfv(GLuint index,
482 GLenum pname,
483 GLfloat* params) {
484 glGetInterfacePPAPI()->GetVertexAttribfv(glGetCurrentContextPPAPI(), index,
485 pname, params);
488 void GL_APIENTRY glGetVertexAttribiv(GLuint index,
489 GLenum pname,
490 GLint* params) {
491 glGetInterfacePPAPI()->GetVertexAttribiv(glGetCurrentContextPPAPI(), index,
492 pname, params);
495 void GL_APIENTRY glGetVertexAttribPointerv(GLuint index,
496 GLenum pname,
497 void** pointer) {
498 glGetInterfacePPAPI()->GetVertexAttribPointerv(glGetCurrentContextPPAPI(),
499 index, pname, pointer);
502 void GL_APIENTRY glHint(GLenum target, GLenum mode) {
503 glGetInterfacePPAPI()->Hint(glGetCurrentContextPPAPI(), target, mode);
506 GLboolean GL_APIENTRY glIsBuffer(GLuint buffer) {
507 return glGetInterfacePPAPI()->IsBuffer(glGetCurrentContextPPAPI(), buffer);
510 GLboolean GL_APIENTRY glIsEnabled(GLenum cap) {
511 return glGetInterfacePPAPI()->IsEnabled(glGetCurrentContextPPAPI(), cap);
514 GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer) {
515 return glGetInterfacePPAPI()->IsFramebuffer(glGetCurrentContextPPAPI(),
516 framebuffer);
519 GLboolean GL_APIENTRY glIsProgram(GLuint program) {
520 return glGetInterfacePPAPI()->IsProgram(glGetCurrentContextPPAPI(), program);
523 GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer) {
524 return glGetInterfacePPAPI()->IsRenderbuffer(glGetCurrentContextPPAPI(),
525 renderbuffer);
528 GLboolean GL_APIENTRY glIsShader(GLuint shader) {
529 return glGetInterfacePPAPI()->IsShader(glGetCurrentContextPPAPI(), shader);
532 GLboolean GL_APIENTRY glIsTexture(GLuint texture) {
533 return glGetInterfacePPAPI()->IsTexture(glGetCurrentContextPPAPI(), texture);
536 void GL_APIENTRY glLineWidth(GLfloat width) {
537 glGetInterfacePPAPI()->LineWidth(glGetCurrentContextPPAPI(), width);
540 void GL_APIENTRY glLinkProgram(GLuint program) {
541 glGetInterfacePPAPI()->LinkProgram(glGetCurrentContextPPAPI(), program);
544 void GL_APIENTRY glPixelStorei(GLenum pname, GLint param) {
545 glGetInterfacePPAPI()->PixelStorei(glGetCurrentContextPPAPI(), pname, param);
548 void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units) {
549 glGetInterfacePPAPI()->PolygonOffset(glGetCurrentContextPPAPI(), factor,
550 units);
553 void GL_APIENTRY glReadPixels(GLint x,
554 GLint y,
555 GLsizei width,
556 GLsizei height,
557 GLenum format,
558 GLenum type,
559 void* pixels) {
560 glGetInterfacePPAPI()->ReadPixels(glGetCurrentContextPPAPI(), x, y, width,
561 height, format, type, pixels);
564 void GL_APIENTRY glReleaseShaderCompiler() {
565 glGetInterfacePPAPI()->ReleaseShaderCompiler(glGetCurrentContextPPAPI());
568 void GL_APIENTRY glRenderbufferStorage(GLenum target,
569 GLenum internalformat,
570 GLsizei width,
571 GLsizei height) {
572 glGetInterfacePPAPI()->RenderbufferStorage(glGetCurrentContextPPAPI(), target,
573 internalformat, width, height);
576 void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert) {
577 glGetInterfacePPAPI()->SampleCoverage(glGetCurrentContextPPAPI(), value,
578 invert);
581 void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
582 glGetInterfacePPAPI()->Scissor(glGetCurrentContextPPAPI(), x, y, width,
583 height);
586 void GL_APIENTRY glShaderBinary(GLsizei n,
587 const GLuint* shaders,
588 GLenum binaryformat,
589 const void* binary,
590 GLsizei length) {
591 glGetInterfacePPAPI()->ShaderBinary(glGetCurrentContextPPAPI(), n, shaders,
592 binaryformat, binary, length);
595 void GL_APIENTRY glShaderSource(GLuint shader,
596 GLsizei count,
597 const char** str,
598 const GLint* length) {
599 glGetInterfacePPAPI()->ShaderSource(glGetCurrentContextPPAPI(), shader, count,
600 str, length);
603 void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask) {
604 glGetInterfacePPAPI()->StencilFunc(glGetCurrentContextPPAPI(), func, ref,
605 mask);
608 void GL_APIENTRY glStencilFuncSeparate(GLenum face,
609 GLenum func,
610 GLint ref,
611 GLuint mask) {
612 glGetInterfacePPAPI()->StencilFuncSeparate(glGetCurrentContextPPAPI(), face,
613 func, ref, mask);
616 void GL_APIENTRY glStencilMask(GLuint mask) {
617 glGetInterfacePPAPI()->StencilMask(glGetCurrentContextPPAPI(), mask);
620 void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask) {
621 glGetInterfacePPAPI()->StencilMaskSeparate(glGetCurrentContextPPAPI(), face,
622 mask);
625 void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
626 glGetInterfacePPAPI()->StencilOp(glGetCurrentContextPPAPI(), fail, zfail,
627 zpass);
630 void GL_APIENTRY glStencilOpSeparate(GLenum face,
631 GLenum fail,
632 GLenum zfail,
633 GLenum zpass) {
634 glGetInterfacePPAPI()->StencilOpSeparate(glGetCurrentContextPPAPI(), face,
635 fail, zfail, zpass);
638 void GL_APIENTRY glTexImage2D(GLenum target,
639 GLint level,
640 GLint internalformat,
641 GLsizei width,
642 GLsizei height,
643 GLint border,
644 GLenum format,
645 GLenum type,
646 const void* pixels) {
647 glGetInterfacePPAPI()->TexImage2D(glGetCurrentContextPPAPI(), target, level,
648 internalformat, width, height, border,
649 format, type, pixels);
652 void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param) {
653 glGetInterfacePPAPI()->TexParameterf(glGetCurrentContextPPAPI(), target,
654 pname, param);
657 void GL_APIENTRY glTexParameterfv(GLenum target,
658 GLenum pname,
659 const GLfloat* params) {
660 glGetInterfacePPAPI()->TexParameterfv(glGetCurrentContextPPAPI(), target,
661 pname, params);
664 void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param) {
665 glGetInterfacePPAPI()->TexParameteri(glGetCurrentContextPPAPI(), target,
666 pname, param);
669 void GL_APIENTRY glTexParameteriv(GLenum target,
670 GLenum pname,
671 const GLint* params) {
672 glGetInterfacePPAPI()->TexParameteriv(glGetCurrentContextPPAPI(), target,
673 pname, params);
676 void GL_APIENTRY glTexSubImage2D(GLenum target,
677 GLint level,
678 GLint xoffset,
679 GLint yoffset,
680 GLsizei width,
681 GLsizei height,
682 GLenum format,
683 GLenum type,
684 const void* pixels) {
685 glGetInterfacePPAPI()->TexSubImage2D(glGetCurrentContextPPAPI(), target,
686 level, xoffset, yoffset, width, height,
687 format, type, pixels);
690 void GL_APIENTRY glUniform1f(GLint location, GLfloat x) {
691 glGetInterfacePPAPI()->Uniform1f(glGetCurrentContextPPAPI(), location, x);
694 void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v) {
695 glGetInterfacePPAPI()->Uniform1fv(glGetCurrentContextPPAPI(), location, count,
699 void GL_APIENTRY glUniform1i(GLint location, GLint x) {
700 glGetInterfacePPAPI()->Uniform1i(glGetCurrentContextPPAPI(), location, x);
703 void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v) {
704 glGetInterfacePPAPI()->Uniform1iv(glGetCurrentContextPPAPI(), location, count,
708 void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y) {
709 glGetInterfacePPAPI()->Uniform2f(glGetCurrentContextPPAPI(), location, x, y);
712 void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v) {
713 glGetInterfacePPAPI()->Uniform2fv(glGetCurrentContextPPAPI(), location, count,
717 void GL_APIENTRY glUniform2i(GLint location, GLint x, GLint y) {
718 glGetInterfacePPAPI()->Uniform2i(glGetCurrentContextPPAPI(), location, x, y);
721 void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v) {
722 glGetInterfacePPAPI()->Uniform2iv(glGetCurrentContextPPAPI(), location, count,
726 void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
727 glGetInterfacePPAPI()->Uniform3f(glGetCurrentContextPPAPI(), location, x, y,
731 void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v) {
732 glGetInterfacePPAPI()->Uniform3fv(glGetCurrentContextPPAPI(), location, count,
736 void GL_APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z) {
737 glGetInterfacePPAPI()->Uniform3i(glGetCurrentContextPPAPI(), location, x, y,
741 void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v) {
742 glGetInterfacePPAPI()->Uniform3iv(glGetCurrentContextPPAPI(), location, count,
746 void GL_APIENTRY
747 glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
748 glGetInterfacePPAPI()->Uniform4f(glGetCurrentContextPPAPI(), location, x, y,
749 z, w);
752 void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v) {
753 glGetInterfacePPAPI()->Uniform4fv(glGetCurrentContextPPAPI(), location, count,
757 void GL_APIENTRY
758 glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
759 glGetInterfacePPAPI()->Uniform4i(glGetCurrentContextPPAPI(), location, x, y,
760 z, w);
763 void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v) {
764 glGetInterfacePPAPI()->Uniform4iv(glGetCurrentContextPPAPI(), location, count,
768 void GL_APIENTRY glUniformMatrix2fv(GLint location,
769 GLsizei count,
770 GLboolean transpose,
771 const GLfloat* value) {
772 glGetInterfacePPAPI()->UniformMatrix2fv(glGetCurrentContextPPAPI(), location,
773 count, transpose, value);
776 void GL_APIENTRY glUniformMatrix3fv(GLint location,
777 GLsizei count,
778 GLboolean transpose,
779 const GLfloat* value) {
780 glGetInterfacePPAPI()->UniformMatrix3fv(glGetCurrentContextPPAPI(), location,
781 count, transpose, value);
784 void GL_APIENTRY glUniformMatrix4fv(GLint location,
785 GLsizei count,
786 GLboolean transpose,
787 const GLfloat* value) {
788 glGetInterfacePPAPI()->UniformMatrix4fv(glGetCurrentContextPPAPI(), location,
789 count, transpose, value);
792 void GL_APIENTRY glUseProgram(GLuint program) {
793 glGetInterfacePPAPI()->UseProgram(glGetCurrentContextPPAPI(), program);
796 void GL_APIENTRY glValidateProgram(GLuint program) {
797 glGetInterfacePPAPI()->ValidateProgram(glGetCurrentContextPPAPI(), program);
800 void GL_APIENTRY glVertexAttrib1f(GLuint indx, GLfloat x) {
801 glGetInterfacePPAPI()->VertexAttrib1f(glGetCurrentContextPPAPI(), indx, x);
804 void GL_APIENTRY glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
805 glGetInterfacePPAPI()->VertexAttrib1fv(glGetCurrentContextPPAPI(), indx,
806 values);
809 void GL_APIENTRY glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
810 glGetInterfacePPAPI()->VertexAttrib2f(glGetCurrentContextPPAPI(), indx, x, y);
813 void GL_APIENTRY glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
814 glGetInterfacePPAPI()->VertexAttrib2fv(glGetCurrentContextPPAPI(), indx,
815 values);
818 void GL_APIENTRY glVertexAttrib3f(GLuint indx,
819 GLfloat x,
820 GLfloat y,
821 GLfloat z) {
822 glGetInterfacePPAPI()->VertexAttrib3f(glGetCurrentContextPPAPI(), indx, x, y,
826 void GL_APIENTRY glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
827 glGetInterfacePPAPI()->VertexAttrib3fv(glGetCurrentContextPPAPI(), indx,
828 values);
831 void GL_APIENTRY
832 glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
833 glGetInterfacePPAPI()->VertexAttrib4f(glGetCurrentContextPPAPI(), indx, x, y,
834 z, w);
837 void GL_APIENTRY glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
838 glGetInterfacePPAPI()->VertexAttrib4fv(glGetCurrentContextPPAPI(), indx,
839 values);
842 void GL_APIENTRY glVertexAttribPointer(GLuint indx,
843 GLint size,
844 GLenum type,
845 GLboolean normalized,
846 GLsizei stride,
847 const void* ptr) {
848 glGetInterfacePPAPI()->VertexAttribPointer(
849 glGetCurrentContextPPAPI(), indx, size, type, normalized, stride, ptr);
852 void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
853 glGetInterfacePPAPI()->Viewport(glGetCurrentContextPPAPI(), x, y, width,
854 height);
857 void GL_APIENTRY glBlitFramebufferEXT(GLint srcX0,
858 GLint srcY0,
859 GLint srcX1,
860 GLint srcY1,
861 GLint dstX0,
862 GLint dstY0,
863 GLint dstX1,
864 GLint dstY1,
865 GLbitfield mask,
866 GLenum filter) {
867 const struct PPB_OpenGLES2FramebufferBlit* ext =
868 glGetFramebufferBlitInterfacePPAPI();
869 if (ext)
870 ext->BlitFramebufferEXT(glGetCurrentContextPPAPI(), srcX0, srcY0, srcX1,
871 srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
874 void GL_APIENTRY glRenderbufferStorageMultisampleEXT(GLenum target,
875 GLsizei samples,
876 GLenum internalformat,
877 GLsizei width,
878 GLsizei height) {
879 const struct PPB_OpenGLES2FramebufferMultisample* ext =
880 glGetFramebufferMultisampleInterfacePPAPI();
881 if (ext)
882 ext->RenderbufferStorageMultisampleEXT(glGetCurrentContextPPAPI(), target,
883 samples, internalformat, width,
884 height);
887 void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint* queries) {
888 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
889 if (ext)
890 ext->GenQueriesEXT(glGetCurrentContextPPAPI(), n, queries);
893 void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint* queries) {
894 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
895 if (ext)
896 ext->DeleteQueriesEXT(glGetCurrentContextPPAPI(), n, queries);
899 GLboolean GL_APIENTRY glIsQueryEXT(GLuint id) {
900 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
901 if (ext)
902 return ext->IsQueryEXT(glGetCurrentContextPPAPI(), id);
903 return 0;
906 void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint id) {
907 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
908 if (ext)
909 ext->BeginQueryEXT(glGetCurrentContextPPAPI(), target, id);
912 void GL_APIENTRY glEndQueryEXT(GLenum target) {
913 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
914 if (ext)
915 ext->EndQueryEXT(glGetCurrentContextPPAPI(), target);
918 void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) {
919 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
920 if (ext)
921 ext->GetQueryivEXT(glGetCurrentContextPPAPI(), target, pname, params);
924 void GL_APIENTRY glGetQueryObjectuivEXT(GLuint id,
925 GLenum pname,
926 GLuint* params) {
927 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
928 if (ext)
929 ext->GetQueryObjectuivEXT(glGetCurrentContextPPAPI(), id, pname, params);
932 void GL_APIENTRY glGenVertexArraysOES(GLsizei n, GLuint* arrays) {
933 const struct PPB_OpenGLES2VertexArrayObject* ext =
934 glGetVertexArrayObjectInterfacePPAPI();
935 if (ext)
936 ext->GenVertexArraysOES(glGetCurrentContextPPAPI(), n, arrays);
939 void GL_APIENTRY glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) {
940 const struct PPB_OpenGLES2VertexArrayObject* ext =
941 glGetVertexArrayObjectInterfacePPAPI();
942 if (ext)
943 ext->DeleteVertexArraysOES(glGetCurrentContextPPAPI(), n, arrays);
946 GLboolean GL_APIENTRY glIsVertexArrayOES(GLuint array) {
947 const struct PPB_OpenGLES2VertexArrayObject* ext =
948 glGetVertexArrayObjectInterfacePPAPI();
949 if (ext)
950 return ext->IsVertexArrayOES(glGetCurrentContextPPAPI(), array);
951 return 0;
954 void GL_APIENTRY glBindVertexArrayOES(GLuint array) {
955 const struct PPB_OpenGLES2VertexArrayObject* ext =
956 glGetVertexArrayObjectInterfacePPAPI();
957 if (ext)
958 ext->BindVertexArrayOES(glGetCurrentContextPPAPI(), array);
961 GLboolean GL_APIENTRY glEnableFeatureCHROMIUM(const char* feature) {
962 const struct PPB_OpenGLES2ChromiumEnableFeature* ext =
963 glGetChromiumEnableFeatureInterfacePPAPI();
964 if (ext)
965 return ext->EnableFeatureCHROMIUM(glGetCurrentContextPPAPI(), feature);
966 return 0;
969 void* GL_APIENTRY glMapBufferSubDataCHROMIUM(GLuint target,
970 GLintptr offset,
971 GLsizeiptr size,
972 GLenum access) {
973 const struct PPB_OpenGLES2ChromiumMapSub* ext =
974 glGetChromiumMapSubInterfacePPAPI();
975 if (ext)
976 return ext->MapBufferSubDataCHROMIUM(glGetCurrentContextPPAPI(), target,
977 offset, size, access);
978 return 0;
981 void GL_APIENTRY glUnmapBufferSubDataCHROMIUM(const void* mem) {
982 const struct PPB_OpenGLES2ChromiumMapSub* ext =
983 glGetChromiumMapSubInterfacePPAPI();
984 if (ext)
985 ext->UnmapBufferSubDataCHROMIUM(glGetCurrentContextPPAPI(), mem);
988 void* GL_APIENTRY glMapTexSubImage2DCHROMIUM(GLenum target,
989 GLint level,
990 GLint xoffset,
991 GLint yoffset,
992 GLsizei width,
993 GLsizei height,
994 GLenum format,
995 GLenum type,
996 GLenum access) {
997 const struct PPB_OpenGLES2ChromiumMapSub* ext =
998 glGetChromiumMapSubInterfacePPAPI();
999 if (ext)
1000 return ext->MapTexSubImage2DCHROMIUM(glGetCurrentContextPPAPI(), target,
1001 level, xoffset, yoffset, width, height,
1002 format, type, access);
1003 return 0;
1006 void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM(const void* mem) {
1007 const struct PPB_OpenGLES2ChromiumMapSub* ext =
1008 glGetChromiumMapSubInterfacePPAPI();
1009 if (ext)
1010 ext->UnmapTexSubImage2DCHROMIUM(glGetCurrentContextPPAPI(), mem);
1013 void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode,
1014 GLint first,
1015 GLsizei count,
1016 GLsizei primcount) {
1017 const struct PPB_OpenGLES2InstancedArrays* ext =
1018 glGetInstancedArraysInterfacePPAPI();
1019 if (ext)
1020 ext->DrawArraysInstancedANGLE(glGetCurrentContextPPAPI(), mode, first,
1021 count, primcount);
1024 void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode,
1025 GLsizei count,
1026 GLenum type,
1027 const void* indices,
1028 GLsizei primcount) {
1029 const struct PPB_OpenGLES2InstancedArrays* ext =
1030 glGetInstancedArraysInterfacePPAPI();
1031 if (ext)
1032 ext->DrawElementsInstancedANGLE(glGetCurrentContextPPAPI(), mode, count,
1033 type, indices, primcount);
1036 void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) {
1037 const struct PPB_OpenGLES2InstancedArrays* ext =
1038 glGetInstancedArraysInterfacePPAPI();
1039 if (ext)
1040 ext->VertexAttribDivisorANGLE(glGetCurrentContextPPAPI(), index, divisor);
1043 void GL_APIENTRY glDrawBuffersEXT(GLsizei count, const GLenum* bufs) {
1044 const struct PPB_OpenGLES2DrawBuffers_Dev* ext =
1045 glGetDrawBuffersInterfacePPAPI();
1046 if (ext)
1047 ext->DrawBuffersEXT(glGetCurrentContextPPAPI(), count, bufs);