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
52 #include
"ppapi/c/pp_resource.h"
57 typedef unsigned short GLushort
;
58 typedef short GLshort
;
59 typedef unsigned char GLubyte
;
60 typedef unsigned int GLenum
;
62 typedef unsigned char GLboolean
;
63 typedef unsigned int GLbitfield
;
64 typedef float GLfloat
;
65 typedef float GLclampf
;
66 typedef signed char GLbyte
;
67 typedef unsigned int GLuint
;
71 typedef long long int GLintptr
;
72 typedef long long int GLsizeiptr
;
74 typedef long int GLintptr
;
75 typedef long int GLsizeiptr
;
81 [macro
="PPB_OPENGLES2_INTERFACE", force_struct_namespace
]
82 interface PPB_OpenGLES2
{
83 void ActiveTexture
([in] PP_Resource context
,
85 void AttachShader
([in] PP_Resource context
,
88 void BindAttribLocation
([in] PP_Resource context
,
92 void BindBuffer
([in] PP_Resource context
,
95 void BindFramebuffer
([in] PP_Resource context
,
97 [in] GLuint framebuffer
);
98 void BindRenderbuffer
([in] PP_Resource context
,
100 [in] GLuint renderbuffer
);
101 void BindTexture
([in] PP_Resource context
,
103 [in] GLuint texture
);
104 void BlendColor
([in] PP_Resource context
,
108 [in] GLclampf alpha
);
109 void BlendEquation
([in] PP_Resource context
,
111 void BlendEquationSeparate
([in] PP_Resource context
,
113 [in] GLenum modeAlpha
);
114 void BlendFunc
([in] PP_Resource context
,
116 [in] GLenum dfactor
);
117 void BlendFuncSeparate
([in] PP_Resource context
,
120 [in] GLenum srcAlpha
,
121 [in] GLenum dstAlpha
);
122 void BufferData
([in] PP_Resource context
,
124 [in] GLsizeiptr size
,
127 void BufferSubData
([in] PP_Resource context
,
129 [in] GLintptr offset
,
130 [in] GLsizeiptr size
,
132 GLenum CheckFramebufferStatus
([in] PP_Resource context
,
134 void Clear
([in] PP_Resource context
,
135 [in] GLbitfield mask
);
136 void ClearColor
([in] PP_Resource context
,
140 [in] GLclampf alpha
);
141 void ClearDepthf
([in] PP_Resource context
,
142 [in] GLclampf depth
);
143 void ClearStencil
([in] PP_Resource context
,
145 void ColorMask
([in] PP_Resource context
,
147 [in] GLboolean green
,
149 [in] GLboolean alpha
);
150 void CompileShader
([in] PP_Resource context
,
152 void CompressedTexImage2D
([in] PP_Resource context
,
155 [in] GLenum internalformat
,
159 [in] GLsizei imageSize
,
161 void CompressedTexSubImage2D
([in] PP_Resource context
,
169 [in] GLsizei imageSize
,
171 void CopyTexImage2D
([in] PP_Resource context
,
174 [in] GLenum internalformat
,
180 void CopyTexSubImage2D
([in] PP_Resource context
,
188 [in] GLsizei height
);
189 GLuint CreateProgram
([in] PP_Resource context
);
190 GLuint CreateShader
([in] PP_Resource context
,
192 void CullFace
([in] PP_Resource context
,
194 void DeleteBuffers
([in] PP_Resource context
,
196 [in] GLuint_ptr_t buffers
);
197 void DeleteFramebuffers
([in] PP_Resource context
,
199 [in] GLuint_ptr_t framebuffers
);
200 void DeleteProgram
([in] PP_Resource context
,
201 [in] GLuint program
);
202 void DeleteRenderbuffers
([in] PP_Resource context
,
204 [in] GLuint_ptr_t renderbuffers
);
205 void DeleteShader
([in] PP_Resource context
,
207 void DeleteTextures
([in] PP_Resource context
,
209 [in] GLuint_ptr_t textures
);
210 void DepthFunc
([in] PP_Resource context
,
212 void DepthMask
([in] PP_Resource context
,
213 [in] GLboolean flag
);
214 void DepthRangef
([in] PP_Resource context
,
217 void DetachShader
([in] PP_Resource context
,
220 void Disable
([in] PP_Resource context
,
222 void DisableVertexAttribArray
([in] PP_Resource context
,
224 void DrawArrays
([in] PP_Resource context
,
228 void DrawElements
([in] PP_Resource context
,
233 void Enable
([in] PP_Resource context
,
235 void EnableVertexAttribArray
([in] PP_Resource context
,
237 void Finish
([in] PP_Resource context
);
238 void Flush
([in] PP_Resource context
);
239 void FramebufferRenderbuffer
([in] PP_Resource context
,
241 [in] GLenum attachment
,
242 [in] GLenum renderbuffertarget
,
243 [in] GLuint renderbuffer
);
244 void FramebufferTexture2D
([in] PP_Resource context
,
246 [in] GLenum attachment
,
247 [in] GLenum textarget
,
250 void FrontFace
([in] PP_Resource context
,
252 void GenBuffers
([in] PP_Resource context
,
254 [out] GLuint_ptr_t buffers
);
255 void GenerateMipmap
([in] PP_Resource context
,
257 void GenFramebuffers
([in] PP_Resource context
,
259 [out] GLuint_ptr_t framebuffers
);
260 void GenRenderbuffers
([in] PP_Resource context
,
262 [out] GLuint_ptr_t renderbuffers
);
263 void GenTextures
([in] PP_Resource context
,
265 [out] GLuint_ptr_t textures
);
266 void GetActiveAttrib
([in] PP_Resource context
,
269 [in] GLsizei bufsize
,
270 [out] GLsizei_ptr_t length
,
271 [out] GLint_ptr_t size
,
272 [out] GLenum_ptr_t type
,
274 void GetActiveUniform
([in] PP_Resource context
,
277 [in] GLsizei bufsize
,
278 [out] GLsizei_ptr_t length
,
279 [out] GLint_ptr_t size
,
280 [out] GLenum_ptr_t type
,
282 void GetAttachedShaders
([in] PP_Resource context
,
284 [in] GLsizei maxcount
,
285 [out] GLsizei_ptr_t count
,
286 [out] GLuint_ptr_t shaders
);
287 GLint GetAttribLocation
([in] PP_Resource context
,
290 void GetBooleanv
([in] PP_Resource context
,
292 [out] GLboolean_ptr_t params
);
293 void GetBufferParameteriv
([in] PP_Resource context
,
296 [out] GLint_ptr_t params
);
297 GLenum GetError
([in] PP_Resource context
);
298 void GetFloatv
([in] PP_Resource context
,
300 [out] GLfloat_ptr_t params
);
301 void GetFramebufferAttachmentParameteriv
([in] PP_Resource context
,
303 [in] GLenum attachment
,
305 [out] GLint_ptr_t params
);
306 void GetIntegerv
([in] PP_Resource context
,
308 [out] GLint_ptr_t params
);
309 void GetProgramiv
([in] PP_Resource context
,
312 [out] GLint_ptr_t params
);
313 void GetProgramInfoLog
([in] PP_Resource context
,
315 [in] GLsizei bufsize
,
316 [out] GLsizei_ptr_t length
,
317 [out] str_t infolog
);
318 void GetRenderbufferParameteriv
([in] PP_Resource context
,
321 [out] GLint_ptr_t params
);
322 void GetShaderiv
([in] PP_Resource context
,
325 [out] GLint_ptr_t params
);
326 void GetShaderInfoLog
([in] PP_Resource context
,
328 [in] GLsizei bufsize
,
329 [out] GLsizei_ptr_t length
,
330 [out] str_t infolog
);
331 void GetShaderPrecisionFormat
([in] PP_Resource context
,
332 [in] GLenum shadertype
,
333 [in] GLenum precisiontype
,
334 [out] GLint_ptr_t
range,
335 [out] GLint_ptr_t precision
);
336 void GetShaderSource
([in] PP_Resource context
,
338 [in] GLsizei bufsize
,
339 [out] GLsizei_ptr_t length
,
341 GLubyte_ptr_t GetString
([in] PP_Resource context
,
343 void GetTexParameterfv
([in] PP_Resource context
,
346 [out] GLfloat_ptr_t params
);
347 void GetTexParameteriv
([in] PP_Resource context
,
350 [out] GLint_ptr_t params
);
351 void GetUniformfv
([in] PP_Resource context
,
354 [out] GLfloat_ptr_t params
);
355 void GetUniformiv
([in] PP_Resource context
,
358 [out] GLint_ptr_t params
);
359 GLint GetUniformLocation
([in] PP_Resource context
,
362 void GetVertexAttribfv
([in] PP_Resource context
,
365 [out] GLfloat_ptr_t params
);
366 void GetVertexAttribiv
([in] PP_Resource context
,
369 [out] GLint_ptr_t params
);
370 void GetVertexAttribPointerv
([in] PP_Resource context
,
373 [out] mem_ptr_t pointer
);
374 void Hint
([in] PP_Resource context
,
377 GLboolean IsBuffer
([in] PP_Resource context
,
379 GLboolean IsEnabled
([in] PP_Resource context
,
381 GLboolean IsFramebuffer
([in] PP_Resource context
,
382 [in] GLuint framebuffer
);
383 GLboolean IsProgram
([in] PP_Resource context
,
384 [in] GLuint program
);
385 GLboolean IsRenderbuffer
([in] PP_Resource context
,
386 [in] GLuint renderbuffer
);
387 GLboolean IsShader
([in] PP_Resource context
,
389 GLboolean IsTexture
([in] PP_Resource context
,
390 [in] GLuint texture
);
391 void LineWidth
([in] PP_Resource context
,
393 void LinkProgram
([in] PP_Resource context
,
394 [in] GLuint program
);
395 void PixelStorei
([in] PP_Resource context
,
398 void PolygonOffset
([in] PP_Resource context
,
401 void ReadPixels
([in] PP_Resource context
,
409 void ReleaseShaderCompiler
([in] PP_Resource context
);
410 void RenderbufferStorage
([in] PP_Resource context
,
412 [in] GLenum internalformat
,
414 [in] GLsizei height
);
415 void SampleCoverage
([in] PP_Resource context
,
417 [in] GLboolean invert
);
418 void Scissor
([in] PP_Resource context
,
422 [in] GLsizei height
);
423 void ShaderBinary
([in] PP_Resource context
,
425 [in] GLuint_ptr_t shaders
,
426 [in] GLenum binaryformat
,
428 [in] GLsizei length
);
429 void ShaderSource
([in] PP_Resource context
,
433 [in] GLint_ptr_t length
);
434 void StencilFunc
([in] PP_Resource context
,
438 void StencilFuncSeparate
([in] PP_Resource context
,
443 void StencilMask
([in] PP_Resource context
,
445 void StencilMaskSeparate
([in] PP_Resource context
,
448 void StencilOp
([in] PP_Resource context
,
452 void StencilOpSeparate
([in] PP_Resource context
,
457 void TexImage2D
([in] PP_Resource context
,
460 [in] GLint internalformat
,
467 void TexParameterf
([in] PP_Resource context
,
471 void TexParameterfv
([in] PP_Resource context
,
474 [in] GLfloat_ptr_t params
);
475 void TexParameteri
([in] PP_Resource context
,
479 void TexParameteriv
([in] PP_Resource context
,
482 [in] GLint_ptr_t params
);
483 void TexSubImage2D
([in] PP_Resource context
,
493 void Uniform1f
([in] PP_Resource context
,
496 void Uniform1fv
([in] PP_Resource context
,
499 [in] GLfloat_ptr_t v
);
500 void Uniform1i
([in] PP_Resource context
,
503 void Uniform1iv
([in] PP_Resource context
,
507 void Uniform2f
([in] PP_Resource context
,
511 void Uniform2fv
([in] PP_Resource context
,
514 [in] GLfloat_ptr_t v
);
515 void Uniform2i
([in] PP_Resource context
,
519 void Uniform2iv
([in] PP_Resource context
,
523 void Uniform3f
([in] PP_Resource context
,
528 void Uniform3fv
([in] PP_Resource context
,
531 [in] GLfloat_ptr_t v
);
532 void Uniform3i
([in] PP_Resource context
,
537 void Uniform3iv
([in] PP_Resource context
,
541 void Uniform4f
([in] PP_Resource context
,
547 void Uniform4fv
([in] PP_Resource context
,
550 [in] GLfloat_ptr_t v
);
551 void Uniform4i
([in] PP_Resource context
,
557 void Uniform4iv
([in] PP_Resource context
,
561 void UniformMatrix2fv
([in] PP_Resource context
,
564 [in] GLboolean transpose
,
565 [in] GLfloat_ptr_t value
);
566 void UniformMatrix3fv
([in] PP_Resource context
,
569 [in] GLboolean transpose
,
570 [in] GLfloat_ptr_t value
);
571 void UniformMatrix4fv
([in] PP_Resource context
,
574 [in] GLboolean transpose
,
575 [in] GLfloat_ptr_t value
);
576 void UseProgram
([in] PP_Resource context
,
577 [in] GLuint program
);
578 void ValidateProgram
([in] PP_Resource context
,
579 [in] GLuint program
);
580 void VertexAttrib1f
([in] PP_Resource context
,
583 void VertexAttrib1fv
([in] PP_Resource context
,
585 [in] GLfloat_ptr_t values
);
586 void VertexAttrib2f
([in] PP_Resource context
,
590 void VertexAttrib2fv
([in] PP_Resource context
,
592 [in] GLfloat_ptr_t values
);
593 void VertexAttrib3f
([in] PP_Resource context
,
598 void VertexAttrib3fv
([in] PP_Resource context
,
600 [in] GLfloat_ptr_t values
);
601 void VertexAttrib4f
([in] PP_Resource context
,
607 void VertexAttrib4fv
([in] PP_Resource context
,
609 [in] GLfloat_ptr_t values
);
610 void VertexAttribPointer
([in] PP_Resource context
,
614 [in] GLboolean normalized
,
617 void Viewport
([in] PP_Resource context
,
621 [in] GLsizei height
);
625 [macro
="PPB_OPENGLES2_INSTANCEDARRAYS_INTERFACE", force_struct_namespace
]
626 interface PPB_OpenGLES2InstancedArrays
{
627 void DrawArraysInstancedANGLE
([in] PP_Resource context
,
631 [in] GLsizei primcount
);
632 void DrawElementsInstancedANGLE
([in] PP_Resource context
,
637 [in] GLsizei primcount
);
638 void VertexAttribDivisorANGLE
([in] PP_Resource context
,
640 [in] GLuint divisor
);
644 [macro
="PPB_OPENGLES2_FRAMEBUFFERBLIT_INTERFACE", force_struct_namespace
]
645 interface PPB_OpenGLES2FramebufferBlit
{
646 void BlitFramebufferEXT
([in] PP_Resource context
,
655 [in] GLbitfield mask
,
660 [macro
="PPB_OPENGLES2_FRAMEBUFFERMULTISAMPLE_INTERFACE", force_struct_namespace
]
661 interface PPB_OpenGLES2FramebufferMultisample
{
662 void RenderbufferStorageMultisampleEXT
([in] PP_Resource context
,
664 [in] GLsizei samples
,
665 [in] GLenum internalformat
,
667 [in] GLsizei height
);
671 [macro
="PPB_OPENGLES2_CHROMIUMENABLEFEATURE_INTERFACE", force_struct_namespace
]
672 interface PPB_OpenGLES2ChromiumEnableFeature
{
673 GLboolean EnableFeatureCHROMIUM
([in] PP_Resource context
,
674 [in] cstr_t feature
);
678 [macro
="PPB_OPENGLES2_CHROMIUMMAPSUB_INTERFACE", force_struct_namespace
]
679 interface PPB_OpenGLES2ChromiumMapSub
{
680 mem_t MapBufferSubDataCHROMIUM
([in] PP_Resource context
,
682 [in] GLintptr offset
,
683 [in] GLsizeiptr size
,
685 void UnmapBufferSubDataCHROMIUM
([in] PP_Resource context
,
687 mem_t MapTexSubImage2DCHROMIUM
([in] PP_Resource context
,
697 void UnmapTexSubImage2DCHROMIUM
([in] PP_Resource context
,
702 [macro
="PPB_OPENGLES2_QUERY_INTERFACE", force_struct_namespace
]
703 interface PPB_OpenGLES2Query
{
704 void GenQueriesEXT
([in] PP_Resource context
,
706 [out] GLuint_ptr_t queries
);
707 void DeleteQueriesEXT
([in] PP_Resource context
,
709 [in] GLuint_ptr_t queries
);
710 GLboolean IsQueryEXT
([in] PP_Resource context
,
712 void BeginQueryEXT
([in] PP_Resource context
,
715 void EndQueryEXT
([in] PP_Resource context
,
717 void GetQueryivEXT
([in] PP_Resource context
,
720 [out] GLint_ptr_t params
);
721 void GetQueryObjectuivEXT
([in] PP_Resource context
,
724 [out] GLuint_ptr_t params
);
728 [macro
="PPB_OPENGLES2_VERTEXARRAYOBJECT_INTERFACE", force_struct_namespace
]
729 interface PPB_OpenGLES2VertexArrayObject
{
730 void GenVertexArraysOES
([in] PP_Resource context
,
732 [out] GLuint_ptr_t arrays
);
733 void DeleteVertexArraysOES
([in] PP_Resource context
,
735 [in] GLuint_ptr_t arrays
);
736 GLboolean IsVertexArrayOES
([in] PP_Resource context
,
738 void BindVertexArrayOES
([in] PP_Resource context
,