Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / ppapi / lib / gl / gles2 / gles2.c
blobfaefb0958e0f416c19e650ab1f5f6c0172ec07e9
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(
24 glGetCurrentContextPPAPI(), program, shader);
27 void GL_APIENTRY
28 glBindAttribLocation(GLuint program, GLuint index, const char* name) {
29 glGetInterfacePPAPI()->BindAttribLocation(
30 glGetCurrentContextPPAPI(), program, index, name);
33 void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer) {
34 glGetInterfacePPAPI()->BindBuffer(glGetCurrentContextPPAPI(), target, buffer);
37 void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer) {
38 glGetInterfacePPAPI()->BindFramebuffer(
39 glGetCurrentContextPPAPI(), target, framebuffer);
42 void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
43 glGetInterfacePPAPI()->BindRenderbuffer(
44 glGetCurrentContextPPAPI(), target, renderbuffer);
47 void GL_APIENTRY glBindTexture(GLenum target, GLuint texture) {
48 glGetInterfacePPAPI()->BindTexture(
49 glGetCurrentContextPPAPI(), target, texture);
52 void GL_APIENTRY
53 glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
54 glGetInterfacePPAPI()->BlendColor(
55 glGetCurrentContextPPAPI(), red, green, blue, alpha);
58 void GL_APIENTRY glBlendEquation(GLenum mode) {
59 glGetInterfacePPAPI()->BlendEquation(glGetCurrentContextPPAPI(), mode);
62 void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
63 glGetInterfacePPAPI()->BlendEquationSeparate(
64 glGetCurrentContextPPAPI(), modeRGB, modeAlpha);
67 void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor) {
68 glGetInterfacePPAPI()->BlendFunc(
69 glGetCurrentContextPPAPI(), sfactor, dfactor);
72 void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB,
73 GLenum dstRGB,
74 GLenum srcAlpha,
75 GLenum dstAlpha) {
76 glGetInterfacePPAPI()->BlendFuncSeparate(
77 glGetCurrentContextPPAPI(), srcRGB, dstRGB, srcAlpha, dstAlpha);
80 void GL_APIENTRY
81 glBufferData(GLenum target, GLsizeiptr size, const void* data, GLenum usage) {
82 glGetInterfacePPAPI()->BufferData(
83 glGetCurrentContextPPAPI(), target, size, data, usage);
86 void GL_APIENTRY glBufferSubData(GLenum target,
87 GLintptr offset,
88 GLsizeiptr size,
89 const void* data) {
90 glGetInterfacePPAPI()->BufferSubData(
91 glGetCurrentContextPPAPI(), target, offset, size, data);
94 GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target) {
95 return glGetInterfacePPAPI()->CheckFramebufferStatus(
96 glGetCurrentContextPPAPI(), target);
99 void GL_APIENTRY glClear(GLbitfield mask) {
100 glGetInterfacePPAPI()->Clear(glGetCurrentContextPPAPI(), mask);
103 void GL_APIENTRY
104 glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
105 glGetInterfacePPAPI()->ClearColor(
106 glGetCurrentContextPPAPI(), red, green, blue, alpha);
109 void GL_APIENTRY glClearDepthf(GLclampf depth) {
110 glGetInterfacePPAPI()->ClearDepthf(glGetCurrentContextPPAPI(), depth);
113 void GL_APIENTRY glClearStencil(GLint s) {
114 glGetInterfacePPAPI()->ClearStencil(glGetCurrentContextPPAPI(), s);
117 void GL_APIENTRY
118 glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
119 glGetInterfacePPAPI()->ColorMask(
120 glGetCurrentContextPPAPI(), red, green, blue, alpha);
123 void GL_APIENTRY glCompileShader(GLuint shader) {
124 glGetInterfacePPAPI()->CompileShader(glGetCurrentContextPPAPI(), shader);
127 void GL_APIENTRY glCompressedTexImage2D(GLenum target,
128 GLint level,
129 GLenum internalformat,
130 GLsizei width,
131 GLsizei height,
132 GLint border,
133 GLsizei imageSize,
134 const void* data) {
135 glGetInterfacePPAPI()->CompressedTexImage2D(glGetCurrentContextPPAPI(),
136 target,
137 level,
138 internalformat,
139 width,
140 height,
141 border,
142 imageSize,
143 data);
146 void GL_APIENTRY glCompressedTexSubImage2D(GLenum target,
147 GLint level,
148 GLint xoffset,
149 GLint yoffset,
150 GLsizei width,
151 GLsizei height,
152 GLenum format,
153 GLsizei imageSize,
154 const void* data) {
155 glGetInterfacePPAPI()->CompressedTexSubImage2D(glGetCurrentContextPPAPI(),
156 target,
157 level,
158 xoffset,
159 yoffset,
160 width,
161 height,
162 format,
163 imageSize,
164 data);
167 void GL_APIENTRY glCopyTexImage2D(GLenum target,
168 GLint level,
169 GLenum internalformat,
170 GLint x,
171 GLint y,
172 GLsizei width,
173 GLsizei height,
174 GLint border) {
175 glGetInterfacePPAPI()->CopyTexImage2D(glGetCurrentContextPPAPI(),
176 target,
177 level,
178 internalformat,
181 width,
182 height,
183 border);
186 void GL_APIENTRY glCopyTexSubImage2D(GLenum target,
187 GLint level,
188 GLint xoffset,
189 GLint yoffset,
190 GLint x,
191 GLint y,
192 GLsizei width,
193 GLsizei height) {
194 glGetInterfacePPAPI()->CopyTexSubImage2D(glGetCurrentContextPPAPI(),
195 target,
196 level,
197 xoffset,
198 yoffset,
201 width,
202 height);
205 GLuint GL_APIENTRY glCreateProgram() {
206 return glGetInterfacePPAPI()->CreateProgram(glGetCurrentContextPPAPI());
209 GLuint GL_APIENTRY glCreateShader(GLenum type) {
210 return glGetInterfacePPAPI()->CreateShader(glGetCurrentContextPPAPI(), type);
213 void GL_APIENTRY glCullFace(GLenum mode) {
214 glGetInterfacePPAPI()->CullFace(glGetCurrentContextPPAPI(), mode);
217 void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers) {
218 glGetInterfacePPAPI()->DeleteBuffers(glGetCurrentContextPPAPI(), n, buffers);
221 void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
222 glGetInterfacePPAPI()->DeleteFramebuffers(
223 glGetCurrentContextPPAPI(), n, framebuffers);
226 void GL_APIENTRY glDeleteProgram(GLuint program) {
227 glGetInterfacePPAPI()->DeleteProgram(glGetCurrentContextPPAPI(), program);
230 void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
231 glGetInterfacePPAPI()->DeleteRenderbuffers(
232 glGetCurrentContextPPAPI(), n, renderbuffers);
235 void GL_APIENTRY glDeleteShader(GLuint shader) {
236 glGetInterfacePPAPI()->DeleteShader(glGetCurrentContextPPAPI(), shader);
239 void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures) {
240 glGetInterfacePPAPI()->DeleteTextures(
241 glGetCurrentContextPPAPI(), n, textures);
244 void GL_APIENTRY glDepthFunc(GLenum func) {
245 glGetInterfacePPAPI()->DepthFunc(glGetCurrentContextPPAPI(), func);
248 void GL_APIENTRY glDepthMask(GLboolean flag) {
249 glGetInterfacePPAPI()->DepthMask(glGetCurrentContextPPAPI(), flag);
252 void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar) {
253 glGetInterfacePPAPI()->DepthRangef(glGetCurrentContextPPAPI(), zNear, zFar);
256 void GL_APIENTRY glDetachShader(GLuint program, GLuint shader) {
257 glGetInterfacePPAPI()->DetachShader(
258 glGetCurrentContextPPAPI(), program, shader);
261 void GL_APIENTRY glDisable(GLenum cap) {
262 glGetInterfacePPAPI()->Disable(glGetCurrentContextPPAPI(), cap);
265 void GL_APIENTRY glDisableVertexAttribArray(GLuint index) {
266 glGetInterfacePPAPI()->DisableVertexAttribArray(glGetCurrentContextPPAPI(),
267 index);
270 void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count) {
271 glGetInterfacePPAPI()->DrawArrays(
272 glGetCurrentContextPPAPI(), mode, first, count);
275 void GL_APIENTRY
276 glDrawElements(GLenum mode, GLsizei count, GLenum type, const void* indices) {
277 glGetInterfacePPAPI()->DrawElements(
278 glGetCurrentContextPPAPI(), mode, count, type, indices);
281 void GL_APIENTRY glEnable(GLenum cap) {
282 glGetInterfacePPAPI()->Enable(glGetCurrentContextPPAPI(), cap);
285 void GL_APIENTRY glEnableVertexAttribArray(GLuint index) {
286 glGetInterfacePPAPI()->EnableVertexAttribArray(glGetCurrentContextPPAPI(),
287 index);
290 void GL_APIENTRY glFinish() {
291 glGetInterfacePPAPI()->Finish(glGetCurrentContextPPAPI());
294 void GL_APIENTRY glFlush() {
295 glGetInterfacePPAPI()->Flush(glGetCurrentContextPPAPI());
298 void GL_APIENTRY glFramebufferRenderbuffer(GLenum target,
299 GLenum attachment,
300 GLenum renderbuffertarget,
301 GLuint renderbuffer) {
302 glGetInterfacePPAPI()->FramebufferRenderbuffer(glGetCurrentContextPPAPI(),
303 target,
304 attachment,
305 renderbuffertarget,
306 renderbuffer);
309 void GL_APIENTRY glFramebufferTexture2D(GLenum target,
310 GLenum attachment,
311 GLenum textarget,
312 GLuint texture,
313 GLint level) {
314 glGetInterfacePPAPI()->FramebufferTexture2D(glGetCurrentContextPPAPI(),
315 target,
316 attachment,
317 textarget,
318 texture,
319 level);
322 void GL_APIENTRY glFrontFace(GLenum mode) {
323 glGetInterfacePPAPI()->FrontFace(glGetCurrentContextPPAPI(), mode);
326 void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers) {
327 glGetInterfacePPAPI()->GenBuffers(glGetCurrentContextPPAPI(), n, buffers);
330 void GL_APIENTRY glGenerateMipmap(GLenum target) {
331 glGetInterfacePPAPI()->GenerateMipmap(glGetCurrentContextPPAPI(), target);
334 void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
335 glGetInterfacePPAPI()->GenFramebuffers(
336 glGetCurrentContextPPAPI(), n, framebuffers);
339 void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
340 glGetInterfacePPAPI()->GenRenderbuffers(
341 glGetCurrentContextPPAPI(), n, renderbuffers);
344 void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures) {
345 glGetInterfacePPAPI()->GenTextures(glGetCurrentContextPPAPI(), n, textures);
348 void GL_APIENTRY glGetActiveAttrib(GLuint program,
349 GLuint index,
350 GLsizei bufsize,
351 GLsizei* length,
352 GLint* size,
353 GLenum* type,
354 char* name) {
355 glGetInterfacePPAPI()->GetActiveAttrib(glGetCurrentContextPPAPI(),
356 program,
357 index,
358 bufsize,
359 length,
360 size,
361 type,
362 name);
365 void GL_APIENTRY glGetActiveUniform(GLuint program,
366 GLuint index,
367 GLsizei bufsize,
368 GLsizei* length,
369 GLint* size,
370 GLenum* type,
371 char* name) {
372 glGetInterfacePPAPI()->GetActiveUniform(glGetCurrentContextPPAPI(),
373 program,
374 index,
375 bufsize,
376 length,
377 size,
378 type,
379 name);
382 void GL_APIENTRY glGetAttachedShaders(GLuint program,
383 GLsizei maxcount,
384 GLsizei* count,
385 GLuint* shaders) {
386 glGetInterfacePPAPI()->GetAttachedShaders(
387 glGetCurrentContextPPAPI(), program, maxcount, count, shaders);
390 GLint GL_APIENTRY glGetAttribLocation(GLuint program, const char* name) {
391 return glGetInterfacePPAPI()->GetAttribLocation(
392 glGetCurrentContextPPAPI(), program, name);
395 void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params) {
396 glGetInterfacePPAPI()->GetBooleanv(glGetCurrentContextPPAPI(), pname, params);
399 void GL_APIENTRY
400 glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
401 glGetInterfacePPAPI()->GetBufferParameteriv(
402 glGetCurrentContextPPAPI(), target, pname, params);
405 GLenum GL_APIENTRY glGetError() {
406 return glGetInterfacePPAPI()->GetError(glGetCurrentContextPPAPI());
409 void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params) {
410 glGetInterfacePPAPI()->GetFloatv(glGetCurrentContextPPAPI(), pname, params);
413 void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target,
414 GLenum attachment,
415 GLenum pname,
416 GLint* params) {
417 glGetInterfacePPAPI()->GetFramebufferAttachmentParameteriv(
418 glGetCurrentContextPPAPI(), target, attachment, pname, params);
421 void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params) {
422 glGetInterfacePPAPI()->GetIntegerv(glGetCurrentContextPPAPI(), pname, params);
425 void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
426 glGetInterfacePPAPI()->GetProgramiv(
427 glGetCurrentContextPPAPI(), program, pname, params);
430 void GL_APIENTRY glGetProgramInfoLog(GLuint program,
431 GLsizei bufsize,
432 GLsizei* length,
433 char* infolog) {
434 glGetInterfacePPAPI()->GetProgramInfoLog(
435 glGetCurrentContextPPAPI(), program, bufsize, length, infolog);
438 void GL_APIENTRY
439 glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) {
440 glGetInterfacePPAPI()->GetRenderbufferParameteriv(
441 glGetCurrentContextPPAPI(), target, pname, params);
444 void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params) {
445 glGetInterfacePPAPI()->GetShaderiv(
446 glGetCurrentContextPPAPI(), shader, pname, params);
449 void GL_APIENTRY glGetShaderInfoLog(GLuint shader,
450 GLsizei bufsize,
451 GLsizei* length,
452 char* infolog) {
453 glGetInterfacePPAPI()->GetShaderInfoLog(
454 glGetCurrentContextPPAPI(), shader, bufsize, length, infolog);
457 void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype,
458 GLenum precisiontype,
459 GLint* range,
460 GLint* precision) {
461 glGetInterfacePPAPI()->GetShaderPrecisionFormat(
462 glGetCurrentContextPPAPI(), shadertype, precisiontype, range, precision);
465 void GL_APIENTRY glGetShaderSource(GLuint shader,
466 GLsizei bufsize,
467 GLsizei* length,
468 char* source) {
469 glGetInterfacePPAPI()->GetShaderSource(
470 glGetCurrentContextPPAPI(), shader, bufsize, length, source);
473 const GLubyte* GL_APIENTRY glGetString(GLenum name) {
474 return glGetInterfacePPAPI()->GetString(glGetCurrentContextPPAPI(), name);
477 void GL_APIENTRY
478 glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
479 glGetInterfacePPAPI()->GetTexParameterfv(
480 glGetCurrentContextPPAPI(), target, pname, params);
483 void GL_APIENTRY
484 glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
485 glGetInterfacePPAPI()->GetTexParameteriv(
486 glGetCurrentContextPPAPI(), target, pname, params);
489 void GL_APIENTRY
490 glGetUniformfv(GLuint program, GLint location, GLfloat* params) {
491 glGetInterfacePPAPI()->GetUniformfv(
492 glGetCurrentContextPPAPI(), program, location, params);
495 void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params) {
496 glGetInterfacePPAPI()->GetUniformiv(
497 glGetCurrentContextPPAPI(), program, location, params);
500 GLint GL_APIENTRY glGetUniformLocation(GLuint program, const char* name) {
501 return glGetInterfacePPAPI()->GetUniformLocation(
502 glGetCurrentContextPPAPI(), program, name);
505 void GL_APIENTRY
506 glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) {
507 glGetInterfacePPAPI()->GetVertexAttribfv(
508 glGetCurrentContextPPAPI(), index, pname, params);
511 void GL_APIENTRY
512 glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) {
513 glGetInterfacePPAPI()->GetVertexAttribiv(
514 glGetCurrentContextPPAPI(), index, pname, params);
517 void GL_APIENTRY
518 glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) {
519 glGetInterfacePPAPI()->GetVertexAttribPointerv(
520 glGetCurrentContextPPAPI(), index, pname, pointer);
523 void GL_APIENTRY glHint(GLenum target, GLenum mode) {
524 glGetInterfacePPAPI()->Hint(glGetCurrentContextPPAPI(), target, mode);
527 GLboolean GL_APIENTRY glIsBuffer(GLuint buffer) {
528 return glGetInterfacePPAPI()->IsBuffer(glGetCurrentContextPPAPI(), buffer);
531 GLboolean GL_APIENTRY glIsEnabled(GLenum cap) {
532 return glGetInterfacePPAPI()->IsEnabled(glGetCurrentContextPPAPI(), cap);
535 GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer) {
536 return glGetInterfacePPAPI()->IsFramebuffer(glGetCurrentContextPPAPI(),
537 framebuffer);
540 GLboolean GL_APIENTRY glIsProgram(GLuint program) {
541 return glGetInterfacePPAPI()->IsProgram(glGetCurrentContextPPAPI(), program);
544 GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer) {
545 return glGetInterfacePPAPI()->IsRenderbuffer(glGetCurrentContextPPAPI(),
546 renderbuffer);
549 GLboolean GL_APIENTRY glIsShader(GLuint shader) {
550 return glGetInterfacePPAPI()->IsShader(glGetCurrentContextPPAPI(), shader);
553 GLboolean GL_APIENTRY glIsTexture(GLuint texture) {
554 return glGetInterfacePPAPI()->IsTexture(glGetCurrentContextPPAPI(), texture);
557 void GL_APIENTRY glLineWidth(GLfloat width) {
558 glGetInterfacePPAPI()->LineWidth(glGetCurrentContextPPAPI(), width);
561 void GL_APIENTRY glLinkProgram(GLuint program) {
562 glGetInterfacePPAPI()->LinkProgram(glGetCurrentContextPPAPI(), program);
565 void GL_APIENTRY glPixelStorei(GLenum pname, GLint param) {
566 glGetInterfacePPAPI()->PixelStorei(glGetCurrentContextPPAPI(), pname, param);
569 void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units) {
570 glGetInterfacePPAPI()->PolygonOffset(
571 glGetCurrentContextPPAPI(), factor, units);
574 void GL_APIENTRY glReadPixels(GLint x,
575 GLint y,
576 GLsizei width,
577 GLsizei height,
578 GLenum format,
579 GLenum type,
580 void* pixels) {
581 glGetInterfacePPAPI()->ReadPixels(
582 glGetCurrentContextPPAPI(), x, y, width, height, format, type, pixels);
585 void GL_APIENTRY glReleaseShaderCompiler() {
586 glGetInterfacePPAPI()->ReleaseShaderCompiler(glGetCurrentContextPPAPI());
589 void GL_APIENTRY glRenderbufferStorage(GLenum target,
590 GLenum internalformat,
591 GLsizei width,
592 GLsizei height) {
593 glGetInterfacePPAPI()->RenderbufferStorage(
594 glGetCurrentContextPPAPI(), target, internalformat, width, height);
597 void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert) {
598 glGetInterfacePPAPI()->SampleCoverage(
599 glGetCurrentContextPPAPI(), value, invert);
602 void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
603 glGetInterfacePPAPI()->Scissor(
604 glGetCurrentContextPPAPI(), x, y, width, height);
607 void GL_APIENTRY glShaderBinary(GLsizei n,
608 const GLuint* shaders,
609 GLenum binaryformat,
610 const void* binary,
611 GLsizei length) {
612 glGetInterfacePPAPI()->ShaderBinary(
613 glGetCurrentContextPPAPI(), n, shaders, binaryformat, binary, length);
616 void GL_APIENTRY glShaderSource(GLuint shader,
617 GLsizei count,
618 const char** str,
619 const GLint* length) {
620 glGetInterfacePPAPI()->ShaderSource(
621 glGetCurrentContextPPAPI(), shader, count, str, length);
624 void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask) {
625 glGetInterfacePPAPI()->StencilFunc(
626 glGetCurrentContextPPAPI(), func, ref, mask);
629 void GL_APIENTRY
630 glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) {
631 glGetInterfacePPAPI()->StencilFuncSeparate(
632 glGetCurrentContextPPAPI(), face, func, ref, mask);
635 void GL_APIENTRY glStencilMask(GLuint mask) {
636 glGetInterfacePPAPI()->StencilMask(glGetCurrentContextPPAPI(), mask);
639 void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask) {
640 glGetInterfacePPAPI()->StencilMaskSeparate(
641 glGetCurrentContextPPAPI(), face, mask);
644 void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
645 glGetInterfacePPAPI()->StencilOp(
646 glGetCurrentContextPPAPI(), fail, zfail, zpass);
649 void GL_APIENTRY
650 glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
651 glGetInterfacePPAPI()->StencilOpSeparate(
652 glGetCurrentContextPPAPI(), face, fail, zfail, zpass);
655 void GL_APIENTRY glTexImage2D(GLenum target,
656 GLint level,
657 GLint internalformat,
658 GLsizei width,
659 GLsizei height,
660 GLint border,
661 GLenum format,
662 GLenum type,
663 const void* pixels) {
664 glGetInterfacePPAPI()->TexImage2D(glGetCurrentContextPPAPI(),
665 target,
666 level,
667 internalformat,
668 width,
669 height,
670 border,
671 format,
672 type,
673 pixels);
676 void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param) {
677 glGetInterfacePPAPI()->TexParameterf(
678 glGetCurrentContextPPAPI(), target, pname, param);
681 void GL_APIENTRY
682 glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) {
683 glGetInterfacePPAPI()->TexParameterfv(
684 glGetCurrentContextPPAPI(), target, pname, params);
687 void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param) {
688 glGetInterfacePPAPI()->TexParameteri(
689 glGetCurrentContextPPAPI(), target, pname, param);
692 void GL_APIENTRY
693 glTexParameteriv(GLenum target, GLenum pname, const GLint* params) {
694 glGetInterfacePPAPI()->TexParameteriv(
695 glGetCurrentContextPPAPI(), target, pname, params);
698 void GL_APIENTRY glTexSubImage2D(GLenum target,
699 GLint level,
700 GLint xoffset,
701 GLint yoffset,
702 GLsizei width,
703 GLsizei height,
704 GLenum format,
705 GLenum type,
706 const void* pixels) {
707 glGetInterfacePPAPI()->TexSubImage2D(glGetCurrentContextPPAPI(),
708 target,
709 level,
710 xoffset,
711 yoffset,
712 width,
713 height,
714 format,
715 type,
716 pixels);
719 void GL_APIENTRY glUniform1f(GLint location, GLfloat x) {
720 glGetInterfacePPAPI()->Uniform1f(glGetCurrentContextPPAPI(), location, x);
723 void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v) {
724 glGetInterfacePPAPI()->Uniform1fv(
725 glGetCurrentContextPPAPI(), location, count, v);
728 void GL_APIENTRY glUniform1i(GLint location, GLint x) {
729 glGetInterfacePPAPI()->Uniform1i(glGetCurrentContextPPAPI(), location, x);
732 void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v) {
733 glGetInterfacePPAPI()->Uniform1iv(
734 glGetCurrentContextPPAPI(), location, count, v);
737 void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y) {
738 glGetInterfacePPAPI()->Uniform2f(glGetCurrentContextPPAPI(), location, x, y);
741 void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v) {
742 glGetInterfacePPAPI()->Uniform2fv(
743 glGetCurrentContextPPAPI(), location, count, v);
746 void GL_APIENTRY glUniform2i(GLint location, GLint x, GLint y) {
747 glGetInterfacePPAPI()->Uniform2i(glGetCurrentContextPPAPI(), location, x, y);
750 void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v) {
751 glGetInterfacePPAPI()->Uniform2iv(
752 glGetCurrentContextPPAPI(), location, count, v);
755 void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
756 glGetInterfacePPAPI()->Uniform3f(
757 glGetCurrentContextPPAPI(), location, x, y, z);
760 void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v) {
761 glGetInterfacePPAPI()->Uniform3fv(
762 glGetCurrentContextPPAPI(), location, count, v);
765 void GL_APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z) {
766 glGetInterfacePPAPI()->Uniform3i(
767 glGetCurrentContextPPAPI(), location, x, y, z);
770 void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v) {
771 glGetInterfacePPAPI()->Uniform3iv(
772 glGetCurrentContextPPAPI(), location, count, v);
775 void GL_APIENTRY
776 glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
777 glGetInterfacePPAPI()->Uniform4f(
778 glGetCurrentContextPPAPI(), location, x, y, z, w);
781 void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v) {
782 glGetInterfacePPAPI()->Uniform4fv(
783 glGetCurrentContextPPAPI(), location, count, v);
786 void GL_APIENTRY
787 glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
788 glGetInterfacePPAPI()->Uniform4i(
789 glGetCurrentContextPPAPI(), location, x, y, z, w);
792 void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v) {
793 glGetInterfacePPAPI()->Uniform4iv(
794 glGetCurrentContextPPAPI(), location, count, v);
797 void GL_APIENTRY glUniformMatrix2fv(GLint location,
798 GLsizei count,
799 GLboolean transpose,
800 const GLfloat* value) {
801 glGetInterfacePPAPI()->UniformMatrix2fv(
802 glGetCurrentContextPPAPI(), location, count, transpose, value);
805 void GL_APIENTRY glUniformMatrix3fv(GLint location,
806 GLsizei count,
807 GLboolean transpose,
808 const GLfloat* value) {
809 glGetInterfacePPAPI()->UniformMatrix3fv(
810 glGetCurrentContextPPAPI(), location, count, transpose, value);
813 void GL_APIENTRY glUniformMatrix4fv(GLint location,
814 GLsizei count,
815 GLboolean transpose,
816 const GLfloat* value) {
817 glGetInterfacePPAPI()->UniformMatrix4fv(
818 glGetCurrentContextPPAPI(), location, count, transpose, value);
821 void GL_APIENTRY glUseProgram(GLuint program) {
822 glGetInterfacePPAPI()->UseProgram(glGetCurrentContextPPAPI(), program);
825 void GL_APIENTRY glValidateProgram(GLuint program) {
826 glGetInterfacePPAPI()->ValidateProgram(glGetCurrentContextPPAPI(), program);
829 void GL_APIENTRY glVertexAttrib1f(GLuint indx, GLfloat x) {
830 glGetInterfacePPAPI()->VertexAttrib1f(glGetCurrentContextPPAPI(), indx, x);
833 void GL_APIENTRY glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
834 glGetInterfacePPAPI()->VertexAttrib1fv(
835 glGetCurrentContextPPAPI(), indx, values);
838 void GL_APIENTRY glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
839 glGetInterfacePPAPI()->VertexAttrib2f(glGetCurrentContextPPAPI(), indx, x, y);
842 void GL_APIENTRY glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
843 glGetInterfacePPAPI()->VertexAttrib2fv(
844 glGetCurrentContextPPAPI(), indx, values);
847 void GL_APIENTRY
848 glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
849 glGetInterfacePPAPI()->VertexAttrib3f(
850 glGetCurrentContextPPAPI(), indx, x, y, z);
853 void GL_APIENTRY glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
854 glGetInterfacePPAPI()->VertexAttrib3fv(
855 glGetCurrentContextPPAPI(), indx, values);
858 void GL_APIENTRY
859 glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
860 glGetInterfacePPAPI()->VertexAttrib4f(
861 glGetCurrentContextPPAPI(), indx, x, y, z, w);
864 void GL_APIENTRY glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
865 glGetInterfacePPAPI()->VertexAttrib4fv(
866 glGetCurrentContextPPAPI(), indx, values);
869 void GL_APIENTRY glVertexAttribPointer(GLuint indx,
870 GLint size,
871 GLenum type,
872 GLboolean normalized,
873 GLsizei stride,
874 const void* ptr) {
875 glGetInterfacePPAPI()->VertexAttribPointer(
876 glGetCurrentContextPPAPI(), indx, size, type, normalized, stride, ptr);
879 void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
880 glGetInterfacePPAPI()->Viewport(
881 glGetCurrentContextPPAPI(), x, y, width, height);
884 void GL_APIENTRY glBlitFramebufferEXT(GLint srcX0,
885 GLint srcY0,
886 GLint srcX1,
887 GLint srcY1,
888 GLint dstX0,
889 GLint dstY0,
890 GLint dstX1,
891 GLint dstY1,
892 GLbitfield mask,
893 GLenum filter) {
894 const struct PPB_OpenGLES2FramebufferBlit* ext =
895 glGetFramebufferBlitInterfacePPAPI();
896 if (ext)
897 ext->BlitFramebufferEXT(glGetCurrentContextPPAPI(),
898 srcX0,
899 srcY0,
900 srcX1,
901 srcY1,
902 dstX0,
903 dstY0,
904 dstX1,
905 dstY1,
906 mask,
907 filter);
910 void GL_APIENTRY glRenderbufferStorageMultisampleEXT(GLenum target,
911 GLsizei samples,
912 GLenum internalformat,
913 GLsizei width,
914 GLsizei height) {
915 const struct PPB_OpenGLES2FramebufferMultisample* ext =
916 glGetFramebufferMultisampleInterfacePPAPI();
917 if (ext)
918 ext->RenderbufferStorageMultisampleEXT(glGetCurrentContextPPAPI(),
919 target,
920 samples,
921 internalformat,
922 width,
923 height);
926 void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint* queries) {
927 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
928 if (ext)
929 ext->GenQueriesEXT(glGetCurrentContextPPAPI(), n, queries);
932 void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint* queries) {
933 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
934 if (ext)
935 ext->DeleteQueriesEXT(glGetCurrentContextPPAPI(), n, queries);
938 GLboolean GL_APIENTRY glIsQueryEXT(GLuint id) {
939 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
940 if (ext)
941 return ext->IsQueryEXT(glGetCurrentContextPPAPI(), id);
942 return 0;
945 void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint id) {
946 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
947 if (ext)
948 ext->BeginQueryEXT(glGetCurrentContextPPAPI(), target, id);
951 void GL_APIENTRY glEndQueryEXT(GLenum target) {
952 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
953 if (ext)
954 ext->EndQueryEXT(glGetCurrentContextPPAPI(), target);
957 void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint* params) {
958 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
959 if (ext)
960 ext->GetQueryivEXT(glGetCurrentContextPPAPI(), target, pname, params);
963 void GL_APIENTRY
964 glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint* params) {
965 const struct PPB_OpenGLES2Query* ext = glGetQueryInterfacePPAPI();
966 if (ext)
967 ext->GetQueryObjectuivEXT(glGetCurrentContextPPAPI(), id, pname, params);
970 void GL_APIENTRY glGenVertexArraysOES(GLsizei n, GLuint* arrays) {
971 const struct PPB_OpenGLES2VertexArrayObject* ext =
972 glGetVertexArrayObjectInterfacePPAPI();
973 if (ext)
974 ext->GenVertexArraysOES(glGetCurrentContextPPAPI(), n, arrays);
977 void GL_APIENTRY glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays) {
978 const struct PPB_OpenGLES2VertexArrayObject* ext =
979 glGetVertexArrayObjectInterfacePPAPI();
980 if (ext)
981 ext->DeleteVertexArraysOES(glGetCurrentContextPPAPI(), n, arrays);
984 GLboolean GL_APIENTRY glIsVertexArrayOES(GLuint array) {
985 const struct PPB_OpenGLES2VertexArrayObject* ext =
986 glGetVertexArrayObjectInterfacePPAPI();
987 if (ext)
988 return ext->IsVertexArrayOES(glGetCurrentContextPPAPI(), array);
989 return 0;
992 void GL_APIENTRY glBindVertexArrayOES(GLuint array) {
993 const struct PPB_OpenGLES2VertexArrayObject* ext =
994 glGetVertexArrayObjectInterfacePPAPI();
995 if (ext)
996 ext->BindVertexArrayOES(glGetCurrentContextPPAPI(), array);
999 GLboolean GL_APIENTRY glEnableFeatureCHROMIUM(const char* feature) {
1000 const struct PPB_OpenGLES2ChromiumEnableFeature* ext =
1001 glGetChromiumEnableFeatureInterfacePPAPI();
1002 if (ext)
1003 return ext->EnableFeatureCHROMIUM(glGetCurrentContextPPAPI(), feature);
1004 return 0;
1007 void* GL_APIENTRY glMapBufferSubDataCHROMIUM(GLuint target,
1008 GLintptr offset,
1009 GLsizeiptr size,
1010 GLenum access) {
1011 const struct PPB_OpenGLES2ChromiumMapSub* ext =
1012 glGetChromiumMapSubInterfacePPAPI();
1013 if (ext)
1014 return ext->MapBufferSubDataCHROMIUM(
1015 glGetCurrentContextPPAPI(), target, offset, size, access);
1016 return 0;
1019 void GL_APIENTRY glUnmapBufferSubDataCHROMIUM(const void* mem) {
1020 const struct PPB_OpenGLES2ChromiumMapSub* ext =
1021 glGetChromiumMapSubInterfacePPAPI();
1022 if (ext)
1023 ext->UnmapBufferSubDataCHROMIUM(glGetCurrentContextPPAPI(), mem);
1026 void* GL_APIENTRY glMapTexSubImage2DCHROMIUM(GLenum target,
1027 GLint level,
1028 GLint xoffset,
1029 GLint yoffset,
1030 GLsizei width,
1031 GLsizei height,
1032 GLenum format,
1033 GLenum type,
1034 GLenum access) {
1035 const struct PPB_OpenGLES2ChromiumMapSub* ext =
1036 glGetChromiumMapSubInterfacePPAPI();
1037 if (ext)
1038 return ext->MapTexSubImage2DCHROMIUM(glGetCurrentContextPPAPI(),
1039 target,
1040 level,
1041 xoffset,
1042 yoffset,
1043 width,
1044 height,
1045 format,
1046 type,
1047 access);
1048 return 0;
1051 void GL_APIENTRY glUnmapTexSubImage2DCHROMIUM(const void* mem) {
1052 const struct PPB_OpenGLES2ChromiumMapSub* ext =
1053 glGetChromiumMapSubInterfacePPAPI();
1054 if (ext)
1055 ext->UnmapTexSubImage2DCHROMIUM(glGetCurrentContextPPAPI(), mem);
1058 void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode,
1059 GLint first,
1060 GLsizei count,
1061 GLsizei primcount) {
1062 const struct PPB_OpenGLES2InstancedArrays* ext =
1063 glGetInstancedArraysInterfacePPAPI();
1064 if (ext)
1065 ext->DrawArraysInstancedANGLE(
1066 glGetCurrentContextPPAPI(), mode, first, count, primcount);
1069 void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode,
1070 GLsizei count,
1071 GLenum type,
1072 const void* indices,
1073 GLsizei primcount) {
1074 const struct PPB_OpenGLES2InstancedArrays* ext =
1075 glGetInstancedArraysInterfacePPAPI();
1076 if (ext)
1077 ext->DrawElementsInstancedANGLE(
1078 glGetCurrentContextPPAPI(), mode, count, type, indices, primcount);
1081 void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) {
1082 const struct PPB_OpenGLES2InstancedArrays* ext =
1083 glGetInstancedArraysInterfacePPAPI();
1084 if (ext)
1085 ext->VertexAttribDivisorANGLE(glGetCurrentContextPPAPI(), index, divisor);
1088 void GL_APIENTRY glDrawBuffersEXT(GLsizei count, const GLenum* bufs) {
1089 const struct PPB_OpenGLES2DrawBuffers_Dev* ext =
1090 glGetDrawBuffersInterfacePPAPI();
1091 if (ext)
1092 ext->DrawBuffersEXT(glGetCurrentContextPPAPI(), count, bufs);