1 // Copyright 2016 The SwiftShader Authors. All Rights Reserved.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 // entry_points.cpp: GL entry points exports and definition
19 #include "libEGL/main.h"
23 void ActiveTexture(GLenum texture);
24 void AttachShader(GLuint program, GLuint shader);
25 void BeginQueryEXT(GLenum target, GLuint name);
26 void BindAttribLocation(GLuint program, GLuint index, const GLchar* name);
27 void BindBuffer(GLenum target, GLuint buffer);
28 void BindFramebuffer(GLenum target, GLuint framebuffer);
29 void BindRenderbuffer(GLenum target, GLuint renderbuffer);
30 void BindTexture(GLenum target, GLuint texture);
31 void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
32 void BlendEquation(GLenum mode);
33 void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
34 void BlendFunc(GLenum sfactor, GLenum dfactor);
35 void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
36 void BufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
37 void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
38 GLenum CheckFramebufferStatus(GLenum target);
39 void Clear(GLbitfield mask);
40 void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
41 void ClearDepthf(GLclampf depth);
42 void ClearStencil(GLint s);
43 void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
44 void CompileShader(GLuint shader);
45 void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
46 GLint border, GLsizei imageSize, const GLvoid* data);
47 void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
48 GLenum format, GLsizei imageSize, const GLvoid* data);
49 void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
50 void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
51 GLuint CreateProgram(void);
52 GLuint CreateShader(GLenum type);
53 void CullFace(GLenum mode);
54 void DeleteBuffers(GLsizei n, const GLuint* buffers);
55 void DeleteFencesNV(GLsizei n, const GLuint* fences);
56 void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
57 void DeleteProgram(GLuint program);
58 void DeleteQueriesEXT(GLsizei n, const GLuint *ids);
59 void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
60 void DeleteShader(GLuint shader);
61 void DeleteTextures(GLsizei n, const GLuint* textures);
62 void DepthFunc(GLenum func);
63 void DepthMask(GLboolean flag);
64 void DepthRangef(GLclampf zNear, GLclampf zFar);
65 void DetachShader(GLuint program, GLuint shader);
66 void Disable(GLenum cap);
67 void DisableVertexAttribArray(GLuint index);
68 void DrawArrays(GLenum mode, GLint first, GLsizei count);
69 void DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
70 void DrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
71 void DrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
72 void VertexAttribDivisorEXT(GLuint index, GLuint divisor);
73 void DrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
74 void DrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
75 void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
76 void Enable(GLenum cap);
77 void EnableVertexAttribArray(GLuint index);
78 void EndQueryEXT(GLenum target);
79 void FinishFenceNV(GLuint fence);
82 void FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
83 void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
84 void FrontFace(GLenum mode);
85 void GenBuffers(GLsizei n, GLuint* buffers);
86 void GenerateMipmap(GLenum target);
87 void GenFencesNV(GLsizei n, GLuint* fences);
88 void GenFramebuffers(GLsizei n, GLuint* framebuffers);
89 void GenQueriesEXT(GLsizei n, GLuint* ids);
90 void GenRenderbuffers(GLsizei n, GLuint* renderbuffers);
91 void GenTextures(GLsizei n, GLuint* textures);
92 void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
93 void GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
94 void GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
95 int GetAttribLocation(GLuint program, const GLchar* name);
96 void GetBooleanv(GLenum pname, GLboolean* params);
97 void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
98 GLenum GetError(void);
99 void GetFenceivNV(GLuint fence, GLenum pname, GLint *params);
100 void GetFloatv(GLenum pname, GLfloat* params);
101 void GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
102 GLenum GetGraphicsResetStatusEXT(void);
103 void GetIntegerv(GLenum pname, GLint* params);
104 void GetProgramiv(GLuint program, GLenum pname, GLint* params);
105 void GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
106 void GetQueryivEXT(GLenum target, GLenum pname, GLint *params);
107 void GetQueryObjectuivEXT(GLuint name, GLenum pname, GLuint *params);
108 void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
109 void GetShaderiv(GLuint shader, GLenum pname, GLint* params);
110 void GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
111 void GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
112 void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
113 const GLubyte* GetString(GLenum name);
114 void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
115 void GetTexParameteriv(GLenum target, GLenum pname, GLint* params);
116 void GetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params);
117 void GetUniformfv(GLuint program, GLint location, GLfloat* params);
118 void GetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params);
119 void GetUniformiv(GLuint program, GLint location, GLint* params);
120 int GetUniformLocation(GLuint program, const GLchar* name);
121 void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
122 void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
123 void GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
124 void Hint(GLenum target, GLenum mode);
125 GLboolean IsBuffer(GLuint buffer);
126 GLboolean IsEnabled(GLenum cap);
127 GLboolean IsFenceNV(GLuint fence);
128 GLboolean IsFramebuffer(GLuint framebuffer);
129 GLboolean IsProgram(GLuint program);
130 GLboolean IsQueryEXT(GLuint name);
131 GLboolean IsRenderbuffer(GLuint renderbuffer);
132 GLboolean IsShader(GLuint shader);
133 GLboolean IsTexture(GLuint texture);
134 void LineWidth(GLfloat width);
135 void LinkProgram(GLuint program);
136 void PixelStorei(GLenum pname, GLint param);
137 void PolygonOffset(GLfloat factor, GLfloat units);
138 void ReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height,
139 GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
140 void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
141 void ReleaseShaderCompiler(void);
142 void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
143 void RenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
144 void RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
145 void SampleCoverage(GLclampf value, GLboolean invert);
146 void SetFenceNV(GLuint fence, GLenum condition);
147 void Scissor(GLint x, GLint y, GLsizei width, GLsizei height);
148 void ShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
149 void ShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length);
150 void StencilFunc(GLenum func, GLint ref, GLuint mask);
151 void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
152 void StencilMask(GLuint mask);
153 void StencilMaskSeparate(GLenum face, GLuint mask);
154 void StencilOp(GLenum fail, GLenum zfail, GLenum zpass);
155 void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
156 GLboolean TestFenceNV(GLuint fence);
157 void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
158 GLint border, GLenum format, GLenum type, const GLvoid* pixels);
159 void TexParameterf(GLenum target, GLenum pname, GLfloat param);
160 void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
161 void TexParameteri(GLenum target, GLenum pname, GLint param);
162 void TexParameteriv(GLenum target, GLenum pname, const GLint* params);
163 void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
164 GLenum format, GLenum type, const GLvoid* pixels);
165 void Uniform1f(GLint location, GLfloat x);
166 void Uniform1fv(GLint location, GLsizei count, const GLfloat* v);
167 void Uniform1i(GLint location, GLint x);
168 void Uniform1iv(GLint location, GLsizei count, const GLint* v);
169 void Uniform2f(GLint location, GLfloat x, GLfloat y);
170 void Uniform2fv(GLint location, GLsizei count, const GLfloat* v);
171 void Uniform2i(GLint location, GLint x, GLint y);
172 void Uniform2iv(GLint location, GLsizei count, const GLint* v);
173 void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
174 void Uniform3fv(GLint location, GLsizei count, const GLfloat* v);
175 void Uniform3i(GLint location, GLint x, GLint y, GLint z);
176 void Uniform3iv(GLint location, GLsizei count, const GLint* v);
177 void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
178 void Uniform4fv(GLint location, GLsizei count, const GLfloat* v);
179 void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
180 void Uniform4iv(GLint location, GLsizei count, const GLint* v);
181 void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
182 void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
183 void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
184 void UseProgram(GLuint program);
185 void ValidateProgram(GLuint program);
186 void VertexAttrib1f(GLuint index, GLfloat x);
187 void VertexAttrib1fv(GLuint index, const GLfloat* values);
188 void VertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
189 void VertexAttrib2fv(GLuint index, const GLfloat* values);
190 void VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
191 void VertexAttrib3fv(GLuint index, const GLfloat* values);
192 void VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
193 void VertexAttrib4fv(GLuint index, const GLfloat* values);
194 GL_APICALL void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
195 GL_APICALL void Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
196 GL_APICALL void BlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
197 GL_APICALL void BlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
198 GLbitfield mask, GLenum filter);
199 GL_APICALL void TexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
200 GLint border, GLenum format, GLenum type, const GLvoid* pixels);
201 GL_APICALL void TexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
202 GL_APICALL void CopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
203 GL_APICALL void CompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
204 GL_APICALL void CompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
205 GL_APICALL void FramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
206 GL_APICALL void EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
207 GL_APICALL void EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
208 GL_APICALL GLboolean IsRenderbufferOES(GLuint renderbuffer);
209 GL_APICALL void BindRenderbufferOES(GLenum target, GLuint renderbuffer);
210 GL_APICALL void DeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
211 GL_APICALL void GenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
212 GL_APICALL void RenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
213 GL_APICALL void GetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
214 GL_APICALL GLboolean IsFramebufferOES(GLuint framebuffer);
215 GL_APICALL void BindFramebufferOES(GLenum target, GLuint framebuffer);
216 GL_APICALL void DeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
217 GL_APICALL void GenFramebuffersOES(GLsizei n, GLuint* framebuffers);
218 GL_APICALL GLenum CheckFramebufferStatusOES(GLenum target);
219 GL_APICALL void FramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
220 GL_APICALL void FramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
221 GL_APICALL void GetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
222 GL_APICALL void GenerateMipmapOES(GLenum target);
223 GL_APICALL void DrawBuffersEXT(GLsizei n, const GLenum *bufs);
228 GL_APICALL void GL_APIENTRY glActiveTexture(GLenum texture)
230 return es2::ActiveTexture(texture);
233 GL_APICALL void GL_APIENTRY glAttachShader(GLuint program, GLuint shader)
235 return es2::AttachShader(program, shader);
238 GL_APICALL void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint name)
240 return es2::BeginQueryEXT(target, name);
243 GL_APICALL void GL_APIENTRY glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
245 return es2::BindAttribLocation(program, index, name);
248 GL_APICALL void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer)
250 return es2::BindBuffer(target, buffer);
253 GL_APICALL void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
255 return es2::BindFramebuffer(target, framebuffer);
258 GL_APICALL void GL_APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer)
260 return es2::BindFramebuffer(target, framebuffer);
263 GL_APICALL void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer)
265 return es2::BindRenderbuffer(target, renderbuffer);
268 GL_APICALL void GL_APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer)
270 return es2::BindRenderbuffer(target, renderbuffer);
273 GL_APICALL void GL_APIENTRY glBindTexture(GLenum target, GLuint texture)
275 return es2::BindTexture(target, texture);
278 GL_APICALL void GL_APIENTRY glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
280 return es2::BlendColor(red, green, blue, alpha);
283 GL_APICALL void GL_APIENTRY glBlendEquation(GLenum mode)
285 return es2::BlendEquation(mode);
288 GL_APICALL void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
290 return es2::BlendEquationSeparate(modeRGB, modeAlpha);
293 GL_APICALL void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
295 return es2::BlendFunc(sfactor, dfactor);
298 GL_APICALL void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
300 return es2::BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
303 GL_APICALL void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
305 return es2::BufferData(target, size, data, usage);
308 GL_APICALL void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
310 return es2::BufferSubData(target, offset, size, data);
313 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target)
315 return es2::CheckFramebufferStatus(target);
318 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatusOES(GLenum target)
320 return es2::CheckFramebufferStatus(target);
323 GL_APICALL void GL_APIENTRY glClear(GLbitfield mask)
325 return es2::Clear(mask);
328 GL_APICALL void GL_APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
330 return es2::ClearColor(red, green, blue, alpha);
333 GL_APICALL void GL_APIENTRY glClearDepthf(GLclampf depth)
335 return es2::ClearDepthf(depth);
338 GL_APICALL void GL_APIENTRY glClearStencil(GLint s)
340 return es2::ClearStencil(s);
343 GL_APICALL void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
345 return es2::ColorMask(red, green, blue, alpha);
348 GL_APICALL void GL_APIENTRY glCompileShader(GLuint shader)
350 return es2::CompileShader(shader);
353 GL_APICALL void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
354 GLint border, GLsizei imageSize, const GLvoid* data)
356 return es2::CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
359 GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
360 GLenum format, GLsizei imageSize, const GLvoid* data)
362 return es2::CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
365 GL_APICALL void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
367 return es2::CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
370 GL_APICALL void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
372 return es2::CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
375 GL_APICALL GLuint GL_APIENTRY glCreateProgram(void)
377 return es2::CreateProgram();
380 GL_APICALL GLuint GL_APIENTRY glCreateShader(GLenum type)
382 return es2::CreateShader(type);
385 GL_APICALL void GL_APIENTRY glCullFace(GLenum mode)
387 return es2::CullFace(mode);
390 GL_APICALL void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers)
392 return es2::DeleteBuffers(n, buffers);
395 GL_APICALL void GL_APIENTRY glDeleteFencesNV(GLsizei n, const GLuint* fences)
397 return es2::DeleteFencesNV(n, fences);
400 GL_APICALL void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
402 return es2::DeleteFramebuffers(n, framebuffers);
405 GL_APICALL void GL_APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers)
407 return es2::DeleteFramebuffers(n, framebuffers);
410 GL_APICALL void GL_APIENTRY glDeleteProgram(GLuint program)
412 return es2::DeleteProgram(program);
415 GL_APICALL void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint *ids)
417 return es2::DeleteQueriesEXT(n, ids);
420 GL_APICALL void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
422 return es2::DeleteRenderbuffers(n, renderbuffers);
425 GL_APICALL void GL_APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers)
427 return es2::DeleteRenderbuffers(n, renderbuffers);
430 GL_APICALL void GL_APIENTRY glDeleteShader(GLuint shader)
432 return es2::DeleteShader(shader);
435 GL_APICALL void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures)
437 return es2::DeleteTextures(n, textures);
440 GL_APICALL void GL_APIENTRY glDepthFunc(GLenum func)
442 return es2::DepthFunc(func);
445 GL_APICALL void GL_APIENTRY glDepthMask(GLboolean flag)
447 return es2::DepthMask(flag);
450 GL_APICALL void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
452 return es2::DepthRangef(zNear, zFar);
455 GL_APICALL void GL_APIENTRY glDetachShader(GLuint program, GLuint shader)
457 return es2::DetachShader(program, shader);
460 GL_APICALL void GL_APIENTRY glDisable(GLenum cap)
462 return es2::Disable(cap);
465 GL_APICALL void GL_APIENTRY glDisableVertexAttribArray(GLuint index)
467 return es2::DisableVertexAttribArray(index);
470 GL_APICALL void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
472 return es2::DrawArrays(mode, first, count);
475 GL_APICALL void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
477 return es2::DrawElements(mode, count, type, indices);
480 GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
482 return es2::DrawArraysInstancedEXT(mode, first, count, instanceCount);
485 GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
487 return es2::DrawElementsInstancedEXT(mode, count, type, indices, instanceCount);
490 GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT(GLuint index, GLuint divisor)
492 return es2::VertexAttribDivisorEXT(index, divisor);
495 GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
497 return es2::DrawArraysInstancedANGLE(mode, first, count, instanceCount);
500 GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
502 return es2::DrawElementsInstancedANGLE(mode, count, type, indices, instanceCount);
505 GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor)
507 return es2::VertexAttribDivisorANGLE(index, divisor);
510 GL_APICALL void GL_APIENTRY glEnable(GLenum cap)
512 return es2::Enable(cap);
515 GL_APICALL void GL_APIENTRY glEnableVertexAttribArray(GLuint index)
517 return es2::EnableVertexAttribArray(index);
520 GL_APICALL void GL_APIENTRY glEndQueryEXT(GLenum target)
522 return es2::EndQueryEXT(target);
525 GL_APICALL void GL_APIENTRY glFinishFenceNV(GLuint fence)
527 return es2::FinishFenceNV(fence);
530 GL_APICALL void GL_APIENTRY glFinish(void)
532 return es2::Finish();
535 GL_APICALL void GL_APIENTRY glFlush(void)
540 GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
542 return es2::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
545 GL_APICALL void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
547 return es2::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
550 GL_APICALL void GL_APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
552 return es2::FramebufferTexture2D(target, attachment, textarget, texture, level);
555 GL_APICALL void GL_APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
557 return es2::FramebufferTexture2D(target, attachment, textarget, texture, level);
560 GL_APICALL void GL_APIENTRY glFrontFace(GLenum mode)
562 return es2::FrontFace(mode);
565 GL_APICALL void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers)
567 return es2::GenBuffers(n, buffers);
570 GL_APICALL void GL_APIENTRY glGenerateMipmap(GLenum target)
572 return es2::GenerateMipmap(target);
575 GL_APICALL void GL_APIENTRY glGenerateMipmapOES(GLenum target)
577 return es2::GenerateMipmap(target);
580 GL_APICALL void GL_APIENTRY glGenFencesNV(GLsizei n, GLuint* fences)
582 return es2::GenFencesNV(n, fences);
585 GL_APICALL void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers)
587 return es2::GenFramebuffers(n, framebuffers);
590 GL_APICALL void GL_APIENTRY glGenFramebuffersOES(GLsizei n, GLuint* framebuffers)
592 return es2::GenFramebuffers(n, framebuffers);
595 GL_APICALL void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint* ids)
597 return es2::GenQueriesEXT(n, ids);
600 GL_APICALL void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
602 return es2::GenRenderbuffers(n, renderbuffers);
605 GL_APICALL void GL_APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers)
607 return es2::GenRenderbuffers(n, renderbuffers);
610 GL_APICALL void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures)
612 return es2::GenTextures(n, textures);
615 GL_APICALL void GL_APIENTRY glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
617 return es2::GetActiveAttrib(program, index, bufsize, length, size, type, name);
620 GL_APICALL void GL_APIENTRY glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
622 return es2::GetActiveUniform(program, index, bufsize, length, size, type, name);
625 GL_APICALL void GL_APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
627 return es2::GetAttachedShaders(program, maxcount, count, shaders);
630 GL_APICALL int GL_APIENTRY glGetAttribLocation(GLuint program, const GLchar* name)
632 return es2::GetAttribLocation(program, name);
635 GL_APICALL void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params)
637 return es2::GetBooleanv(pname, params);
640 GL_APICALL void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
642 return es2::GetBufferParameteriv(target, pname, params);
645 GL_APICALL GLenum GL_APIENTRY glGetError(void)
647 return es2::GetError();
650 GL_APICALL void GL_APIENTRY glGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
652 return es2::GetFenceivNV(fence, pname, params);
655 GL_APICALL void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params)
657 return es2::GetFloatv(pname, params);
660 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
662 return es2::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
665 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params)
667 return es2::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
670 GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT(void)
672 return es2::GetGraphicsResetStatusEXT();
675 GL_APICALL void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params)
677 return es2::GetIntegerv(pname, params);
680 GL_APICALL void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params)
682 return es2::GetProgramiv(program, pname, params);
685 GL_APICALL void GL_APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
687 return es2::GetProgramInfoLog(program, bufsize, length, infolog);
690 GL_APICALL void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint *params)
692 return es2::GetQueryivEXT(target, pname, params);
695 GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT(GLuint name, GLenum pname, GLuint *params)
697 return es2::GetQueryObjectuivEXT(name, pname, params);
700 GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
702 return es2::GetRenderbufferParameteriv(target, pname, params);
705 GL_APICALL void GL_APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params)
707 return es2::GetRenderbufferParameteriv(target, pname, params);
710 GL_APICALL void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
712 return es2::GetShaderiv(shader, pname, params);
715 GL_APICALL void GL_APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
717 return es2::GetShaderInfoLog(shader, bufsize, length, infolog);
720 GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
722 return es2::GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
725 GL_APICALL void GL_APIENTRY glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
727 return es2::GetShaderSource(shader, bufsize, length, source);
730 GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name)
732 return es2::GetString(name);
735 GL_APICALL void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
737 return es2::GetTexParameterfv(target, pname, params);
740 GL_APICALL void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
742 return es2::GetTexParameteriv(target, pname, params);
745 GL_APICALL void GL_APIENTRY glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params)
747 return es2::GetnUniformfvEXT(program, location, bufSize, params);
750 GL_APICALL void GL_APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat* params)
752 return es2::GetUniformfv(program, location, params);
755 GL_APICALL void GL_APIENTRY glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params)
757 return es2::GetnUniformivEXT(program, location, bufSize, params);
760 GL_APICALL void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params)
762 return es2::GetUniformiv(program, location, params);
765 GL_APICALL int GL_APIENTRY glGetUniformLocation(GLuint program, const GLchar* name)
767 return es2::GetUniformLocation(program, name);
770 GL_APICALL void GL_APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
772 return es2::GetVertexAttribfv(index, pname, params);
775 GL_APICALL void GL_APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
777 return es2::GetVertexAttribiv(index, pname, params);
780 GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
782 return es2::GetVertexAttribPointerv(index, pname, pointer);
785 GL_APICALL void GL_APIENTRY glHint(GLenum target, GLenum mode)
787 return es2::Hint(target, mode);
790 GL_APICALL GLboolean GL_APIENTRY glIsBuffer(GLuint buffer)
792 return es2::IsBuffer(buffer);
795 GL_APICALL GLboolean GL_APIENTRY glIsEnabled(GLenum cap)
797 return es2::IsEnabled(cap);
800 GL_APICALL GLboolean GL_APIENTRY glIsFenceNV(GLuint fence)
802 return es2::IsFenceNV(fence);
805 GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer)
807 return es2::IsFramebuffer(framebuffer);
810 GL_APICALL GLboolean GL_APIENTRY glIsFramebufferOES(GLuint framebuffer)
812 return es2::IsFramebuffer(framebuffer);
815 GL_APICALL GLboolean GL_APIENTRY glIsProgram(GLuint program)
817 return es2::IsProgram(program);
820 GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT(GLuint name)
822 return es2::IsQueryEXT(name);
825 GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer)
827 return es2::IsRenderbuffer(renderbuffer);
830 GL_APICALL GLboolean GL_APIENTRY glIsRenderbufferOES(GLuint renderbuffer)
832 return es2::IsRenderbuffer(renderbuffer);
835 GL_APICALL GLboolean GL_APIENTRY glIsShader(GLuint shader)
837 return es2::IsShader(shader);
840 GL_APICALL GLboolean GL_APIENTRY glIsTexture(GLuint texture)
842 return es2::IsTexture(texture);
845 GL_APICALL void GL_APIENTRY glLineWidth(GLfloat width)
847 return es2::LineWidth(width);
850 GL_APICALL void GL_APIENTRY glLinkProgram(GLuint program)
852 return es2::LinkProgram(program);
855 GL_APICALL void GL_APIENTRY glPixelStorei(GLenum pname, GLint param)
857 return es2::PixelStorei(pname, param);
860 GL_APICALL void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
862 return es2::PolygonOffset(factor, units);
865 GL_APICALL void GL_APIENTRY glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height,
866 GLenum format, GLenum type, GLsizei bufSize, GLvoid *data)
868 return es2::ReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
871 GL_APICALL void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
873 return es2::ReadPixels(x, y, width, height, format, type, pixels);
876 GL_APICALL void GL_APIENTRY glReleaseShaderCompiler(void)
878 return es2::ReleaseShaderCompiler();
881 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
883 return es2::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
886 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
888 return es2::RenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
891 GL_APICALL void GL_APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
893 return es2::RenderbufferStorage(target, internalformat, width, height);
896 GL_APICALL void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
898 return es2::RenderbufferStorage(target, internalformat, width, height);
901 GL_APICALL void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert)
903 return es2::SampleCoverage(value, invert);
906 GL_APICALL void GL_APIENTRY glSetFenceNV(GLuint fence, GLenum condition)
908 return es2::SetFenceNV(fence, condition);
911 GL_APICALL void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
913 return es2::Scissor(x, y, width, height);
916 GL_APICALL void GL_APIENTRY glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
918 return es2::ShaderBinary(n, shaders, binaryformat, binary, length);
921 GL_APICALL void GL_APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
923 return es2::ShaderSource(shader, count, string, length);
926 GL_APICALL void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
928 return es2::StencilFunc(func, ref, mask);
931 GL_APICALL void GL_APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
933 return es2::StencilFuncSeparate(face, func, ref, mask);
936 GL_APICALL void GL_APIENTRY glStencilMask(GLuint mask)
938 return es2::StencilMask(mask);
941 GL_APICALL void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask)
943 return es2::StencilMaskSeparate(face, mask);
946 GL_APICALL void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
948 return es2::StencilOp(fail, zfail, zpass);
951 GL_APICALL void GL_APIENTRY glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
953 return es2::StencilOpSeparate(face, fail, zfail, zpass);
956 GLboolean GL_APIENTRY glTestFenceNV(GLuint fence)
958 return es2::TestFenceNV(fence);
961 GL_APICALL void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
962 GLint border, GLenum format, GLenum type, const GLvoid* pixels)
964 return es2::TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
967 GL_APICALL void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
969 return es2::TexParameterf(target, pname, param);
972 GL_APICALL void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
974 return es2::TexParameterfv(target, pname, params);
977 GL_APICALL void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
979 return es2::TexParameteri(target, pname, param);
982 GL_APICALL void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
984 return es2::TexParameteriv(target, pname, params);
987 GL_APICALL void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
988 GLenum format, GLenum type, const GLvoid* pixels)
990 return es2::TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
993 GL_APICALL void GL_APIENTRY glUniform1f(GLint location, GLfloat x)
995 return es2::Uniform1f(location, x);
998 GL_APICALL void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
1000 return es2::Uniform1fv(location, count, v);
1003 GL_APICALL void GL_APIENTRY glUniform1i(GLint location, GLint x)
1005 return es2::Uniform1i(location, x);
1008 GL_APICALL void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v)
1010 return es2::Uniform1iv(location, count, v);
1013 GL_APICALL void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y)
1015 return es2::Uniform2f(location, x, y);
1018 GL_APICALL void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
1020 return es2::Uniform2fv(location, count, v);
1023 GL_APICALL void GL_APIENTRY glUniform2i(GLint location, GLint x, GLint y)
1025 return es2::Uniform2i(location, x, y);
1028 GL_APICALL void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v)
1030 return es2::Uniform2iv(location, count, v);
1033 GL_APICALL void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
1035 return es2::Uniform3f(location, x, y, z);
1038 GL_APICALL void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
1040 return es2::Uniform3fv(location, count, v);
1043 GL_APICALL void GL_APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z)
1045 return es2::Uniform3i(location, x, y, z);
1048 GL_APICALL void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v)
1050 return es2::Uniform3iv(location, count, v);
1053 GL_APICALL void GL_APIENTRY glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1055 return es2::Uniform4f(location, x, y, z, w);
1058 GL_APICALL void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
1060 return es2::Uniform4fv(location, count, v);
1063 GL_APICALL void GL_APIENTRY glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
1065 return es2::Uniform4i(location, x, y, z, w);
1068 GL_APICALL void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v)
1070 return es2::Uniform4iv(location, count, v);
1073 GL_APICALL void GL_APIENTRY glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1075 return es2::UniformMatrix2fv(location, count, transpose, value);
1078 GL_APICALL void GL_APIENTRY glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1080 return es2::UniformMatrix3fv(location, count, transpose, value);
1083 GL_APICALL void GL_APIENTRY glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1085 return es2::UniformMatrix4fv(location, count, transpose, value);
1088 GL_APICALL void GL_APIENTRY glUseProgram(GLuint program)
1090 return es2::UseProgram(program);
1093 GL_APICALL void GL_APIENTRY glValidateProgram(GLuint program)
1095 return es2::ValidateProgram(program);
1098 GL_APICALL void GL_APIENTRY glVertexAttrib1f(GLuint index, GLfloat x)
1100 return es2::VertexAttrib1f(index, x);
1103 GL_APICALL void GL_APIENTRY glVertexAttrib1fv(GLuint index, const GLfloat* values)
1105 return es2::VertexAttrib1fv(index, values);
1108 GL_APICALL void GL_APIENTRY glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
1110 return es2::VertexAttrib2f(index, x, y);
1113 GL_APICALL void GL_APIENTRY glVertexAttrib2fv(GLuint index, const GLfloat* values)
1115 return es2::VertexAttrib2fv(index, values);
1118 GL_APICALL void GL_APIENTRY glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
1120 return es2::VertexAttrib3f(index, x, y, z);
1123 GL_APICALL void GL_APIENTRY glVertexAttrib3fv(GLuint index, const GLfloat* values)
1125 return es2::VertexAttrib3fv(index, values);
1128 GL_APICALL void GL_APIENTRY glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1130 return es2::VertexAttrib4f(index, x, y, z, w);
1133 GL_APICALL void GL_APIENTRY glVertexAttrib4fv(GLuint index, const GLfloat* values)
1135 return es2::VertexAttrib4fv(index, values);
1138 GL_APICALL void GL_APIENTRY glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
1140 return es2::VertexAttribPointer(index, size, type, normalized, stride, ptr);
1143 GL_APICALL void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
1145 return es2::Viewport(x, y, width, height);
1148 GL_APICALL void GL_APIENTRY glBlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
1150 return es2::BlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
1153 GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
1154 GLbitfield mask, GLenum filter)
1156 return es2::BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
1159 GL_APICALL void GL_APIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
1160 GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1162 return es2::TexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
1165 GL_APICALL void GL_APIENTRY glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)
1167 return es2::TexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
1170 GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
1172 return es2::CopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
1175 GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
1177 return es2::CompressedTexImage3DOES(target, level,internalformat, width, height, depth, border, imageSize, data);
1180 GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)
1182 return es2::CompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
1185 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
1187 return es2::FramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
1190 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
1192 return es2::EGLImageTargetTexture2DOES(target, image);
1195 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
1197 return es2::EGLImageTargetRenderbufferStorageOES(target, image);
1200 GL_APICALL void GL_APIENTRY glDrawBuffersEXT(GLsizei n, const GLenum *bufs)
1202 return es2::DrawBuffersEXT(n, bufs);
1205 void GL_APIENTRY Register(const char *licenseKey)
1207 // Nothing to do, SwiftShader is open-source
1211 egl::Context *es2CreateContext(egl::Display *display, const egl::Context *shareContext, int clientVersion, const egl::Config *config);
1212 extern "C" __eglMustCastToProperFunctionPointerType es2GetProcAddress(const char *procname);
1213 egl::Image *createBackBuffer(int width, int height, sw::Format format, int multiSampleDepth);
1214 egl::Image *createBackBufferFromClientBuffer(const egl::ClientBuffer& clientBuffer);
1215 egl::Image *createDepthStencil(int width, int height, sw::Format format, int multiSampleDepth);
1216 sw::FrameBuffer *createFrameBuffer(void *nativeDisplay, EGLNativeWindowType window, int width, int height);
1218 LibGLESv2exports::LibGLESv2exports()
1220 this->glActiveTexture = es2::ActiveTexture;
1221 this->glAttachShader = es2::AttachShader;
1222 this->glBeginQueryEXT = es2::BeginQueryEXT;
1223 this->glBindAttribLocation = es2::BindAttribLocation;
1224 this->glBindBuffer = es2::BindBuffer;
1225 this->glBindFramebuffer = es2::BindFramebuffer;
1226 this->glBindRenderbuffer = es2::BindRenderbuffer;
1227 this->glBindTexture = es2::BindTexture;
1228 this->glBlendColor = es2::BlendColor;
1229 this->glBlendEquation = es2::BlendEquation;
1230 this->glBlendEquationSeparate = es2::BlendEquationSeparate;
1231 this->glBlendFunc = es2::BlendFunc;
1232 this->glBlendFuncSeparate = es2::BlendFuncSeparate;
1233 this->glBufferData = es2::BufferData;
1234 this->glBufferSubData = es2::BufferSubData;
1235 this->glCheckFramebufferStatus = es2::CheckFramebufferStatus;
1236 this->glClear = es2::Clear;
1237 this->glClearColor = es2::ClearColor;
1238 this->glClearDepthf = es2::ClearDepthf;
1239 this->glClearStencil = es2::ClearStencil;
1240 this->glColorMask = es2::ColorMask;
1241 this->glCompileShader = es2::CompileShader;
1242 this->glCompressedTexImage2D = es2::CompressedTexImage2D;
1243 this->glCompressedTexSubImage2D = es2::CompressedTexSubImage2D;
1244 this->glCopyTexImage2D = es2::CopyTexImage2D;
1245 this->glCopyTexSubImage2D = es2::CopyTexSubImage2D;
1246 this->glCreateProgram = es2::CreateProgram;
1247 this->glCreateShader = es2::CreateShader;
1248 this->glCullFace = es2::CullFace;
1249 this->glDeleteBuffers = es2::DeleteBuffers;
1250 this->glDeleteFencesNV = es2::DeleteFencesNV;
1251 this->glDeleteFramebuffers = es2::DeleteFramebuffers;
1252 this->glDeleteProgram = es2::DeleteProgram;
1253 this->glDeleteQueriesEXT = es2::DeleteQueriesEXT;
1254 this->glDeleteRenderbuffers = es2::DeleteRenderbuffers;
1255 this->glDeleteShader = es2::DeleteShader;
1256 this->glDeleteTextures = es2::DeleteTextures;
1257 this->glDepthFunc = es2::DepthFunc;
1258 this->glDepthMask = es2::DepthMask;
1259 this->glDepthRangef = es2::DepthRangef;
1260 this->glDetachShader = es2::DetachShader;
1261 this->glDisable = es2::Disable;
1262 this->glDisableVertexAttribArray = es2::DisableVertexAttribArray;
1263 this->glDrawArrays = es2::DrawArrays;
1264 this->glDrawElements = es2::DrawElements;
1265 this->glDrawArraysInstancedEXT = es2::DrawArraysInstancedEXT;
1266 this->glDrawElementsInstancedEXT = es2::DrawElementsInstancedEXT;
1267 this->glVertexAttribDivisorEXT = es2::VertexAttribDivisorEXT;
1268 this->glDrawArraysInstancedANGLE = es2::DrawArraysInstancedANGLE;
1269 this->glDrawElementsInstancedANGLE = es2::DrawElementsInstancedANGLE;
1270 this->glVertexAttribDivisorANGLE = es2::VertexAttribDivisorANGLE;
1271 this->glEnable = es2::Enable;
1272 this->glEnableVertexAttribArray = es2::EnableVertexAttribArray;
1273 this->glEndQueryEXT = es2::EndQueryEXT;
1274 this->glFinishFenceNV = es2::FinishFenceNV;
1275 this->glFinish = es2::Finish;
1276 this->glFlush = es2::Flush;
1277 this->glFramebufferRenderbuffer = es2::FramebufferRenderbuffer;
1278 this->glFramebufferTexture2D = es2::FramebufferTexture2D;
1279 this->glFrontFace = es2::FrontFace;
1280 this->glGenBuffers = es2::GenBuffers;
1281 this->glGenerateMipmap = es2::GenerateMipmap;
1282 this->glGenFencesNV = es2::GenFencesNV;
1283 this->glGenFramebuffers = es2::GenFramebuffers;
1284 this->glGenQueriesEXT = es2::GenQueriesEXT;
1285 this->glGenRenderbuffers = es2::GenRenderbuffers;
1286 this->glGenTextures = es2::GenTextures;
1287 this->glGetActiveAttrib = es2::GetActiveAttrib;
1288 this->glGetActiveUniform = es2::GetActiveUniform;
1289 this->glGetAttachedShaders = es2::GetAttachedShaders;
1290 this->glGetAttribLocation = es2::GetAttribLocation;
1291 this->glGetBooleanv = es2::GetBooleanv;
1292 this->glGetBufferParameteriv = es2::GetBufferParameteriv;
1293 this->glGetError = es2::GetError;
1294 this->glGetFenceivNV = es2::GetFenceivNV;
1295 this->glGetFloatv = es2::GetFloatv;
1296 this->glGetFramebufferAttachmentParameteriv = es2::GetFramebufferAttachmentParameteriv;
1297 this->glGetGraphicsResetStatusEXT = es2::GetGraphicsResetStatusEXT;
1298 this->glGetIntegerv = es2::GetIntegerv;
1299 this->glGetProgramiv = es2::GetProgramiv;
1300 this->glGetProgramInfoLog = es2::GetProgramInfoLog;
1301 this->glGetQueryivEXT = es2::GetQueryivEXT;
1302 this->glGetQueryObjectuivEXT = es2::GetQueryObjectuivEXT;
1303 this->glGetRenderbufferParameteriv = es2::GetRenderbufferParameteriv;
1304 this->glGetShaderiv = es2::GetShaderiv;
1305 this->glGetShaderInfoLog = es2::GetShaderInfoLog;
1306 this->glGetShaderPrecisionFormat = es2::GetShaderPrecisionFormat;
1307 this->glGetShaderSource = es2::GetShaderSource;
1308 this->glGetString = es2::GetString;
1309 this->glGetTexParameterfv = es2::GetTexParameterfv;
1310 this->glGetTexParameteriv = es2::GetTexParameteriv;
1311 this->glGetnUniformfvEXT = es2::GetnUniformfvEXT;
1312 this->glGetUniformfv = es2::GetUniformfv;
1313 this->glGetnUniformivEXT = es2::GetnUniformivEXT;
1314 this->glGetUniformiv = es2::GetUniformiv;
1315 this->glGetUniformLocation = es2::GetUniformLocation;
1316 this->glGetVertexAttribfv = es2::GetVertexAttribfv;
1317 this->glGetVertexAttribiv = es2::GetVertexAttribiv;
1318 this->glGetVertexAttribPointerv = es2::GetVertexAttribPointerv;
1319 this->glHint = es2::Hint;
1320 this->glIsBuffer = es2::IsBuffer;
1321 this->glIsEnabled = es2::IsEnabled;
1322 this->glIsFenceNV = es2::IsFenceNV;
1323 this->glIsFramebuffer = es2::IsFramebuffer;
1324 this->glIsProgram = es2::IsProgram;
1325 this->glIsQueryEXT = es2::IsQueryEXT;
1326 this->glIsRenderbuffer = es2::IsRenderbuffer;
1327 this->glIsShader = es2::IsShader;
1328 this->glIsTexture = es2::IsTexture;
1329 this->glLineWidth = es2::LineWidth;
1330 this->glLinkProgram = es2::LinkProgram;
1331 this->glPixelStorei = es2::PixelStorei;
1332 this->glPolygonOffset = es2::PolygonOffset;
1333 this->glReadnPixelsEXT = es2::ReadnPixelsEXT;
1334 this->glReadPixels = es2::ReadPixels;
1335 this->glReleaseShaderCompiler = es2::ReleaseShaderCompiler;
1336 this->glRenderbufferStorageMultisample = es2::RenderbufferStorageMultisample;
1337 this->glRenderbufferStorageMultisampleANGLE = es2::RenderbufferStorageMultisampleANGLE;
1338 this->glRenderbufferStorage = es2::RenderbufferStorage;
1339 this->glSampleCoverage = es2::SampleCoverage;
1340 this->glSetFenceNV = es2::SetFenceNV;
1341 this->glScissor = es2::Scissor;
1342 this->glShaderBinary = es2::ShaderBinary;
1343 this->glShaderSource = es2::ShaderSource;
1344 this->glStencilFunc = es2::StencilFunc;
1345 this->glStencilFuncSeparate = es2::StencilFuncSeparate;
1346 this->glStencilMask = es2::StencilMask;
1347 this->glStencilMaskSeparate = es2::StencilMaskSeparate;
1348 this->glStencilOp = es2::StencilOp;
1349 this->glStencilOpSeparate = es2::StencilOpSeparate;
1350 this->glTestFenceNV = es2::TestFenceNV;
1351 this->glTexImage2D = es2::TexImage2D;
1352 this->glTexParameterf = es2::TexParameterf;
1353 this->glTexParameterfv = es2::TexParameterfv;
1354 this->glTexParameteri = es2::TexParameteri;
1355 this->glTexParameteriv = es2::TexParameteriv;
1356 this->glTexSubImage2D = es2::TexSubImage2D;
1357 this->glUniform1f = es2::Uniform1f;
1358 this->glUniform1fv = es2::Uniform1fv;
1359 this->glUniform1i = es2::Uniform1i;
1360 this->glUniform1iv = es2::Uniform1iv;
1361 this->glUniform2f = es2::Uniform2f;
1362 this->glUniform2fv = es2::Uniform2fv;
1363 this->glUniform2i = es2::Uniform2i;
1364 this->glUniform2iv = es2::Uniform2iv;
1365 this->glUniform3f = es2::Uniform3f;
1366 this->glUniform3fv = es2::Uniform3fv;
1367 this->glUniform3i = es2::Uniform3i;
1368 this->glUniform3iv = es2::Uniform3iv;
1369 this->glUniform4f = es2::Uniform4f;
1370 this->glUniform4fv = es2::Uniform4fv;
1371 this->glUniform4i = es2::Uniform4i;
1372 this->glUniform4iv = es2::Uniform4iv;
1373 this->glUniformMatrix2fv = es2::UniformMatrix2fv;
1374 this->glUniformMatrix3fv = es2::UniformMatrix3fv;
1375 this->glUniformMatrix4fv = es2::UniformMatrix4fv;
1376 this->glUseProgram = es2::UseProgram;
1377 this->glValidateProgram = es2::ValidateProgram;
1378 this->glVertexAttrib1f = es2::VertexAttrib1f;
1379 this->glVertexAttrib1fv = es2::VertexAttrib1fv;
1380 this->glVertexAttrib2f = es2::VertexAttrib2f;
1381 this->glVertexAttrib2fv = es2::VertexAttrib2fv;
1382 this->glVertexAttrib3f = es2::VertexAttrib3f;
1383 this->glVertexAttrib3fv = es2::VertexAttrib3fv;
1384 this->glVertexAttrib4f = es2::VertexAttrib4f;
1385 this->glVertexAttrib4fv = es2::VertexAttrib4fv;
1386 this->glVertexAttribPointer = es2::VertexAttribPointer;
1387 this->glViewport = es2::Viewport;
1388 this->glBlitFramebufferNV = es2::BlitFramebufferNV;
1389 this->glBlitFramebufferANGLE = es2::BlitFramebufferANGLE;
1390 this->glTexImage3DOES = es2::TexImage3DOES;
1391 this->glTexSubImage3DOES = es2::TexSubImage3DOES;
1392 this->glCopyTexSubImage3DOES = es2::CopyTexSubImage3DOES;
1393 this->glCompressedTexImage3DOES = es2::CompressedTexImage3DOES;
1394 this->glCompressedTexSubImage3DOES = es2::CompressedTexSubImage3DOES;
1395 this->glFramebufferTexture3DOES = es2::FramebufferTexture3DOES;
1396 this->glEGLImageTargetTexture2DOES = es2::EGLImageTargetTexture2DOES;
1397 this->glEGLImageTargetRenderbufferStorageOES = es2::EGLImageTargetRenderbufferStorageOES;
1398 this->glIsRenderbufferOES = es2::IsRenderbufferOES;
1399 this->glBindRenderbufferOES = es2::BindRenderbufferOES;
1400 this->glDeleteRenderbuffersOES = es2::DeleteRenderbuffersOES;
1401 this->glGenRenderbuffersOES = es2::GenRenderbuffersOES;
1402 this->glRenderbufferStorageOES = es2::RenderbufferStorageOES;
1403 this->glGetRenderbufferParameterivOES = es2::GetRenderbufferParameterivOES;
1404 this->glIsFramebufferOES = es2::IsFramebufferOES;
1405 this->glBindFramebufferOES = es2::BindFramebufferOES;
1406 this->glDeleteFramebuffersOES = es2::DeleteFramebuffersOES;
1407 this->glGenFramebuffersOES = es2::GenFramebuffersOES;
1408 this->glCheckFramebufferStatusOES = es2::CheckFramebufferStatusOES;
1409 this->glFramebufferRenderbufferOES = es2::FramebufferRenderbufferOES;
1410 this->glFramebufferTexture2DOES = es2::FramebufferTexture2DOES;
1411 this->glGetFramebufferAttachmentParameterivOES = es2::GetFramebufferAttachmentParameterivOES;
1412 this->glGenerateMipmapOES = es2::GenerateMipmapOES;
1413 this->glDrawBuffersEXT = es2::DrawBuffersEXT;
1415 this->es2CreateContext = ::es2CreateContext;
1416 this->es2GetProcAddress = ::es2GetProcAddress;
1417 this->createBackBuffer = ::createBackBuffer;
1418 this->createBackBufferFromClientBuffer = ::createBackBufferFromClientBuffer;
1419 this->createDepthStencil = ::createDepthStencil;
1420 this->createFrameBuffer = ::createFrameBuffer;
1423 extern "C" GL_APICALL LibGLESv2exports *libGLESv2_swiftshader()
1425 static LibGLESv2exports libGLESv2;
1429 LibEGL libEGL(getLibraryDirectoryFromSymbol((void*)libGLESv2_swiftshader));
1430 LibGLES_CM libGLES_CM(getLibraryDirectoryFromSymbol((void*)libGLESv2_swiftshader));