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
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"
20 typedef unsigned short GLushort;
21 typedef short GLshort;
22 typedef unsigned char GLubyte;
23 typedef unsigned int GLenum;
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;
34 typedef long long int GLintptr;
35 typedef long long int GLsizeiptr;
37 typedef long int GLintptr;
38 typedef long int GLsizeiptr;
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,
52 void (*BindBuffer)(PP_Resource context, GLenum target, GLuint buffer);
53 void (*BindFramebuffer)(PP_Resource context,
56 void (*BindRenderbuffer)(PP_Resource context,
59 void (*BindTexture)(PP_Resource context, GLenum target, GLuint texture);
60 void (*BlendColor)(PP_Resource context,
65 void (*BlendEquation)(PP_Resource context, GLenum mode);
66 void (*BlendEquationSeparate)(PP_Resource context,
69 void (*BlendFunc)(PP_Resource context, GLenum sfactor, GLenum dfactor);
70 void (*BlendFuncSeparate)(PP_Resource context,
75 void (*BufferData)(PP_Resource context,
80 void (*BufferSubData)(PP_Resource context,
85 GLenum (*CheckFramebufferStatus)(PP_Resource context, GLenum target);
86 void (*Clear)(PP_Resource context, GLbitfield mask);
87 void (*ClearColor)(PP_Resource context,
92 void (*ClearDepthf)(PP_Resource context, GLclampf depth);
93 void (*ClearStencil)(PP_Resource context, GLint s);
94 void (*ColorMask)(PP_Resource context,
99 void (*CompileShader)(PP_Resource context, GLuint shader);
100 void (*CompressedTexImage2D)(PP_Resource context,
103 GLenum internalformat,
109 void (*CompressedTexSubImage2D)(PP_Resource context,
119 void (*CopyTexImage2D)(PP_Resource context,
122 GLenum internalformat,
128 void (*CopyTexSubImage2D)(PP_Resource context,
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,
143 const GLuint* framebuffers);
144 void (*DeleteProgram)(PP_Resource context, GLuint program);
145 void (*DeleteRenderbuffers)(PP_Resource context,
147 const GLuint* renderbuffers);
148 void (*DeleteShader)(PP_Resource context, GLuint shader);
149 void (*DeleteTextures)(PP_Resource context,
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,
162 void (*DrawElements)(PP_Resource context,
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,
174 GLenum renderbuffertarget,
175 GLuint renderbuffer);
176 void (*FramebufferTexture2D)(PP_Resource context,
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,
188 GLuint* renderbuffers);
189 void (*GenTextures)(PP_Resource context, GLsizei n, GLuint* textures);
190 void (*GetActiveAttrib)(PP_Resource context,
198 void (*GetActiveUniform)(PP_Resource context,
206 void (*GetAttachedShaders)(PP_Resource context,
211 GLint (*GetAttribLocation)(PP_Resource context,
214 void (*GetBooleanv)(PP_Resource context, GLenum pname, GLboolean* params);
215 void (*GetBufferParameteriv)(PP_Resource context,
219 GLenum (*GetError)(PP_Resource context);
220 void (*GetFloatv)(PP_Resource context, GLenum pname, GLfloat* params);
221 void (*GetFramebufferAttachmentParameteriv)(PP_Resource context,
226 void (*GetIntegerv)(PP_Resource context, GLenum pname, GLint* params);
227 void (*GetProgramiv)(PP_Resource context,
231 void (*GetProgramInfoLog)(PP_Resource context,
236 void (*GetRenderbufferParameteriv)(PP_Resource context,
240 void (*GetShaderiv)(PP_Resource context,
244 void (*GetShaderInfoLog)(PP_Resource context,
249 void (*GetShaderPrecisionFormat)(PP_Resource context,
251 GLenum precisiontype,
254 void (*GetShaderSource)(PP_Resource context,
259 const GLubyte* (*GetString)(PP_Resource context, GLenum name);
260 void (*GetTexParameterfv)(PP_Resource context,
264 void (*GetTexParameteriv)(PP_Resource context,
268 void (*GetUniformfv)(PP_Resource context,
272 void (*GetUniformiv)(PP_Resource context,
276 GLint (*GetUniformLocation)(PP_Resource context,
279 void (*GetVertexAttribfv)(PP_Resource context,
283 void (*GetVertexAttribiv)(PP_Resource context,
287 void (*GetVertexAttribPointerv)(PP_Resource context,
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,
311 void (*ReleaseShaderCompiler)(PP_Resource context);
312 void (*RenderbufferStorage)(PP_Resource context,
314 GLenum internalformat,
317 void (*SampleCoverage)(PP_Resource context, GLclampf value, GLboolean invert);
318 void (*Scissor)(PP_Resource context,
323 void (*ShaderBinary)(PP_Resource context,
325 const GLuint* shaders,
329 void (*ShaderSource)(PP_Resource context,
333 const GLint* length);
334 void (*StencilFunc)(PP_Resource context, GLenum func, GLint ref, GLuint mask);
335 void (*StencilFuncSeparate)(PP_Resource context,
340 void (*StencilMask)(PP_Resource context, GLuint mask);
341 void (*StencilMaskSeparate)(PP_Resource context, GLenum face, GLuint mask);
342 void (*StencilOp)(PP_Resource context,
346 void (*StencilOpSeparate)(PP_Resource context,
351 void (*TexImage2D)(PP_Resource context,
354 GLint internalformat,
361 void (*TexParameterf)(PP_Resource context,
365 void (*TexParameterfv)(PP_Resource context,
368 const GLfloat* params);
369 void (*TexParameteri)(PP_Resource context,
373 void (*TexParameteriv)(PP_Resource context,
376 const GLint* params);
377 void (*TexSubImage2D)(PP_Resource context,
387 void (*Uniform1f)(PP_Resource context, GLint location, GLfloat x);
388 void (*Uniform1fv)(PP_Resource context,
392 void (*Uniform1i)(PP_Resource context, GLint location, GLint x);
393 void (*Uniform1iv)(PP_Resource context,
397 void (*Uniform2f)(PP_Resource context, GLint location, GLfloat x, GLfloat y);
398 void (*Uniform2fv)(PP_Resource context,
402 void (*Uniform2i)(PP_Resource context, GLint location, GLint x, GLint y);
403 void (*Uniform2iv)(PP_Resource context,
407 void (*Uniform3f)(PP_Resource context,
412 void (*Uniform3fv)(PP_Resource context,
416 void (*Uniform3i)(PP_Resource context,
421 void (*Uniform3iv)(PP_Resource context,
425 void (*Uniform4f)(PP_Resource context,
431 void (*Uniform4fv)(PP_Resource context,
435 void (*Uniform4i)(PP_Resource context,
441 void (*Uniform4iv)(PP_Resource context,
445 void (*UniformMatrix2fv)(PP_Resource context,
449 const GLfloat* value);
450 void (*UniformMatrix3fv)(PP_Resource context,
454 const GLfloat* value);
455 void (*UniformMatrix4fv)(PP_Resource context,
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,
465 const GLfloat* values);
466 void (*VertexAttrib2f)(PP_Resource context,
470 void (*VertexAttrib2fv)(PP_Resource context,
472 const GLfloat* values);
473 void (*VertexAttrib3f)(PP_Resource context,
478 void (*VertexAttrib3fv)(PP_Resource context,
480 const GLfloat* values);
481 void (*VertexAttrib4f)(PP_Resource context,
487 void (*VertexAttrib4fv)(PP_Resource context,
489 const GLfloat* values);
490 void (*VertexAttribPointer)(PP_Resource context,
494 GLboolean normalized,
497 void (*Viewport)(PP_Resource context,
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,
515 void (*DrawElementsInstancedANGLE)(PP_Resource context,
521 void (*VertexAttribDivisorANGLE)(PP_Resource context,
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,
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,
554 GLenum internalformat,
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,
579 void (*UnmapBufferSubDataCHROMIUM)(PP_Resource context, const void* mem);
580 void* (*MapTexSubImage2DCHROMIUM)(PP_Resource context,
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,
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,
608 void (*GetQueryObjectuivEXT)(PP_Resource context,
614 #define PPB_OPENGLES2_VERTEXARRAYOBJECT_INTERFACE_1_0 \
615 "PPB_OpenGLES2VertexArrayObject;1.0"
616 #define PPB_OPENGLES2_VERTEXARRAYOBJECT_INTERFACE \
617 PPB_OPENGLES2_VERTEXARRAYOBJECT_INTERFACE_1_0
619 struct PPB_OpenGLES2VertexArrayObject {
620 void (*GenVertexArraysOES)(PP_Resource context, GLsizei n, GLuint* arrays);
621 void (*DeleteVertexArraysOES)(PP_Resource context,
623 const GLuint* arrays);
624 GLboolean (*IsVertexArrayOES)(PP_Resource context, GLuint array);
625 void (*BindVertexArrayOES)(PP_Resource context, GLuint array);
628 #endif // PPAPI_C_PPB_OPENGLES2_H_