Roll src/third_party/WebKit 18ea028:62591a8 (svn 201988:201989)
[chromium-blink-merge.git] / ppapi / c / ppb_opengles2.h
blob884737772591f61ac636eab0e07e7f6058830819
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 /* From ppb_opengles2.idl modified Fri Sep 5 14:52:51 2014. */
7 #ifndef PPAPI_C_PPB_OPENGLES2_H_
8 #define PPAPI_C_PPB_OPENGLES2_H_
10 #include "ppapi/c/pp_macros.h"
11 #include "ppapi/c/pp_resource.h"
12 #include "ppapi/c/pp_stdint.h"
14 #define PPB_OPENGLES2_INTERFACE_1_0 "PPB_OpenGLES2;1.0"
15 #define PPB_OPENGLES2_INTERFACE PPB_OPENGLES2_INTERFACE_1_0
17 #define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 \
18 "PPB_OpenGLES2InstancedArrays;1.0"
19 #define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE \
20 PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0
22 #define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 \
23 "PPB_OpenGLES2FramebufferBlit;1.0"
24 #define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE \
25 PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0
27 #define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 \
28 "PPB_OpenGLES2FramebufferMultisample;1.0"
29 #define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE \
30 PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0
32 #define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 \
33 "PPB_OpenGLES2ChromiumEnableFeature;1.0"
34 #define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE \
35 PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0
37 #define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 \
38 "PPB_OpenGLES2ChromiumMapSub;1.0"
39 #define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE \
40 PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0
42 #define PPB_OPENGLES2_QUERY_INTERFACE_1_0 "PPB_OpenGLES2Query;1.0"
43 #define PPB_OPENGLES2_QUERY_INTERFACE PPB_OPENGLES2_QUERY_INTERFACE_1_0
45 #define PPB_OPENGLES2_VERTEXARRAYOBJECT_INTERFACE_1_0 \
46 "PPB_OpenGLES2VertexArrayObject;1.0"
47 #define PPB_OPENGLES2_VERTEXARRAYOBJECT_INTERFACE \
48 PPB_OPENGLES2_VERTEXARRAYOBJECT_INTERFACE_1_0
50 /**
51 * @file
52 * This file is auto-generated from
53 * gpu/command_buffer/build_gles2_cmd_buffer.py
54 * It's formatted by clang-format using chromium coding style:
55 * clang-format -i -style=chromium filename
56 * DO NOT EDIT! */
59 #include "ppapi/c/pp_resource.h"
61 #ifndef __gl2_h_
62 typedef void GLvoid;
63 typedef int GLsizei;
64 typedef unsigned short GLushort;
65 typedef short GLshort;
66 typedef unsigned char GLubyte;
67 typedef unsigned int GLenum;
68 typedef int GLint;
69 typedef unsigned char GLboolean;
70 typedef unsigned int GLbitfield;
71 typedef float GLfloat;
72 typedef float GLclampf;
73 typedef signed char GLbyte;
74 typedef unsigned int GLuint;
75 typedef int GLfixed;
76 typedef int GLclampx;
77 #ifdef _WIN64
78 typedef long long int GLintptr;
79 typedef long long int GLsizeiptr;
80 #else
81 typedef long int GLintptr;
82 typedef long int GLsizeiptr;
83 #endif // _WIN64
84 #endif // __gl2_h_
87 /**
88 * @addtogroup Interfaces
89 * @{
91 struct PPB_OpenGLES2_1_0 {
92 void (*ActiveTexture)(PP_Resource context, GLenum texture);
93 void (*AttachShader)(PP_Resource context, GLuint program, GLuint shader);
94 void (*BindAttribLocation)(PP_Resource context,
95 GLuint program,
96 GLuint index,
97 const char* name);
98 void (*BindBuffer)(PP_Resource context, GLenum target, GLuint buffer);
99 void (*BindFramebuffer)(PP_Resource context,
100 GLenum target,
101 GLuint framebuffer);
102 void (*BindRenderbuffer)(PP_Resource context,
103 GLenum target,
104 GLuint renderbuffer);
105 void (*BindTexture)(PP_Resource context, GLenum target, GLuint texture);
106 void (*BlendColor)(PP_Resource context,
107 GLclampf red,
108 GLclampf green,
109 GLclampf blue,
110 GLclampf alpha);
111 void (*BlendEquation)(PP_Resource context, GLenum mode);
112 void (*BlendEquationSeparate)(PP_Resource context,
113 GLenum modeRGB,
114 GLenum modeAlpha);
115 void (*BlendFunc)(PP_Resource context, GLenum sfactor, GLenum dfactor);
116 void (*BlendFuncSeparate)(PP_Resource context,
117 GLenum srcRGB,
118 GLenum dstRGB,
119 GLenum srcAlpha,
120 GLenum dstAlpha);
121 void (*BufferData)(PP_Resource context,
122 GLenum target,
123 GLsizeiptr size,
124 const void* data,
125 GLenum usage);
126 void (*BufferSubData)(PP_Resource context,
127 GLenum target,
128 GLintptr offset,
129 GLsizeiptr size,
130 const void* data);
131 GLenum (*CheckFramebufferStatus)(PP_Resource context, GLenum target);
132 void (*Clear)(PP_Resource context, GLbitfield mask);
133 void (*ClearColor)(PP_Resource context,
134 GLclampf red,
135 GLclampf green,
136 GLclampf blue,
137 GLclampf alpha);
138 void (*ClearDepthf)(PP_Resource context, GLclampf depth);
139 void (*ClearStencil)(PP_Resource context, GLint s);
140 void (*ColorMask)(PP_Resource context,
141 GLboolean red,
142 GLboolean green,
143 GLboolean blue,
144 GLboolean alpha);
145 void (*CompileShader)(PP_Resource context, GLuint shader);
146 void (*CompressedTexImage2D)(PP_Resource context,
147 GLenum target,
148 GLint level,
149 GLenum internalformat,
150 GLsizei width,
151 GLsizei height,
152 GLint border,
153 GLsizei imageSize,
154 const void* data);
155 void (*CompressedTexSubImage2D)(PP_Resource context,
156 GLenum target,
157 GLint level,
158 GLint xoffset,
159 GLint yoffset,
160 GLsizei width,
161 GLsizei height,
162 GLenum format,
163 GLsizei imageSize,
164 const void* data);
165 void (*CopyTexImage2D)(PP_Resource context,
166 GLenum target,
167 GLint level,
168 GLenum internalformat,
169 GLint x,
170 GLint y,
171 GLsizei width,
172 GLsizei height,
173 GLint border);
174 void (*CopyTexSubImage2D)(PP_Resource context,
175 GLenum target,
176 GLint level,
177 GLint xoffset,
178 GLint yoffset,
179 GLint x,
180 GLint y,
181 GLsizei width,
182 GLsizei height);
183 GLuint (*CreateProgram)(PP_Resource context);
184 GLuint (*CreateShader)(PP_Resource context, GLenum type);
185 void (*CullFace)(PP_Resource context, GLenum mode);
186 void (*DeleteBuffers)(PP_Resource context, GLsizei n, const GLuint* buffers);
187 void (*DeleteFramebuffers)(PP_Resource context,
188 GLsizei n,
189 const GLuint* framebuffers);
190 void (*DeleteProgram)(PP_Resource context, GLuint program);
191 void (*DeleteRenderbuffers)(PP_Resource context,
192 GLsizei n,
193 const GLuint* renderbuffers);
194 void (*DeleteShader)(PP_Resource context, GLuint shader);
195 void (*DeleteTextures)(PP_Resource context,
196 GLsizei n,
197 const GLuint* textures);
198 void (*DepthFunc)(PP_Resource context, GLenum func);
199 void (*DepthMask)(PP_Resource context, GLboolean flag);
200 void (*DepthRangef)(PP_Resource context, GLclampf zNear, GLclampf zFar);
201 void (*DetachShader)(PP_Resource context, GLuint program, GLuint shader);
202 void (*Disable)(PP_Resource context, GLenum cap);
203 void (*DisableVertexAttribArray)(PP_Resource context, GLuint index);
204 void (*DrawArrays)(PP_Resource context,
205 GLenum mode,
206 GLint first,
207 GLsizei count);
208 void (*DrawElements)(PP_Resource context,
209 GLenum mode,
210 GLsizei count,
211 GLenum type,
212 const void* indices);
213 void (*Enable)(PP_Resource context, GLenum cap);
214 void (*EnableVertexAttribArray)(PP_Resource context, GLuint index);
215 void (*Finish)(PP_Resource context);
216 void (*Flush)(PP_Resource context);
217 void (*FramebufferRenderbuffer)(PP_Resource context,
218 GLenum target,
219 GLenum attachment,
220 GLenum renderbuffertarget,
221 GLuint renderbuffer);
222 void (*FramebufferTexture2D)(PP_Resource context,
223 GLenum target,
224 GLenum attachment,
225 GLenum textarget,
226 GLuint texture,
227 GLint level);
228 void (*FrontFace)(PP_Resource context, GLenum mode);
229 void (*GenBuffers)(PP_Resource context, GLsizei n, GLuint* buffers);
230 void (*GenerateMipmap)(PP_Resource context, GLenum target);
231 void (*GenFramebuffers)(PP_Resource context, GLsizei n, GLuint* framebuffers);
232 void (*GenRenderbuffers)(PP_Resource context,
233 GLsizei n,
234 GLuint* renderbuffers);
235 void (*GenTextures)(PP_Resource context, GLsizei n, GLuint* textures);
236 void (*GetActiveAttrib)(PP_Resource context,
237 GLuint program,
238 GLuint index,
239 GLsizei bufsize,
240 GLsizei* length,
241 GLint* size,
242 GLenum* type,
243 char* name);
244 void (*GetActiveUniform)(PP_Resource context,
245 GLuint program,
246 GLuint index,
247 GLsizei bufsize,
248 GLsizei* length,
249 GLint* size,
250 GLenum* type,
251 char* name);
252 void (*GetAttachedShaders)(PP_Resource context,
253 GLuint program,
254 GLsizei maxcount,
255 GLsizei* count,
256 GLuint* shaders);
257 GLint (*GetAttribLocation)(PP_Resource context,
258 GLuint program,
259 const char* name);
260 void (*GetBooleanv)(PP_Resource context, GLenum pname, GLboolean* params);
261 void (*GetBufferParameteriv)(PP_Resource context,
262 GLenum target,
263 GLenum pname,
264 GLint* params);
265 GLenum (*GetError)(PP_Resource context);
266 void (*GetFloatv)(PP_Resource context, GLenum pname, GLfloat* params);
267 void (*GetFramebufferAttachmentParameteriv)(PP_Resource context,
268 GLenum target,
269 GLenum attachment,
270 GLenum pname,
271 GLint* params);
272 void (*GetIntegerv)(PP_Resource context, GLenum pname, GLint* params);
273 void (*GetProgramiv)(PP_Resource context,
274 GLuint program,
275 GLenum pname,
276 GLint* params);
277 void (*GetProgramInfoLog)(PP_Resource context,
278 GLuint program,
279 GLsizei bufsize,
280 GLsizei* length,
281 char* infolog);
282 void (*GetRenderbufferParameteriv)(PP_Resource context,
283 GLenum target,
284 GLenum pname,
285 GLint* params);
286 void (*GetShaderiv)(PP_Resource context,
287 GLuint shader,
288 GLenum pname,
289 GLint* params);
290 void (*GetShaderInfoLog)(PP_Resource context,
291 GLuint shader,
292 GLsizei bufsize,
293 GLsizei* length,
294 char* infolog);
295 void (*GetShaderPrecisionFormat)(PP_Resource context,
296 GLenum shadertype,
297 GLenum precisiontype,
298 GLint* range,
299 GLint* precision);
300 void (*GetShaderSource)(PP_Resource context,
301 GLuint shader,
302 GLsizei bufsize,
303 GLsizei* length,
304 char* source);
305 const GLubyte* (*GetString)(PP_Resource context, GLenum name);
306 void (*GetTexParameterfv)(PP_Resource context,
307 GLenum target,
308 GLenum pname,
309 GLfloat* params);
310 void (*GetTexParameteriv)(PP_Resource context,
311 GLenum target,
312 GLenum pname,
313 GLint* params);
314 void (*GetUniformfv)(PP_Resource context,
315 GLuint program,
316 GLint location,
317 GLfloat* params);
318 void (*GetUniformiv)(PP_Resource context,
319 GLuint program,
320 GLint location,
321 GLint* params);
322 GLint (*GetUniformLocation)(PP_Resource context,
323 GLuint program,
324 const char* name);
325 void (*GetVertexAttribfv)(PP_Resource context,
326 GLuint index,
327 GLenum pname,
328 GLfloat* params);
329 void (*GetVertexAttribiv)(PP_Resource context,
330 GLuint index,
331 GLenum pname,
332 GLint* params);
333 void (*GetVertexAttribPointerv)(PP_Resource context,
334 GLuint index,
335 GLenum pname,
336 void** pointer);
337 void (*Hint)(PP_Resource context, GLenum target, GLenum mode);
338 GLboolean (*IsBuffer)(PP_Resource context, GLuint buffer);
339 GLboolean (*IsEnabled)(PP_Resource context, GLenum cap);
340 GLboolean (*IsFramebuffer)(PP_Resource context, GLuint framebuffer);
341 GLboolean (*IsProgram)(PP_Resource context, GLuint program);
342 GLboolean (*IsRenderbuffer)(PP_Resource context, GLuint renderbuffer);
343 GLboolean (*IsShader)(PP_Resource context, GLuint shader);
344 GLboolean (*IsTexture)(PP_Resource context, GLuint texture);
345 void (*LineWidth)(PP_Resource context, GLfloat width);
346 void (*LinkProgram)(PP_Resource context, GLuint program);
347 void (*PixelStorei)(PP_Resource context, GLenum pname, GLint param);
348 void (*PolygonOffset)(PP_Resource context, GLfloat factor, GLfloat units);
349 void (*ReadPixels)(PP_Resource context,
350 GLint x,
351 GLint y,
352 GLsizei width,
353 GLsizei height,
354 GLenum format,
355 GLenum type,
356 void* pixels);
357 void (*ReleaseShaderCompiler)(PP_Resource context);
358 void (*RenderbufferStorage)(PP_Resource context,
359 GLenum target,
360 GLenum internalformat,
361 GLsizei width,
362 GLsizei height);
363 void (*SampleCoverage)(PP_Resource context, GLclampf value, GLboolean invert);
364 void (*Scissor)(PP_Resource context,
365 GLint x,
366 GLint y,
367 GLsizei width,
368 GLsizei height);
369 void (*ShaderBinary)(PP_Resource context,
370 GLsizei n,
371 const GLuint* shaders,
372 GLenum binaryformat,
373 const void* binary,
374 GLsizei length);
375 void (*ShaderSource)(PP_Resource context,
376 GLuint shader,
377 GLsizei count,
378 const char** str,
379 const GLint* length);
380 void (*StencilFunc)(PP_Resource context, GLenum func, GLint ref, GLuint mask);
381 void (*StencilFuncSeparate)(PP_Resource context,
382 GLenum face,
383 GLenum func,
384 GLint ref,
385 GLuint mask);
386 void (*StencilMask)(PP_Resource context, GLuint mask);
387 void (*StencilMaskSeparate)(PP_Resource context, GLenum face, GLuint mask);
388 void (*StencilOp)(PP_Resource context,
389 GLenum fail,
390 GLenum zfail,
391 GLenum zpass);
392 void (*StencilOpSeparate)(PP_Resource context,
393 GLenum face,
394 GLenum fail,
395 GLenum zfail,
396 GLenum zpass);
397 void (*TexImage2D)(PP_Resource context,
398 GLenum target,
399 GLint level,
400 GLint internalformat,
401 GLsizei width,
402 GLsizei height,
403 GLint border,
404 GLenum format,
405 GLenum type,
406 const void* pixels);
407 void (*TexParameterf)(PP_Resource context,
408 GLenum target,
409 GLenum pname,
410 GLfloat param);
411 void (*TexParameterfv)(PP_Resource context,
412 GLenum target,
413 GLenum pname,
414 const GLfloat* params);
415 void (*TexParameteri)(PP_Resource context,
416 GLenum target,
417 GLenum pname,
418 GLint param);
419 void (*TexParameteriv)(PP_Resource context,
420 GLenum target,
421 GLenum pname,
422 const GLint* params);
423 void (*TexSubImage2D)(PP_Resource context,
424 GLenum target,
425 GLint level,
426 GLint xoffset,
427 GLint yoffset,
428 GLsizei width,
429 GLsizei height,
430 GLenum format,
431 GLenum type,
432 const void* pixels);
433 void (*Uniform1f)(PP_Resource context, GLint location, GLfloat x);
434 void (*Uniform1fv)(PP_Resource context,
435 GLint location,
436 GLsizei count,
437 const GLfloat* v);
438 void (*Uniform1i)(PP_Resource context, GLint location, GLint x);
439 void (*Uniform1iv)(PP_Resource context,
440 GLint location,
441 GLsizei count,
442 const GLint* v);
443 void (*Uniform2f)(PP_Resource context, GLint location, GLfloat x, GLfloat y);
444 void (*Uniform2fv)(PP_Resource context,
445 GLint location,
446 GLsizei count,
447 const GLfloat* v);
448 void (*Uniform2i)(PP_Resource context, GLint location, GLint x, GLint y);
449 void (*Uniform2iv)(PP_Resource context,
450 GLint location,
451 GLsizei count,
452 const GLint* v);
453 void (*Uniform3f)(PP_Resource context,
454 GLint location,
455 GLfloat x,
456 GLfloat y,
457 GLfloat z);
458 void (*Uniform3fv)(PP_Resource context,
459 GLint location,
460 GLsizei count,
461 const GLfloat* v);
462 void (*Uniform3i)(PP_Resource context,
463 GLint location,
464 GLint x,
465 GLint y,
466 GLint z);
467 void (*Uniform3iv)(PP_Resource context,
468 GLint location,
469 GLsizei count,
470 const GLint* v);
471 void (*Uniform4f)(PP_Resource context,
472 GLint location,
473 GLfloat x,
474 GLfloat y,
475 GLfloat z,
476 GLfloat w);
477 void (*Uniform4fv)(PP_Resource context,
478 GLint location,
479 GLsizei count,
480 const GLfloat* v);
481 void (*Uniform4i)(PP_Resource context,
482 GLint location,
483 GLint x,
484 GLint y,
485 GLint z,
486 GLint w);
487 void (*Uniform4iv)(PP_Resource context,
488 GLint location,
489 GLsizei count,
490 const GLint* v);
491 void (*UniformMatrix2fv)(PP_Resource context,
492 GLint location,
493 GLsizei count,
494 GLboolean transpose,
495 const GLfloat* value);
496 void (*UniformMatrix3fv)(PP_Resource context,
497 GLint location,
498 GLsizei count,
499 GLboolean transpose,
500 const GLfloat* value);
501 void (*UniformMatrix4fv)(PP_Resource context,
502 GLint location,
503 GLsizei count,
504 GLboolean transpose,
505 const GLfloat* value);
506 void (*UseProgram)(PP_Resource context, GLuint program);
507 void (*ValidateProgram)(PP_Resource context, GLuint program);
508 void (*VertexAttrib1f)(PP_Resource context, GLuint indx, GLfloat x);
509 void (*VertexAttrib1fv)(PP_Resource context,
510 GLuint indx,
511 const GLfloat* values);
512 void (*VertexAttrib2f)(PP_Resource context,
513 GLuint indx,
514 GLfloat x,
515 GLfloat y);
516 void (*VertexAttrib2fv)(PP_Resource context,
517 GLuint indx,
518 const GLfloat* values);
519 void (*VertexAttrib3f)(PP_Resource context,
520 GLuint indx,
521 GLfloat x,
522 GLfloat y,
523 GLfloat z);
524 void (*VertexAttrib3fv)(PP_Resource context,
525 GLuint indx,
526 const GLfloat* values);
527 void (*VertexAttrib4f)(PP_Resource context,
528 GLuint indx,
529 GLfloat x,
530 GLfloat y,
531 GLfloat z,
532 GLfloat w);
533 void (*VertexAttrib4fv)(PP_Resource context,
534 GLuint indx,
535 const GLfloat* values);
536 void (*VertexAttribPointer)(PP_Resource context,
537 GLuint indx,
538 GLint size,
539 GLenum type,
540 GLboolean normalized,
541 GLsizei stride,
542 const void* ptr);
543 void (*Viewport)(PP_Resource context,
544 GLint x,
545 GLint y,
546 GLsizei width,
547 GLsizei height);
550 struct PPB_OpenGLES2 {
551 void (*ActiveTexture)(PP_Resource context, GLenum texture);
552 void (*AttachShader)(PP_Resource context, GLuint program, GLuint shader);
553 void (*BindAttribLocation)(PP_Resource context,
554 GLuint program,
555 GLuint index,
556 const char* name);
557 void (*BindBuffer)(PP_Resource context, GLenum target, GLuint buffer);
558 void (*BindFramebuffer)(PP_Resource context,
559 GLenum target,
560 GLuint framebuffer);
561 void (*BindRenderbuffer)(PP_Resource context,
562 GLenum target,
563 GLuint renderbuffer);
564 void (*BindTexture)(PP_Resource context, GLenum target, GLuint texture);
565 void (*BlendColor)(PP_Resource context,
566 GLclampf red,
567 GLclampf green,
568 GLclampf blue,
569 GLclampf alpha);
570 void (*BlendEquation)(PP_Resource context, GLenum mode);
571 void (*BlendEquationSeparate)(PP_Resource context,
572 GLenum modeRGB,
573 GLenum modeAlpha);
574 void (*BlendFunc)(PP_Resource context, GLenum sfactor, GLenum dfactor);
575 void (*BlendFuncSeparate)(PP_Resource context,
576 GLenum srcRGB,
577 GLenum dstRGB,
578 GLenum srcAlpha,
579 GLenum dstAlpha);
580 void (*BufferData)(PP_Resource context,
581 GLenum target,
582 GLsizeiptr size,
583 const void* data,
584 GLenum usage);
585 void (*BufferSubData)(PP_Resource context,
586 GLenum target,
587 GLintptr offset,
588 GLsizeiptr size,
589 const void* data);
590 GLenum (*CheckFramebufferStatus)(PP_Resource context, GLenum target);
591 void (*Clear)(PP_Resource context, GLbitfield mask);
592 void (*ClearColor)(PP_Resource context,
593 GLclampf red,
594 GLclampf green,
595 GLclampf blue,
596 GLclampf alpha);
597 void (*ClearDepthf)(PP_Resource context, GLclampf depth);
598 void (*ClearStencil)(PP_Resource context, GLint s);
599 void (*ColorMask)(PP_Resource context,
600 GLboolean red,
601 GLboolean green,
602 GLboolean blue,
603 GLboolean alpha);
604 void (*CompileShader)(PP_Resource context, GLuint shader);
605 void (*CompressedTexImage2D)(PP_Resource context,
606 GLenum target,
607 GLint level,
608 GLenum internalformat,
609 GLsizei width,
610 GLsizei height,
611 GLint border,
612 GLsizei imageSize,
613 const void* data);
614 void (*CompressedTexSubImage2D)(PP_Resource context,
615 GLenum target,
616 GLint level,
617 GLint xoffset,
618 GLint yoffset,
619 GLsizei width,
620 GLsizei height,
621 GLenum format,
622 GLsizei imageSize,
623 const void* data);
624 void (*CopyTexImage2D)(PP_Resource context,
625 GLenum target,
626 GLint level,
627 GLenum internalformat,
628 GLint x,
629 GLint y,
630 GLsizei width,
631 GLsizei height,
632 GLint border);
633 void (*CopyTexSubImage2D)(PP_Resource context,
634 GLenum target,
635 GLint level,
636 GLint xoffset,
637 GLint yoffset,
638 GLint x,
639 GLint y,
640 GLsizei width,
641 GLsizei height);
642 GLuint (*CreateProgram)(PP_Resource context);
643 GLuint (*CreateShader)(PP_Resource context, GLenum type);
644 void (*CullFace)(PP_Resource context, GLenum mode);
645 void (*DeleteBuffers)(PP_Resource context, GLsizei n, const GLuint* buffers);
646 void (*DeleteFramebuffers)(PP_Resource context,
647 GLsizei n,
648 const GLuint* framebuffers);
649 void (*DeleteProgram)(PP_Resource context, GLuint program);
650 void (*DeleteRenderbuffers)(PP_Resource context,
651 GLsizei n,
652 const GLuint* renderbuffers);
653 void (*DeleteShader)(PP_Resource context, GLuint shader);
654 void (*DeleteTextures)(PP_Resource context,
655 GLsizei n,
656 const GLuint* textures);
657 void (*DepthFunc)(PP_Resource context, GLenum func);
658 void (*DepthMask)(PP_Resource context, GLboolean flag);
659 void (*DepthRangef)(PP_Resource context, GLclampf zNear, GLclampf zFar);
660 void (*DetachShader)(PP_Resource context, GLuint program, GLuint shader);
661 void (*Disable)(PP_Resource context, GLenum cap);
662 void (*DisableVertexAttribArray)(PP_Resource context, GLuint index);
663 void (*DrawArrays)(PP_Resource context,
664 GLenum mode,
665 GLint first,
666 GLsizei count);
667 void (*DrawElements)(PP_Resource context,
668 GLenum mode,
669 GLsizei count,
670 GLenum type,
671 const void* indices);
672 void (*Enable)(PP_Resource context, GLenum cap);
673 void (*EnableVertexAttribArray)(PP_Resource context, GLuint index);
674 void (*Finish)(PP_Resource context);
675 void (*Flush)(PP_Resource context);
676 void (*FramebufferRenderbuffer)(PP_Resource context,
677 GLenum target,
678 GLenum attachment,
679 GLenum renderbuffertarget,
680 GLuint renderbuffer);
681 void (*FramebufferTexture2D)(PP_Resource context,
682 GLenum target,
683 GLenum attachment,
684 GLenum textarget,
685 GLuint texture,
686 GLint level);
687 void (*FrontFace)(PP_Resource context, GLenum mode);
688 void (*GenBuffers)(PP_Resource context, GLsizei n, GLuint* buffers);
689 void (*GenerateMipmap)(PP_Resource context, GLenum target);
690 void (*GenFramebuffers)(PP_Resource context, GLsizei n, GLuint* framebuffers);
691 void (*GenRenderbuffers)(PP_Resource context,
692 GLsizei n,
693 GLuint* renderbuffers);
694 void (*GenTextures)(PP_Resource context, GLsizei n, GLuint* textures);
695 void (*GetActiveAttrib)(PP_Resource context,
696 GLuint program,
697 GLuint index,
698 GLsizei bufsize,
699 GLsizei* length,
700 GLint* size,
701 GLenum* type,
702 char* name);
703 void (*GetActiveUniform)(PP_Resource context,
704 GLuint program,
705 GLuint index,
706 GLsizei bufsize,
707 GLsizei* length,
708 GLint* size,
709 GLenum* type,
710 char* name);
711 void (*GetAttachedShaders)(PP_Resource context,
712 GLuint program,
713 GLsizei maxcount,
714 GLsizei* count,
715 GLuint* shaders);
716 GLint (*GetAttribLocation)(PP_Resource context,
717 GLuint program,
718 const char* name);
719 void (*GetBooleanv)(PP_Resource context, GLenum pname, GLboolean* params);
720 void (*GetBufferParameteriv)(PP_Resource context,
721 GLenum target,
722 GLenum pname,
723 GLint* params);
724 GLenum (*GetError)(PP_Resource context);
725 void (*GetFloatv)(PP_Resource context, GLenum pname, GLfloat* params);
726 void (*GetFramebufferAttachmentParameteriv)(PP_Resource context,
727 GLenum target,
728 GLenum attachment,
729 GLenum pname,
730 GLint* params);
731 void (*GetIntegerv)(PP_Resource context, GLenum pname, GLint* params);
732 void (*GetProgramiv)(PP_Resource context,
733 GLuint program,
734 GLenum pname,
735 GLint* params);
736 void (*GetProgramInfoLog)(PP_Resource context,
737 GLuint program,
738 GLsizei bufsize,
739 GLsizei* length,
740 char* infolog);
741 void (*GetRenderbufferParameteriv)(PP_Resource context,
742 GLenum target,
743 GLenum pname,
744 GLint* params);
745 void (*GetShaderiv)(PP_Resource context,
746 GLuint shader,
747 GLenum pname,
748 GLint* params);
749 void (*GetShaderInfoLog)(PP_Resource context,
750 GLuint shader,
751 GLsizei bufsize,
752 GLsizei* length,
753 char* infolog);
754 void (*GetShaderPrecisionFormat)(PP_Resource context,
755 GLenum shadertype,
756 GLenum precisiontype,
757 GLint* range,
758 GLint* precision);
759 void (*GetShaderSource)(PP_Resource context,
760 GLuint shader,
761 GLsizei bufsize,
762 GLsizei* length,
763 char* source);
764 const GLubyte* (*GetString)(PP_Resource context, GLenum name);
765 void (*GetTexParameterfv)(PP_Resource context,
766 GLenum target,
767 GLenum pname,
768 GLfloat* params);
769 void (*GetTexParameteriv)(PP_Resource context,
770 GLenum target,
771 GLenum pname,
772 GLint* params);
773 void (*GetUniformfv)(PP_Resource context,
774 GLuint program,
775 GLint location,
776 GLfloat* params);
777 void (*GetUniformiv)(PP_Resource context,
778 GLuint program,
779 GLint location,
780 GLint* params);
781 GLint (*GetUniformLocation)(PP_Resource context,
782 GLuint program,
783 const char* name);
784 void (*GetVertexAttribfv)(PP_Resource context,
785 GLuint index,
786 GLenum pname,
787 GLfloat* params);
788 void (*GetVertexAttribiv)(PP_Resource context,
789 GLuint index,
790 GLenum pname,
791 GLint* params);
792 void (*GetVertexAttribPointerv)(PP_Resource context,
793 GLuint index,
794 GLenum pname,
795 void** pointer);
796 void (*Hint)(PP_Resource context, GLenum target, GLenum mode);
797 GLboolean (*IsBuffer)(PP_Resource context, GLuint buffer);
798 GLboolean (*IsEnabled)(PP_Resource context, GLenum cap);
799 GLboolean (*IsFramebuffer)(PP_Resource context, GLuint framebuffer);
800 GLboolean (*IsProgram)(PP_Resource context, GLuint program);
801 GLboolean (*IsRenderbuffer)(PP_Resource context, GLuint renderbuffer);
802 GLboolean (*IsShader)(PP_Resource context, GLuint shader);
803 GLboolean (*IsTexture)(PP_Resource context, GLuint texture);
804 void (*LineWidth)(PP_Resource context, GLfloat width);
805 void (*LinkProgram)(PP_Resource context, GLuint program);
806 void (*PixelStorei)(PP_Resource context, GLenum pname, GLint param);
807 void (*PolygonOffset)(PP_Resource context, GLfloat factor, GLfloat units);
808 void (*ReadPixels)(PP_Resource context,
809 GLint x,
810 GLint y,
811 GLsizei width,
812 GLsizei height,
813 GLenum format,
814 GLenum type,
815 void* pixels);
816 void (*ReleaseShaderCompiler)(PP_Resource context);
817 void (*RenderbufferStorage)(PP_Resource context,
818 GLenum target,
819 GLenum internalformat,
820 GLsizei width,
821 GLsizei height);
822 void (*SampleCoverage)(PP_Resource context, GLclampf value, GLboolean invert);
823 void (*Scissor)(PP_Resource context,
824 GLint x,
825 GLint y,
826 GLsizei width,
827 GLsizei height);
828 void (*ShaderBinary)(PP_Resource context,
829 GLsizei n,
830 const GLuint* shaders,
831 GLenum binaryformat,
832 const void* binary,
833 GLsizei length);
834 void (*ShaderSource)(PP_Resource context,
835 GLuint shader,
836 GLsizei count,
837 const char** str,
838 const GLint* length);
839 void (*StencilFunc)(PP_Resource context, GLenum func, GLint ref, GLuint mask);
840 void (*StencilFuncSeparate)(PP_Resource context,
841 GLenum face,
842 GLenum func,
843 GLint ref,
844 GLuint mask);
845 void (*StencilMask)(PP_Resource context, GLuint mask);
846 void (*StencilMaskSeparate)(PP_Resource context, GLenum face, GLuint mask);
847 void (*StencilOp)(PP_Resource context,
848 GLenum fail,
849 GLenum zfail,
850 GLenum zpass);
851 void (*StencilOpSeparate)(PP_Resource context,
852 GLenum face,
853 GLenum fail,
854 GLenum zfail,
855 GLenum zpass);
856 void (*TexImage2D)(PP_Resource context,
857 GLenum target,
858 GLint level,
859 GLint internalformat,
860 GLsizei width,
861 GLsizei height,
862 GLint border,
863 GLenum format,
864 GLenum type,
865 const void* pixels);
866 void (*TexParameterf)(PP_Resource context,
867 GLenum target,
868 GLenum pname,
869 GLfloat param);
870 void (*TexParameterfv)(PP_Resource context,
871 GLenum target,
872 GLenum pname,
873 const GLfloat* params);
874 void (*TexParameteri)(PP_Resource context,
875 GLenum target,
876 GLenum pname,
877 GLint param);
878 void (*TexParameteriv)(PP_Resource context,
879 GLenum target,
880 GLenum pname,
881 const GLint* params);
882 void (*TexSubImage2D)(PP_Resource context,
883 GLenum target,
884 GLint level,
885 GLint xoffset,
886 GLint yoffset,
887 GLsizei width,
888 GLsizei height,
889 GLenum format,
890 GLenum type,
891 const void* pixels);
892 void (*Uniform1f)(PP_Resource context, GLint location, GLfloat x);
893 void (*Uniform1fv)(PP_Resource context,
894 GLint location,
895 GLsizei count,
896 const GLfloat* v);
897 void (*Uniform1i)(PP_Resource context, GLint location, GLint x);
898 void (*Uniform1iv)(PP_Resource context,
899 GLint location,
900 GLsizei count,
901 const GLint* v);
902 void (*Uniform2f)(PP_Resource context, GLint location, GLfloat x, GLfloat y);
903 void (*Uniform2fv)(PP_Resource context,
904 GLint location,
905 GLsizei count,
906 const GLfloat* v);
907 void (*Uniform2i)(PP_Resource context, GLint location, GLint x, GLint y);
908 void (*Uniform2iv)(PP_Resource context,
909 GLint location,
910 GLsizei count,
911 const GLint* v);
912 void (*Uniform3f)(PP_Resource context,
913 GLint location,
914 GLfloat x,
915 GLfloat y,
916 GLfloat z);
917 void (*Uniform3fv)(PP_Resource context,
918 GLint location,
919 GLsizei count,
920 const GLfloat* v);
921 void (*Uniform3i)(PP_Resource context,
922 GLint location,
923 GLint x,
924 GLint y,
925 GLint z);
926 void (*Uniform3iv)(PP_Resource context,
927 GLint location,
928 GLsizei count,
929 const GLint* v);
930 void (*Uniform4f)(PP_Resource context,
931 GLint location,
932 GLfloat x,
933 GLfloat y,
934 GLfloat z,
935 GLfloat w);
936 void (*Uniform4fv)(PP_Resource context,
937 GLint location,
938 GLsizei count,
939 const GLfloat* v);
940 void (*Uniform4i)(PP_Resource context,
941 GLint location,
942 GLint x,
943 GLint y,
944 GLint z,
945 GLint w);
946 void (*Uniform4iv)(PP_Resource context,
947 GLint location,
948 GLsizei count,
949 const GLint* v);
950 void (*UniformMatrix2fv)(PP_Resource context,
951 GLint location,
952 GLsizei count,
953 GLboolean transpose,
954 const GLfloat* value);
955 void (*UniformMatrix3fv)(PP_Resource context,
956 GLint location,
957 GLsizei count,
958 GLboolean transpose,
959 const GLfloat* value);
960 void (*UniformMatrix4fv)(PP_Resource context,
961 GLint location,
962 GLsizei count,
963 GLboolean transpose,
964 const GLfloat* value);
965 void (*UseProgram)(PP_Resource context, GLuint program);
966 void (*ValidateProgram)(PP_Resource context, GLuint program);
967 void (*VertexAttrib1f)(PP_Resource context, GLuint indx, GLfloat x);
968 void (*VertexAttrib1fv)(PP_Resource context,
969 GLuint indx,
970 const GLfloat* values);
971 void (*VertexAttrib2f)(PP_Resource context,
972 GLuint indx,
973 GLfloat x,
974 GLfloat y);
975 void (*VertexAttrib2fv)(PP_Resource context,
976 GLuint indx,
977 const GLfloat* values);
978 void (*VertexAttrib3f)(PP_Resource context,
979 GLuint indx,
980 GLfloat x,
981 GLfloat y,
982 GLfloat z);
983 void (*VertexAttrib3fv)(PP_Resource context,
984 GLuint indx,
985 const GLfloat* values);
986 void (*VertexAttrib4f)(PP_Resource context,
987 GLuint indx,
988 GLfloat x,
989 GLfloat y,
990 GLfloat z,
991 GLfloat w);
992 void (*VertexAttrib4fv)(PP_Resource context,
993 GLuint indx,
994 const GLfloat* values);
995 void (*VertexAttribPointer)(PP_Resource context,
996 GLuint indx,
997 GLint size,
998 GLenum type,
999 GLboolean normalized,
1000 GLsizei stride,
1001 const void* ptr);
1002 void (*Viewport)(PP_Resource context,
1003 GLint x,
1004 GLint y,
1005 GLsizei width,
1006 GLsizei height);
1009 struct PPB_OpenGLES2InstancedArrays_1_0 {
1010 void (*DrawArraysInstancedANGLE)(PP_Resource context,
1011 GLenum mode,
1012 GLint first,
1013 GLsizei count,
1014 GLsizei primcount);
1015 void (*DrawElementsInstancedANGLE)(PP_Resource context,
1016 GLenum mode,
1017 GLsizei count,
1018 GLenum type,
1019 const void* indices,
1020 GLsizei primcount);
1021 void (*VertexAttribDivisorANGLE)(PP_Resource context,
1022 GLuint index,
1023 GLuint divisor);
1026 struct PPB_OpenGLES2InstancedArrays {
1027 void (*DrawArraysInstancedANGLE)(PP_Resource context,
1028 GLenum mode,
1029 GLint first,
1030 GLsizei count,
1031 GLsizei primcount);
1032 void (*DrawElementsInstancedANGLE)(PP_Resource context,
1033 GLenum mode,
1034 GLsizei count,
1035 GLenum type,
1036 const void* indices,
1037 GLsizei primcount);
1038 void (*VertexAttribDivisorANGLE)(PP_Resource context,
1039 GLuint index,
1040 GLuint divisor);
1043 struct PPB_OpenGLES2FramebufferBlit_1_0 {
1044 void (*BlitFramebufferEXT)(PP_Resource context,
1045 GLint srcX0,
1046 GLint srcY0,
1047 GLint srcX1,
1048 GLint srcY1,
1049 GLint dstX0,
1050 GLint dstY0,
1051 GLint dstX1,
1052 GLint dstY1,
1053 GLbitfield mask,
1054 GLenum filter);
1057 struct PPB_OpenGLES2FramebufferBlit {
1058 void (*BlitFramebufferEXT)(PP_Resource context,
1059 GLint srcX0,
1060 GLint srcY0,
1061 GLint srcX1,
1062 GLint srcY1,
1063 GLint dstX0,
1064 GLint dstY0,
1065 GLint dstX1,
1066 GLint dstY1,
1067 GLbitfield mask,
1068 GLenum filter);
1071 struct PPB_OpenGLES2FramebufferMultisample_1_0 {
1072 void (*RenderbufferStorageMultisampleEXT)(PP_Resource context,
1073 GLenum target,
1074 GLsizei samples,
1075 GLenum internalformat,
1076 GLsizei width,
1077 GLsizei height);
1080 struct PPB_OpenGLES2FramebufferMultisample {
1081 void (*RenderbufferStorageMultisampleEXT)(PP_Resource context,
1082 GLenum target,
1083 GLsizei samples,
1084 GLenum internalformat,
1085 GLsizei width,
1086 GLsizei height);
1089 struct PPB_OpenGLES2ChromiumEnableFeature_1_0 {
1090 GLboolean (*EnableFeatureCHROMIUM)(PP_Resource context, const char* feature);
1093 struct PPB_OpenGLES2ChromiumEnableFeature {
1094 GLboolean (*EnableFeatureCHROMIUM)(PP_Resource context, const char* feature);
1097 struct PPB_OpenGLES2ChromiumMapSub_1_0 {
1098 void* (*MapBufferSubDataCHROMIUM)(PP_Resource context,
1099 GLuint target,
1100 GLintptr offset,
1101 GLsizeiptr size,
1102 GLenum access);
1103 void (*UnmapBufferSubDataCHROMIUM)(PP_Resource context, const void* mem);
1104 void* (*MapTexSubImage2DCHROMIUM)(PP_Resource context,
1105 GLenum target,
1106 GLint level,
1107 GLint xoffset,
1108 GLint yoffset,
1109 GLsizei width,
1110 GLsizei height,
1111 GLenum format,
1112 GLenum type,
1113 GLenum access);
1114 void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem);
1117 struct PPB_OpenGLES2ChromiumMapSub {
1118 void* (*MapBufferSubDataCHROMIUM)(PP_Resource context,
1119 GLuint target,
1120 GLintptr offset,
1121 GLsizeiptr size,
1122 GLenum access);
1123 void (*UnmapBufferSubDataCHROMIUM)(PP_Resource context, const void* mem);
1124 void* (*MapTexSubImage2DCHROMIUM)(PP_Resource context,
1125 GLenum target,
1126 GLint level,
1127 GLint xoffset,
1128 GLint yoffset,
1129 GLsizei width,
1130 GLsizei height,
1131 GLenum format,
1132 GLenum type,
1133 GLenum access);
1134 void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem);
1137 struct PPB_OpenGLES2Query_1_0 {
1138 void (*GenQueriesEXT)(PP_Resource context, GLsizei n, GLuint* queries);
1139 void (*DeleteQueriesEXT)(PP_Resource context,
1140 GLsizei n,
1141 const GLuint* queries);
1142 GLboolean (*IsQueryEXT)(PP_Resource context, GLuint id);
1143 void (*BeginQueryEXT)(PP_Resource context, GLenum target, GLuint id);
1144 void (*EndQueryEXT)(PP_Resource context, GLenum target);
1145 void (*GetQueryivEXT)(PP_Resource context,
1146 GLenum target,
1147 GLenum pname,
1148 GLint* params);
1149 void (*GetQueryObjectuivEXT)(PP_Resource context,
1150 GLuint id,
1151 GLenum pname,
1152 GLuint* params);
1155 struct PPB_OpenGLES2Query {
1156 void (*GenQueriesEXT)(PP_Resource context, GLsizei n, GLuint* queries);
1157 void (*DeleteQueriesEXT)(PP_Resource context,
1158 GLsizei n,
1159 const GLuint* queries);
1160 GLboolean (*IsQueryEXT)(PP_Resource context, GLuint id);
1161 void (*BeginQueryEXT)(PP_Resource context, GLenum target, GLuint id);
1162 void (*EndQueryEXT)(PP_Resource context, GLenum target);
1163 void (*GetQueryivEXT)(PP_Resource context,
1164 GLenum target,
1165 GLenum pname,
1166 GLint* params);
1167 void (*GetQueryObjectuivEXT)(PP_Resource context,
1168 GLuint id,
1169 GLenum pname,
1170 GLuint* params);
1173 struct PPB_OpenGLES2VertexArrayObject_1_0 {
1174 void (*GenVertexArraysOES)(PP_Resource context, GLsizei n, GLuint* arrays);
1175 void (*DeleteVertexArraysOES)(PP_Resource context,
1176 GLsizei n,
1177 const GLuint* arrays);
1178 GLboolean (*IsVertexArrayOES)(PP_Resource context, GLuint array);
1179 void (*BindVertexArrayOES)(PP_Resource context, GLuint array);
1182 struct PPB_OpenGLES2VertexArrayObject {
1183 void (*GenVertexArraysOES)(PP_Resource context, GLsizei n, GLuint* arrays);
1184 void (*DeleteVertexArraysOES)(PP_Resource context,
1185 GLsizei n,
1186 const GLuint* arrays);
1187 GLboolean (*IsVertexArrayOES)(PP_Resource context, GLuint array);
1188 void (*BindVertexArrayOES)(PP_Resource context, GLuint array);
1191 * @}
1194 #endif /* PPAPI_C_PPB_OPENGLES2_H_ */