• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2012 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.
4 
5 // This file is auto-generated from
6 // gpu/command_buffer/build_gles2_cmd_buffer.py
7 // DO NOT EDIT!
8 
9 // OpenGL ES interface.
10 #ifndef PPAPI_C_PPB_OPENGLES2_H_
11 #define PPAPI_C_PPB_OPENGLES2_H_
12 
13 #include "ppapi/c/pp_resource.h"
14 
15 #ifndef __gl2_h_
16 typedef unsigned int GLenum;
17 typedef void GLvoid;
18 typedef long int GLintptr;
19 typedef int GLsizei;
20 typedef long int GLsizeiptr;
21 typedef int GLint;
22 typedef unsigned char GLboolean;
23 typedef unsigned int GLuint;
24 typedef unsigned int GLbitfield;
25 typedef short GLshort;
26 typedef float GLfloat;
27 typedef float GLclampf;
28 typedef signed char GLbyte;
29 typedef unsigned char GLubyte;
30 typedef int GLfixed;
31 typedef unsigned short GLushort;
32 typedef int GLclampx;
33 #endif  // __gl2_h_
34 
35 #define PPB_OPENGLES2_INTERFACE_1_0 "PPB_OpenGLES2;1.0"
36 #define PPB_OPENGLES2_INTERFACE PPB_OPENGLES2_INTERFACE_1_0
37 
38 struct PPB_OpenGLES2 {
39   void (*ActiveTexture)(PP_Resource context, GLenum texture);
40   void (*AttachShader)(PP_Resource context, GLuint program, GLuint shader);
41   void (*BindAttribLocation)(
42       PP_Resource context, GLuint program, GLuint index, const char* name);
43   void (*BindBuffer)(PP_Resource context, GLenum target, GLuint buffer);
44   void (*BindFramebuffer)(
45       PP_Resource context, GLenum target, GLuint framebuffer);
46   void (*BindRenderbuffer)(
47       PP_Resource context, GLenum target, GLuint renderbuffer);
48   void (*BindTexture)(PP_Resource context, GLenum target, GLuint texture);
49   void (*BlendColor)(
50       PP_Resource context, GLclampf red, GLclampf green, GLclampf blue,
51       GLclampf alpha);
52   void (*BlendEquation)(PP_Resource context, GLenum mode);
53   void (*BlendEquationSeparate)(
54       PP_Resource context, GLenum modeRGB, GLenum modeAlpha);
55   void (*BlendFunc)(PP_Resource context, GLenum sfactor, GLenum dfactor);
56   void (*BlendFuncSeparate)(
57       PP_Resource context, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha,
58       GLenum dstAlpha);
59   void (*BufferData)(
60       PP_Resource context, GLenum target, GLsizeiptr size, const void* data,
61       GLenum usage);
62   void (*BufferSubData)(
63       PP_Resource context, GLenum target, GLintptr offset, GLsizeiptr size,
64       const void* data);
65   GLenum (*CheckFramebufferStatus)(PP_Resource context, GLenum target);
66   void (*Clear)(PP_Resource context, GLbitfield mask);
67   void (*ClearColor)(
68       PP_Resource context, GLclampf red, GLclampf green, GLclampf blue,
69       GLclampf alpha);
70   void (*ClearDepthf)(PP_Resource context, GLclampf depth);
71   void (*ClearStencil)(PP_Resource context, GLint s);
72   void (*ColorMask)(
73       PP_Resource context, GLboolean red, GLboolean green, GLboolean blue,
74       GLboolean alpha);
75   void (*CompileShader)(PP_Resource context, GLuint shader);
76   void (*CompressedTexImage2D)(
77       PP_Resource context, GLenum target, GLint level, GLenum internalformat,
78       GLsizei width, GLsizei height, GLint border, GLsizei imageSize,
79       const void* data);
80   void (*CompressedTexSubImage2D)(
81       PP_Resource context, GLenum target, GLint level, GLint xoffset,
82       GLint yoffset, GLsizei width, GLsizei height, GLenum format,
83       GLsizei imageSize, const void* data);
84   void (*CopyTexImage2D)(
85       PP_Resource context, GLenum target, GLint level, GLenum internalformat,
86       GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
87   void (*CopyTexSubImage2D)(
88       PP_Resource context, GLenum target, GLint level, GLint xoffset,
89       GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
90   GLuint (*CreateProgram)(PP_Resource context);
91   GLuint (*CreateShader)(PP_Resource context, GLenum type);
92   void (*CullFace)(PP_Resource context, GLenum mode);
93   void (*DeleteBuffers)(PP_Resource context, GLsizei n, const GLuint* buffers);
94   void (*DeleteFramebuffers)(
95       PP_Resource context, GLsizei n, const GLuint* framebuffers);
96   void (*DeleteProgram)(PP_Resource context, GLuint program);
97   void (*DeleteRenderbuffers)(
98       PP_Resource context, GLsizei n, const GLuint* renderbuffers);
99   void (*DeleteShader)(PP_Resource context, GLuint shader);
100   void (*DeleteTextures)(
101       PP_Resource context, GLsizei n, const GLuint* textures);
102   void (*DepthFunc)(PP_Resource context, GLenum func);
103   void (*DepthMask)(PP_Resource context, GLboolean flag);
104   void (*DepthRangef)(PP_Resource context, GLclampf zNear, GLclampf zFar);
105   void (*DetachShader)(PP_Resource context, GLuint program, GLuint shader);
106   void (*Disable)(PP_Resource context, GLenum cap);
107   void (*DisableVertexAttribArray)(PP_Resource context, GLuint index);
108   void (*DrawArrays)(
109       PP_Resource context, GLenum mode, GLint first, GLsizei count);
110   void (*DrawElements)(
111       PP_Resource context, GLenum mode, GLsizei count, GLenum type,
112       const void* indices);
113   void (*Enable)(PP_Resource context, GLenum cap);
114   void (*EnableVertexAttribArray)(PP_Resource context, GLuint index);
115   void (*Finish)(PP_Resource context);
116   void (*Flush)(PP_Resource context);
117   void (*FramebufferRenderbuffer)(
118       PP_Resource context, GLenum target, GLenum attachment,
119       GLenum renderbuffertarget, GLuint renderbuffer);
120   void (*FramebufferTexture2D)(
121       PP_Resource context, GLenum target, GLenum attachment, GLenum textarget,
122       GLuint texture, GLint level);
123   void (*FrontFace)(PP_Resource context, GLenum mode);
124   void (*GenBuffers)(PP_Resource context, GLsizei n, GLuint* buffers);
125   void (*GenerateMipmap)(PP_Resource context, GLenum target);
126   void (*GenFramebuffers)(
127       PP_Resource context, GLsizei n, GLuint* framebuffers);
128   void (*GenRenderbuffers)(
129       PP_Resource context, GLsizei n, GLuint* renderbuffers);
130   void (*GenTextures)(PP_Resource context, GLsizei n, GLuint* textures);
131   void (*GetActiveAttrib)(
132       PP_Resource context, GLuint program, GLuint index, GLsizei bufsize,
133       GLsizei* length, GLint* size, GLenum* type, char* name);
134   void (*GetActiveUniform)(
135       PP_Resource context, GLuint program, GLuint index, GLsizei bufsize,
136       GLsizei* length, GLint* size, GLenum* type, char* name);
137   void (*GetAttachedShaders)(
138       PP_Resource context, GLuint program, GLsizei maxcount, GLsizei* count,
139       GLuint* shaders);
140   GLint (*GetAttribLocation)(
141       PP_Resource context, GLuint program, const char* name);
142   void (*GetBooleanv)(PP_Resource context, GLenum pname, GLboolean* params);
143   void (*GetBufferParameteriv)(
144       PP_Resource context, GLenum target, GLenum pname, GLint* params);
145   GLenum (*GetError)(PP_Resource context);
146   void (*GetFloatv)(PP_Resource context, GLenum pname, GLfloat* params);
147   void (*GetFramebufferAttachmentParameteriv)(
148       PP_Resource context, GLenum target, GLenum attachment, GLenum pname,
149       GLint* params);
150   void (*GetIntegerv)(PP_Resource context, GLenum pname, GLint* params);
151   void (*GetProgramiv)(
152       PP_Resource context, GLuint program, GLenum pname, GLint* params);
153   void (*GetProgramInfoLog)(
154       PP_Resource context, GLuint program, GLsizei bufsize, GLsizei* length,
155       char* infolog);
156   void (*GetRenderbufferParameteriv)(
157       PP_Resource context, GLenum target, GLenum pname, GLint* params);
158   void (*GetShaderiv)(
159       PP_Resource context, GLuint shader, GLenum pname, GLint* params);
160   void (*GetShaderInfoLog)(
161       PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length,
162       char* infolog);
163   void (*GetShaderPrecisionFormat)(
164       PP_Resource context, GLenum shadertype, GLenum precisiontype,
165       GLint* range, GLint* precision);
166   void (*GetShaderSource)(
167       PP_Resource context, GLuint shader, GLsizei bufsize, GLsizei* length,
168       char* source);
169   const GLubyte* (*GetString)(PP_Resource context, GLenum name);
170   void (*GetTexParameterfv)(
171       PP_Resource context, GLenum target, GLenum pname, GLfloat* params);
172   void (*GetTexParameteriv)(
173       PP_Resource context, GLenum target, GLenum pname, GLint* params);
174   void (*GetUniformfv)(
175       PP_Resource context, GLuint program, GLint location, GLfloat* params);
176   void (*GetUniformiv)(
177       PP_Resource context, GLuint program, GLint location, GLint* params);
178   GLint (*GetUniformLocation)(
179       PP_Resource context, GLuint program, const char* name);
180   void (*GetVertexAttribfv)(
181       PP_Resource context, GLuint index, GLenum pname, GLfloat* params);
182   void (*GetVertexAttribiv)(
183       PP_Resource context, GLuint index, GLenum pname, GLint* params);
184   void (*GetVertexAttribPointerv)(
185       PP_Resource context, GLuint index, GLenum pname, void** pointer);
186   void (*Hint)(PP_Resource context, GLenum target, GLenum mode);
187   GLboolean (*IsBuffer)(PP_Resource context, GLuint buffer);
188   GLboolean (*IsEnabled)(PP_Resource context, GLenum cap);
189   GLboolean (*IsFramebuffer)(PP_Resource context, GLuint framebuffer);
190   GLboolean (*IsProgram)(PP_Resource context, GLuint program);
191   GLboolean (*IsRenderbuffer)(PP_Resource context, GLuint renderbuffer);
192   GLboolean (*IsShader)(PP_Resource context, GLuint shader);
193   GLboolean (*IsTexture)(PP_Resource context, GLuint texture);
194   void (*LineWidth)(PP_Resource context, GLfloat width);
195   void (*LinkProgram)(PP_Resource context, GLuint program);
196   void (*PixelStorei)(PP_Resource context, GLenum pname, GLint param);
197   void (*PolygonOffset)(PP_Resource context, GLfloat factor, GLfloat units);
198   void (*ReadPixels)(
199       PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height,
200       GLenum format, GLenum type, void* pixels);
201   void (*ReleaseShaderCompiler)(PP_Resource context);
202   void (*RenderbufferStorage)(
203       PP_Resource context, GLenum target, GLenum internalformat, GLsizei width,
204       GLsizei height);
205   void (*SampleCoverage)(
206       PP_Resource context, GLclampf value, GLboolean invert);
207   void (*Scissor)(
208       PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height);
209   void (*ShaderBinary)(
210       PP_Resource context, GLsizei n, const GLuint* shaders,
211       GLenum binaryformat, const void* binary, GLsizei length);
212   void (*ShaderSource)(
213       PP_Resource context, GLuint shader, GLsizei count, const char** str,
214       const GLint* length);
215   void (*StencilFunc)(
216       PP_Resource context, GLenum func, GLint ref, GLuint mask);
217   void (*StencilFuncSeparate)(
218       PP_Resource context, GLenum face, GLenum func, GLint ref, GLuint mask);
219   void (*StencilMask)(PP_Resource context, GLuint mask);
220   void (*StencilMaskSeparate)(PP_Resource context, GLenum face, GLuint mask);
221   void (*StencilOp)(
222       PP_Resource context, GLenum fail, GLenum zfail, GLenum zpass);
223   void (*StencilOpSeparate)(
224       PP_Resource context, GLenum face, GLenum fail, GLenum zfail,
225       GLenum zpass);
226   void (*TexImage2D)(
227       PP_Resource context, GLenum target, GLint level, GLint internalformat,
228       GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type,
229       const void* pixels);
230   void (*TexParameterf)(
231       PP_Resource context, GLenum target, GLenum pname, GLfloat param);
232   void (*TexParameterfv)(
233       PP_Resource context, GLenum target, GLenum pname, const GLfloat* params);
234   void (*TexParameteri)(
235       PP_Resource context, GLenum target, GLenum pname, GLint param);
236   void (*TexParameteriv)(
237       PP_Resource context, GLenum target, GLenum pname, const GLint* params);
238   void (*TexSubImage2D)(
239       PP_Resource context, GLenum target, GLint level, GLint xoffset,
240       GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
241       const void* pixels);
242   void (*Uniform1f)(PP_Resource context, GLint location, GLfloat x);
243   void (*Uniform1fv)(
244       PP_Resource context, GLint location, GLsizei count, const GLfloat* v);
245   void (*Uniform1i)(PP_Resource context, GLint location, GLint x);
246   void (*Uniform1iv)(
247       PP_Resource context, GLint location, GLsizei count, const GLint* v);
248   void (*Uniform2f)(PP_Resource context, GLint location, GLfloat x, GLfloat y);
249   void (*Uniform2fv)(
250       PP_Resource context, GLint location, GLsizei count, const GLfloat* v);
251   void (*Uniform2i)(PP_Resource context, GLint location, GLint x, GLint y);
252   void (*Uniform2iv)(
253       PP_Resource context, GLint location, GLsizei count, const GLint* v);
254   void (*Uniform3f)(
255       PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z);
256   void (*Uniform3fv)(
257       PP_Resource context, GLint location, GLsizei count, const GLfloat* v);
258   void (*Uniform3i)(
259       PP_Resource context, GLint location, GLint x, GLint y, GLint z);
260   void (*Uniform3iv)(
261       PP_Resource context, GLint location, GLsizei count, const GLint* v);
262   void (*Uniform4f)(
263       PP_Resource context, GLint location, GLfloat x, GLfloat y, GLfloat z,
264       GLfloat w);
265   void (*Uniform4fv)(
266       PP_Resource context, GLint location, GLsizei count, const GLfloat* v);
267   void (*Uniform4i)(
268       PP_Resource context, GLint location, GLint x, GLint y, GLint z, GLint w);
269   void (*Uniform4iv)(
270       PP_Resource context, GLint location, GLsizei count, const GLint* v);
271   void (*UniformMatrix2fv)(
272       PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
273       const GLfloat* value);
274   void (*UniformMatrix3fv)(
275       PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
276       const GLfloat* value);
277   void (*UniformMatrix4fv)(
278       PP_Resource context, GLint location, GLsizei count, GLboolean transpose,
279       const GLfloat* value);
280   void (*UseProgram)(PP_Resource context, GLuint program);
281   void (*ValidateProgram)(PP_Resource context, GLuint program);
282   void (*VertexAttrib1f)(PP_Resource context, GLuint indx, GLfloat x);
283   void (*VertexAttrib1fv)(
284       PP_Resource context, GLuint indx, const GLfloat* values);
285   void (*VertexAttrib2f)(
286       PP_Resource context, GLuint indx, GLfloat x, GLfloat y);
287   void (*VertexAttrib2fv)(
288       PP_Resource context, GLuint indx, const GLfloat* values);
289   void (*VertexAttrib3f)(
290       PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z);
291   void (*VertexAttrib3fv)(
292       PP_Resource context, GLuint indx, const GLfloat* values);
293   void (*VertexAttrib4f)(
294       PP_Resource context, GLuint indx, GLfloat x, GLfloat y, GLfloat z,
295       GLfloat w);
296   void (*VertexAttrib4fv)(
297       PP_Resource context, GLuint indx, const GLfloat* values);
298   void (*VertexAttribPointer)(
299       PP_Resource context, GLuint indx, GLint size, GLenum type,
300       GLboolean normalized, GLsizei stride, const void* ptr);
301   void (*Viewport)(
302       PP_Resource context, GLint x, GLint y, GLsizei width, GLsizei height);
303 };
304 
305 #define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0 "PPB_OpenGLES2InstancedArrays;1.0"  // NOLINT
306 #define PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE_1_0  // NOLINT
307 
308 struct PPB_OpenGLES2InstancedArrays {
309   void (*DrawArraysInstancedANGLE)(
310       PP_Resource context, GLenum mode, GLint first, GLsizei count,
311       GLsizei primcount);
312   void (*DrawElementsInstancedANGLE)(
313       PP_Resource context, GLenum mode, GLsizei count, GLenum type,
314       const void* indices, GLsizei primcount);
315   void (*VertexAttribDivisorANGLE)(
316       PP_Resource context, GLuint index, GLuint divisor);
317 };
318 
319 #define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0 "PPB_OpenGLES2FramebufferBlit;1.0"  // NOLINT
320 #define PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE_1_0  // NOLINT
321 
322 struct PPB_OpenGLES2FramebufferBlit {
323   void (*BlitFramebufferEXT)(
324       PP_Resource context, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
325       GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask,
326       GLenum filter);
327 };
328 
329 #define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0 "PPB_OpenGLES2FramebufferMultisample;1.0"  // NOLINT
330 #define PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE_1_0  // NOLINT
331 
332 struct PPB_OpenGLES2FramebufferMultisample {
333   void (*RenderbufferStorageMultisampleEXT)(
334       PP_Resource context, GLenum target, GLsizei samples,
335       GLenum internalformat, GLsizei width, GLsizei height);
336 };
337 
338 #define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0 "PPB_OpenGLES2ChromiumEnableFeature;1.0"  // NOLINT
339 #define PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE_1_0  // NOLINT
340 
341 struct PPB_OpenGLES2ChromiumEnableFeature {
342   GLboolean (*EnableFeatureCHROMIUM)(PP_Resource context, const char* feature);
343 };
344 
345 #define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0 "PPB_OpenGLES2ChromiumMapSub;1.0"  // NOLINT
346 #define PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE_1_0  // NOLINT
347 
348 struct PPB_OpenGLES2ChromiumMapSub {
349   void* (*MapBufferSubDataCHROMIUM)(
350       PP_Resource context, GLuint target, GLintptr offset, GLsizeiptr size,
351       GLenum access);
352   void (*UnmapBufferSubDataCHROMIUM)(PP_Resource context, const void* mem);
353   void* (*MapTexSubImage2DCHROMIUM)(
354       PP_Resource context, GLenum target, GLint level, GLint xoffset,
355       GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type,
356       GLenum access);
357   void (*UnmapTexSubImage2DCHROMIUM)(PP_Resource context, const void* mem);
358 };
359 
360 #define PPB_OPENGLES2_QUERY_INTERFACE_1_0 "PPB_OpenGLES2Query;1.0"
361 #define PPB_OPENGLES2_QUERY_INTERFACE PPB_OPENGLES2_QUERY_INTERFACE_1_0
362 
363 struct PPB_OpenGLES2Query {
364   void (*GenQueriesEXT)(PP_Resource context, GLsizei n, GLuint* queries);
365   void (*DeleteQueriesEXT)(
366       PP_Resource context, GLsizei n, const GLuint* queries);
367   GLboolean (*IsQueryEXT)(PP_Resource context, GLuint id);
368   void (*BeginQueryEXT)(PP_Resource context, GLenum target, GLuint id);
369   void (*EndQueryEXT)(PP_Resource context, GLenum target);
370   void (*GetQueryivEXT)(
371       PP_Resource context, GLenum target, GLenum pname, GLint* params);
372   void (*GetQueryObjectuivEXT)(
373       PP_Resource context, GLuint id, GLenum pname, GLuint* params);
374 };
375 
376 #endif  // PPAPI_C_PPB_OPENGLES2_H_
377 
378