Fix infinite recursion on hiding panel when created during fullscreen mode.
[chromium-blink-merge.git] / ppapi / c / ppb_opengles2.h
blobc58ca297a676373011ae122dcaca5fa7bea388dc
1 // Copyright (c) 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 // OpenGL ES interface.
12 #ifndef PPAPI_C_PPB_OPENGLES2_H_
13 #define PPAPI_C_PPB_OPENGLES2_H_
15 #include "ppapi/c/pp_resource.h"
17 #ifndef __gl2_h_
18 typedef void GLvoid;
19 typedef int GLsizei;
20 typedef unsigned short GLushort;
21 typedef short GLshort;
22 typedef unsigned char GLubyte;
23 typedef unsigned int GLenum;
24 typedef int GLint;
25 typedef unsigned char GLboolean;
26 typedef unsigned int GLbitfield;
27 typedef float GLfloat;
28 typedef float GLclampf;
29 typedef signed char GLbyte;
30 typedef unsigned int GLuint;
31 typedef int GLfixed;
32 typedef int GLclampx;
33 #ifdef _WIN64
34 typedef long long int GLintptr;
35 typedef long long int GLsizeiptr;
36 #else
37 typedef long int GLintptr;
38 typedef long int GLsizeiptr;
39 #endif // _WIN64
40 #endif // __gl2_h_
42 #define PPB_OPENGLES2_INTERFACE_1_0 "PPB_OpenGLES2;1.0"
43 #define PPB_OPENGLES2_INTERFACE PPB_OPENGLES2_INTERFACE_1_0
45 struct PPB_OpenGLES2 {
46 void (*ActiveTexture)(PP_Resource context, GLenum texture);
47 void (*AttachShader)(PP_Resource context, GLuint program, GLuint shader);
48 void (*BindAttribLocation)(PP_Resource context,
49 GLuint program,
50 GLuint index,
51 const char* name);
52 void (*BindBuffer)(PP_Resource context, GLenum target, GLuint buffer);
53 void (*BindFramebuffer)(PP_Resource context,
54 GLenum target,
55 GLuint framebuffer);
56 void (*BindRenderbuffer)(PP_Resource context,
57 GLenum target,
58 GLuint renderbuffer);
59 void (*BindTexture)(PP_Resource context, GLenum target, GLuint texture);
60 void (*BlendColor)(PP_Resource context,
61 GLclampf red,
62 GLclampf green,
63 GLclampf blue,
64 GLclampf alpha);
65 void (*BlendEquation)(PP_Resource context, GLenum mode);
66 void (*BlendEquationSeparate)(PP_Resource context,
67 GLenum modeRGB,
68 GLenum modeAlpha);
69 void (*BlendFunc)(PP_Resource context, GLenum sfactor, GLenum dfactor);
70 void (*BlendFuncSeparate)(PP_Resource context,
71 GLenum srcRGB,
72 GLenum dstRGB,
73 GLenum srcAlpha,
74 GLenum dstAlpha);
75 void (*BufferData)(PP_Resource context,
76 GLenum target,
77 GLsizeiptr size,
78 const void* data,
79 GLenum usage);
80 void (*BufferSubData)(PP_Resource context,
81 GLenum target,
82 GLintptr offset,
83 GLsizeiptr size,
84 const void* data);
85 GLenum (*CheckFramebufferStatus)(PP_Resource context, GLenum target);
86 void (*Clear)(PP_Resource context, GLbitfield mask);
87 void (*ClearColor)(PP_Resource context,
88 GLclampf red,
89 GLclampf green,
90 GLclampf blue,
91 GLclampf alpha);
92 void (*ClearDepthf)(PP_Resource context, GLclampf depth);
93 void (*ClearStencil)(PP_Resource context, GLint s);
94 void (*ColorMask)(PP_Resource context,
95 GLboolean red,
96 GLboolean green,
97 GLboolean blue,
98 GLboolean alpha);
99 void (*CompileShader)(PP_Resource context, GLuint shader);
100 void (*CompressedTexImage2D)(PP_Resource context,
101 GLenum target,
102 GLint level,
103 GLenum internalformat,
104 GLsizei width,
105 GLsizei height,
106 GLint border,
107 GLsizei imageSize,
108 const void* data);
109 void (*CompressedTexSubImage2D)(PP_Resource context,
110 GLenum target,
111 GLint level,
112 GLint xoffset,
113 GLint yoffset,
114 GLsizei width,
115 GLsizei height,
116 GLenum format,
117 GLsizei imageSize,
118 const void* data);
119 void (*CopyTexImage2D)(PP_Resource context,
120 GLenum target,
121 GLint level,
122 GLenum internalformat,
123 GLint x,
124 GLint y,
125 GLsizei width,
126 GLsizei height,
127 GLint border);
128 void (*CopyTexSubImage2D)(PP_Resource context,
129 GLenum target,
130 GLint level,
131 GLint xoffset,
132 GLint yoffset,
133 GLint x,
134 GLint y,
135 GLsizei width,
136 GLsizei height);
137 GLuint (*CreateProgram)(PP_Resource context);
138 GLuint (*CreateShader)(PP_Resource context, GLenum type);
139 void (*CullFace)(PP_Resource context, GLenum mode);
140 void (*DeleteBuffers)(PP_Resource context, GLsizei n, const GLuint* buffers);
141 void (*DeleteFramebuffers)(PP_Resource context,
142 GLsizei n,
143 const GLuint* framebuffers);
144 void (*DeleteProgram)(PP_Resource context, GLuint program);
145 void (*DeleteRenderbuffers)(PP_Resource context,
146 GLsizei n,
147 const GLuint* renderbuffers);
148 void (*DeleteShader)(PP_Resource context, GLuint shader);
149 void (*DeleteTextures)(PP_Resource context,
150 GLsizei n,
151 const GLuint* textures);
152 void (*DepthFunc)(PP_Resource context, GLenum func);
153 void (*DepthMask)(PP_Resource context, GLboolean flag);
154 void (*DepthRangef)(PP_Resource context, GLclampf zNear, GLclampf zFar);
155 void (*DetachShader)(PP_Resource context, GLuint program, GLuint shader);
156 void (*Disable)(PP_Resource context, GLenum cap);
157 void (*DisableVertexAttribArray)(PP_Resource context, GLuint index);
158 void (*DrawArrays)(PP_Resource context,
159 GLenum mode,
160 GLint first,
161 GLsizei count);
162 void (*DrawElements)(PP_Resource context,
163 GLenum mode,
164 GLsizei count,
165 GLenum type,
166 const void* indices);
167 void (*Enable)(PP_Resource context, GLenum cap);
168 void (*EnableVertexAttribArray)(PP_Resource context, GLuint index);
169 void (*Finish)(PP_Resource context);
170 void (*Flush)(PP_Resource context);
171 void (*FramebufferRenderbuffer)(PP_Resource context,
172 GLenum target,
173 GLenum attachment,
174 GLenum renderbuffertarget,
175 GLuint renderbuffer);
176 void (*FramebufferTexture2D)(PP_Resource context,
177 GLenum target,
178 GLenum attachment,
179 GLenum textarget,
180 GLuint texture,
181 GLint level);
182 void (*FrontFace)(PP_Resource context, GLenum mode);
183 void (*GenBuffers)(PP_Resource context, GLsizei n, GLuint* buffers);
184 void (*GenerateMipmap)(PP_Resource context, GLenum target);
185 void (*GenFramebuffers)(PP_Resource context, GLsizei n, GLuint* framebuffers);
186 void (*GenRenderbuffers)(PP_Resource context,
187 GLsizei n,
188 GLuint* renderbuffers);
189 void (*GenTextures)(PP_Resource context, GLsizei n, GLuint* textures);
190 void (*GetActiveAttrib)(PP_Resource context,
191 GLuint program,
192 GLuint index,
193 GLsizei bufsize,
194 GLsizei* length,
195 GLint* size,
196 GLenum* type,
197 char* name);
198 void (*GetActiveUniform)(PP_Resource context,
199 GLuint program,
200 GLuint index,
201 GLsizei bufsize,
202 GLsizei* length,
203 GLint* size,
204 GLenum* type,
205 char* name);
206 void (*GetAttachedShaders)(PP_Resource context,
207 GLuint program,
208 GLsizei maxcount,
209 GLsizei* count,
210 GLuint* shaders);
211 GLint (*GetAttribLocation)(PP_Resource context,
212 GLuint program,
213 const char* name);
214 void (*GetBooleanv)(PP_Resource context, GLenum pname, GLboolean* params);
215 void (*GetBufferParameteriv)(PP_Resource context,
216 GLenum target,
217 GLenum pname,
218 GLint* params);
219 GLenum (*GetError)(PP_Resource context);
220 void (*GetFloatv)(PP_Resource context, GLenum pname, GLfloat* params);
221 void (*GetFramebufferAttachmentParameteriv)(PP_Resource context,
222 GLenum target,
223 GLenum attachment,
224 GLenum pname,
225 GLint* params);
226 void (*GetIntegerv)(PP_Resource context, GLenum pname, GLint* params);
227 void (*GetProgramiv)(PP_Resource context,
228 GLuint program,
229 GLenum pname,
230 GLint* params);
231 void (*GetProgramInfoLog)(PP_Resource context,
232 GLuint program,
233 GLsizei bufsize,
234 GLsizei* length,
235 char* infolog);
236 void (*GetRenderbufferParameteriv)(PP_Resource context,
237 GLenum target,
238 GLenum pname,
239 GLint* params);
240 void (*GetShaderiv)(PP_Resource context,
241 GLuint shader,
242 GLenum pname,
243 GLint* params);
244 void (*GetShaderInfoLog)(PP_Resource context,
245 GLuint shader,
246 GLsizei bufsize,
247 GLsizei* length,
248 char* infolog);
249 void (*GetShaderPrecisionFormat)(PP_Resource context,
250 GLenum shadertype,
251 GLenum precisiontype,
252 GLint* range,
253 GLint* precision);
254 void (*GetShaderSource)(PP_Resource context,
255 GLuint shader,
256 GLsizei bufsize,
257 GLsizei* length,
258 char* source);
259 const GLubyte* (*GetString)(PP_Resource context, GLenum name);
260 void (*GetTexParameterfv)(PP_Resource context,
261 GLenum target,
262 GLenum pname,
263 GLfloat* params);
264 void (*GetTexParameteriv)(PP_Resource context,
265 GLenum target,
266 GLenum pname,
267 GLint* params);
268 void (*GetUniformfv)(PP_Resource context,
269 GLuint program,
270 GLint location,
271 GLfloat* params);
272 void (*GetUniformiv)(PP_Resource context,
273 GLuint program,
274 GLint location,
275 GLint* params);
276 GLint (*GetUniformLocation)(PP_Resource context,
277 GLuint program,
278 const char* name);
279 void (*GetVertexAttribfv)(PP_Resource context,
280 GLuint index,
281 GLenum pname,
282 GLfloat* params);
283 void (*GetVertexAttribiv)(PP_Resource context,
284 GLuint index,
285 GLenum pname,
286 GLint* params);
287 void (*GetVertexAttribPointerv)(PP_Resource context,
288 GLuint index,
289 GLenum pname,
290 void** pointer);
291 void (*Hint)(PP_Resource context, GLenum target, GLenum mode);
292 GLboolean (*IsBuffer)(PP_Resource context, GLuint buffer);
293 GLboolean (*IsEnabled)(PP_Resource context, GLenum cap);
294 GLboolean (*IsFramebuffer)(PP_Resource context, GLuint framebuffer);
295 GLboolean (*IsProgram)(PP_Resource context, GLuint program);
296 GLboolean (*IsRenderbuffer)(PP_Resource context, GLuint renderbuffer);
297 GLboolean (*IsShader)(PP_Resource context, GLuint shader);
298 GLboolean (*IsTexture)(PP_Resource context, GLuint texture);
299 void (*LineWidth)(PP_Resource context, GLfloat width);
300 void (*LinkProgram)(PP_Resource context, GLuint program);
301 void (*PixelStorei)(PP_Resource context, GLenum pname, GLint param);
302 void (*PolygonOffset)(PP_Resource context, GLfloat factor, GLfloat units);
303 void (*ReadPixels)(PP_Resource context,
304 GLint x,
305 GLint y,
306 GLsizei width,
307 GLsizei height,
308 GLenum format,
309 GLenum type,
310 void* pixels);
311 void (*ReleaseShaderCompiler)(PP_Resource context);
312 void (*RenderbufferStorage)(PP_Resource context,
313 GLenum target,
314 GLenum internalformat,
315 GLsizei width,
316 GLsizei height);
317 void (*SampleCoverage)(PP_Resource context, GLclampf value, GLboolean invert);
318 void (*Scissor)(PP_Resource context,
319 GLint x,
320 GLint y,
321 GLsizei width,
322 GLsizei height);
323 void (*ShaderBinary)(PP_Resource context,
324 GLsizei n,
325 const GLuint* shaders,
326 GLenum binaryformat,
327 const void* binary,
328 GLsizei length);
329 void (*ShaderSource)(PP_Resource context,
330 GLuint shader,
331 GLsizei count,
332 const char** str,
333 const GLint* length);
334 void (*StencilFunc)(PP_Resource context, GLenum func, GLint ref, GLuint mask);
335 void (*StencilFuncSeparate)(PP_Resource context,
336 GLenum face,
337 GLenum func,
338 GLint ref,
339 GLuint mask);
340 void (*StencilMask)(PP_Resource context, GLuint mask);
341 void (*StencilMaskSeparate)(PP_Resource context, GLenum face, GLuint mask);
342 void (*StencilOp)(PP_Resource context,
343 GLenum fail,
344 GLenum zfail,
345 GLenum zpass);
346 void (*StencilOpSeparate)(PP_Resource context,
347 GLenum face,
348 GLenum fail,
349 GLenum zfail,
350 GLenum zpass);
351 void (*TexImage2D)(PP_Resource context,
352 GLenum target,
353 GLint level,
354 GLint internalformat,
355 GLsizei width,
356 GLsizei height,
357 GLint border,
358 GLenum format,
359 GLenum type,
360 const void* pixels);
361 void (*TexParameterf)(PP_Resource context,
362 GLenum target,
363 GLenum pname,
364 GLfloat param);
365 void (*TexParameterfv)(PP_Resource context,
366 GLenum target,
367 GLenum pname,
368 const GLfloat* params);
369 void (*TexParameteri)(PP_Resource context,
370 GLenum target,
371 GLenum pname,
372 GLint param);
373 void (*TexParameteriv)(PP_Resource context,
374 GLenum target,
375 GLenum pname,
376 const GLint* params);
377 void (*TexSubImage2D)(PP_Resource context,
378 GLenum target,
379 GLint level,
380 GLint xoffset,
381 GLint yoffset,
382 GLsizei width,
383 GLsizei height,
384 GLenum format,
385 GLenum type,
386 const void* pixels);
387 void (*Uniform1f)(PP_Resource context, GLint location, GLfloat x);
388 void (*Uniform1fv)(PP_Resource context,
389 GLint location,
390 GLsizei count,
391 const GLfloat* v);
392 void (*Uniform1i)(PP_Resource context, GLint location, GLint x);
393 void (*Uniform1iv)(PP_Resource context,
394 GLint location,
395 GLsizei count,
396 const GLint* v);
397 void (*Uniform2f)(PP_Resource context, GLint location, GLfloat x, GLfloat y);
398 void (*Uniform2fv)(PP_Resource context,
399 GLint location,
400 GLsizei count,
401 const GLfloat* v);
402 void (*Uniform2i)(PP_Resource context, GLint location, GLint x, GLint y);
403 void (*Uniform2iv)(PP_Resource context,
404 GLint location,
405 GLsizei count,
406 const GLint* v);
407 void (*Uniform3f)(PP_Resource context,
408 GLint location,
409 GLfloat x,
410 GLfloat y,
411 GLfloat z);
412 void (*Uniform3fv)(PP_Resource context,
413 GLint location,
414 GLsizei count,
415 const GLfloat* v);
416 void (*Uniform3i)(PP_Resource context,
417 GLint location,
418 GLint x,
419 GLint y,
420 GLint z);
421 void (*Uniform3iv)(PP_Resource context,
422 GLint location,
423 GLsizei count,
424 const GLint* v);
425 void (*Uniform4f)(PP_Resource context,
426 GLint location,
427 GLfloat x,
428 GLfloat y,
429 GLfloat z,
430 GLfloat w);
431 void (*Uniform4fv)(PP_Resource context,
432 GLint location,
433 GLsizei count,
434 const GLfloat* v);
435 void (*Uniform4i)(PP_Resource context,
436 GLint location,
437 GLint x,
438 GLint y,
439 GLint z,
440 GLint w);
441 void (*Uniform4iv)(PP_Resource context,
442 GLint location,
443 GLsizei count,
444 const GLint* v);
445 void (*UniformMatrix2fv)(PP_Resource context,
446 GLint location,
447 GLsizei count,
448 GLboolean transpose,
449 const GLfloat* value);
450 void (*UniformMatrix3fv)(PP_Resource context,
451 GLint location,
452 GLsizei count,
453 GLboolean transpose,
454 const GLfloat* value);
455 void (*UniformMatrix4fv)(PP_Resource context,
456 GLint location,
457 GLsizei count,
458 GLboolean transpose,
459 const GLfloat* value);
460 void (*UseProgram)(PP_Resource context, GLuint program);
461 void (*ValidateProgram)(PP_Resource context, GLuint program);
462 void (*VertexAttrib1f)(PP_Resource context, GLuint indx, GLfloat x);
463 void (*VertexAttrib1fv)(PP_Resource context,
464 GLuint indx,
465 const GLfloat* values);
466 void (*VertexAttrib2f)(PP_Resource context,
467 GLuint indx,
468 GLfloat x,
469 GLfloat y);
470 void (*VertexAttrib2fv)(PP_Resource context,
471 GLuint indx,
472 const GLfloat* values);
473 void (*VertexAttrib3f)(PP_Resource context,
474 GLuint indx,
475 GLfloat x,
476 GLfloat y,
477 GLfloat z);
478 void (*VertexAttrib3fv)(PP_Resource context,
479 GLuint indx,
480 const GLfloat* values);
481 void (*VertexAttrib4f)(PP_Resource context,
482 GLuint indx,
483 GLfloat x,
484 GLfloat y,
485 GLfloat z,
486 GLfloat w);
487 void (*VertexAttrib4fv)(PP_Resource context,
488 GLuint indx,
489 const GLfloat* values);
490 void (*VertexAttribPointer)(PP_Resource context,
491 GLuint indx,
492 GLint size,
493 GLenum type,
494 GLboolean normalized,
495 GLsizei stride,
496 const void* ptr);
497 void (*Viewport)(PP_Resource context,
498 GLint x,
499 GLint y,
500 GLsizei width,
501 GLsizei height);
504 #define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 \
505 "PPB_OpenGLES2InstancedArrays;1.0"
506 #define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE \
507 PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0
509 struct PPB_OpenGLES2InstancedArrays {
510 void (*DrawArraysInstancedANGLE)(PP_Resource context,
511 GLenum mode,
512 GLint first,
513 GLsizei count,
514 GLsizei primcount);
515 void (*DrawElementsInstancedANGLE)(PP_Resource context,
516 GLenum mode,
517 GLsizei count,
518 GLenum type,
519 const void* indices,
520 GLsizei primcount);
521 void (*VertexAttribDivisorANGLE)(PP_Resource context,
522 GLuint index,
523 GLuint divisor);
526 #define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 \
527 "PPB_OpenGLES2FramebufferBlit;1.0"
528 #define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE \
529 PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0
531 struct PPB_OpenGLES2FramebufferBlit {
532 void (*BlitFramebufferEXT)(PP_Resource context,
533 GLint srcX0,
534 GLint srcY0,
535 GLint srcX1,
536 GLint srcY1,
537 GLint dstX0,
538 GLint dstY0,
539 GLint dstX1,
540 GLint dstY1,
541 GLbitfield mask,
542 GLenum filter);
545 #define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 \
546 "PPB_OpenGLES2FramebufferMultisample;1.0"
547 #define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE \
548 PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0
550 struct PPB_OpenGLES2FramebufferMultisample {
551 void (*RenderbufferStorageMultisampleEXT)(PP_Resource context,
552 GLenum target,
553 GLsizei samples,
554 GLenum internalformat,
555 GLsizei width,
556 GLsizei height);
559 #define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 \
560 "PPB_OpenGLES2ChromiumEnableFeature;1.0"
561 #define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE \
562 PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0
564 struct PPB_OpenGLES2ChromiumEnableFeature {
565 GLboolean (*EnableFeatureCHROMIUM)(PP_Resource context, const char* feature);
568 #define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 \
569 "PPB_OpenGLES2ChromiumMapSub;1.0"
570 #define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE \
571 PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0
573 struct PPB_OpenGLES2ChromiumMapSub {
574 void* (*MapBufferSubDataCHROMIUM)(PP_Resource context,
575 GLuint target,
576 GLintptr offset,
577 GLsizeiptr size,
578 GLenum access);
579 void (*UnmapBufferSubDataCHROMIUM)(PP_Resource context, const void* mem);
580 void* (*MapTexSubImage2DCHROMIUM)(PP_Resource context,
581 GLenum target,
582 GLint level,
583 GLint xoffset,
584 GLint yoffset,
585 GLsizei width,
586 GLsizei height,
587 GLenum format,
588 GLenum type,
589 GLenum access);
590 void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem);
593 #define PPB_OPENGLES2_QUERY_INTERFACE_1_0 "PPB_OpenGLES2Query;1.0"
594 #define PPB_OPENGLES2_QUERY_INTERFACE PPB_OPENGLES2_QUERY_INTERFACE_1_0
596 struct PPB_OpenGLES2Query {
597 void (*GenQueriesEXT)(PP_Resource context, GLsizei n, GLuint* queries);
598 void (*DeleteQueriesEXT)(PP_Resource context,
599 GLsizei n,
600 const GLuint* queries);
601 GLboolean (*IsQueryEXT)(PP_Resource context, GLuint id);
602 void (*BeginQueryEXT)(PP_Resource context, GLenum target, GLuint id);
603 void (*EndQueryEXT)(PP_Resource context, GLenum target);
604 void (*GetQueryivEXT)(PP_Resource context,
605 GLenum target,
606 GLenum pname,
607 GLint* params);
608 void (*GetQueryObjectuivEXT)(PP_Resource context,
609 GLuint id,
610 GLenum pname,
611 GLuint* params);
614 #endif // PPAPI_C_PPB_OPENGLES2_H_