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