OSDN Git Service

Load sibling libraries from the same directory
[android-x86/external-swiftshader.git] / src / OpenGL / libGLESv2 / entry_points.cpp
1 // Copyright 2016 The SwiftShader Authors. All Rights Reserved.
2 //
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
6 //
7 //    http://www.apache.org/licenses/LICENSE-2.0
8 //
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.
14
15 // entry_points.cpp: GL entry points exports and definition
16
17 #include "main.h"
18
19 #include "libEGL/main.h"
20
21 namespace es2
22 {
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);
80 void Finish(void);
81 void Flush(void);
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);
224 }
225
226 extern "C"
227 {
228 GL_APICALL void GL_APIENTRY glActiveTexture(GLenum texture)
229 {
230         return es2::ActiveTexture(texture);
231 }
232
233 GL_APICALL void GL_APIENTRY glAttachShader(GLuint program, GLuint shader)
234 {
235         return es2::AttachShader(program, shader);
236 }
237
238 GL_APICALL void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint name)
239 {
240         return es2::BeginQueryEXT(target, name);
241 }
242
243 GL_APICALL void GL_APIENTRY glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
244 {
245         return es2::BindAttribLocation(program, index, name);
246 }
247
248 GL_APICALL void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer)
249 {
250         return es2::BindBuffer(target, buffer);
251 }
252
253 GL_APICALL void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
254 {
255         return es2::BindFramebuffer(target, framebuffer);
256 }
257
258 GL_APICALL void GL_APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer)
259 {
260         return es2::BindFramebuffer(target, framebuffer);
261 }
262
263 GL_APICALL void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer)
264 {
265         return es2::BindRenderbuffer(target, renderbuffer);
266 }
267
268 GL_APICALL void GL_APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer)
269 {
270         return es2::BindRenderbuffer(target, renderbuffer);
271 }
272
273 GL_APICALL void GL_APIENTRY glBindTexture(GLenum target, GLuint texture)
274 {
275         return es2::BindTexture(target, texture);
276 }
277
278 GL_APICALL void GL_APIENTRY glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
279 {
280         return es2::BlendColor(red, green, blue, alpha);
281 }
282
283 GL_APICALL void GL_APIENTRY glBlendEquation(GLenum mode)
284 {
285         return es2::BlendEquation(mode);
286 }
287
288 GL_APICALL void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
289 {
290         return es2::BlendEquationSeparate(modeRGB, modeAlpha);
291 }
292
293 GL_APICALL void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
294 {
295         return es2::BlendFunc(sfactor, dfactor);
296 }
297
298 GL_APICALL void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
299 {
300         return es2::BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
301 }
302
303 GL_APICALL void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
304 {
305         return es2::BufferData(target, size, data, usage);
306 }
307
308 GL_APICALL void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
309 {
310         return es2::BufferSubData(target, offset, size, data);
311 }
312
313 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target)
314 {
315         return es2::CheckFramebufferStatus(target);
316 }
317
318 GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatusOES(GLenum target)
319 {
320         return es2::CheckFramebufferStatus(target);
321 }
322
323 GL_APICALL void GL_APIENTRY glClear(GLbitfield mask)
324 {
325         return es2::Clear(mask);
326 }
327
328 GL_APICALL void GL_APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
329 {
330         return es2::ClearColor(red, green, blue, alpha);
331 }
332
333 GL_APICALL void GL_APIENTRY glClearDepthf(GLclampf depth)
334 {
335         return es2::ClearDepthf(depth);
336 }
337
338 GL_APICALL void GL_APIENTRY glClearStencil(GLint s)
339 {
340         return es2::ClearStencil(s);
341 }
342
343 GL_APICALL void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
344 {
345         return es2::ColorMask(red, green, blue, alpha);
346 }
347
348 GL_APICALL void GL_APIENTRY glCompileShader(GLuint shader)
349 {
350         return es2::CompileShader(shader);
351 }
352
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)
355 {
356         return es2::CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
357 }
358
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)
361 {
362         return es2::CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
363 }
364
365 GL_APICALL void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
366 {
367         return es2::CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
368 }
369
370 GL_APICALL void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
371 {
372         return es2::CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
373 }
374
375 GL_APICALL GLuint GL_APIENTRY glCreateProgram(void)
376 {
377         return es2::CreateProgram();
378 }
379
380 GL_APICALL GLuint GL_APIENTRY glCreateShader(GLenum type)
381 {
382         return es2::CreateShader(type);
383 }
384
385 GL_APICALL void GL_APIENTRY glCullFace(GLenum mode)
386 {
387         return es2::CullFace(mode);
388 }
389
390 GL_APICALL void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers)
391 {
392         return es2::DeleteBuffers(n, buffers);
393 }
394
395 GL_APICALL void GL_APIENTRY glDeleteFencesNV(GLsizei n, const GLuint* fences)
396 {
397         return es2::DeleteFencesNV(n, fences);
398 }
399
400 GL_APICALL void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
401 {
402         return es2::DeleteFramebuffers(n, framebuffers);
403 }
404
405 GL_APICALL void GL_APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers)
406 {
407         return es2::DeleteFramebuffers(n, framebuffers);
408 }
409
410 GL_APICALL void GL_APIENTRY glDeleteProgram(GLuint program)
411 {
412         return es2::DeleteProgram(program);
413 }
414
415 GL_APICALL void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint *ids)
416 {
417         return es2::DeleteQueriesEXT(n, ids);
418 }
419
420 GL_APICALL void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
421 {
422         return es2::DeleteRenderbuffers(n, renderbuffers);
423 }
424
425 GL_APICALL void GL_APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers)
426 {
427         return es2::DeleteRenderbuffers(n, renderbuffers);
428 }
429
430 GL_APICALL void GL_APIENTRY glDeleteShader(GLuint shader)
431 {
432         return es2::DeleteShader(shader);
433 }
434
435 GL_APICALL void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures)
436 {
437         return es2::DeleteTextures(n, textures);
438 }
439
440 GL_APICALL void GL_APIENTRY glDepthFunc(GLenum func)
441 {
442         return es2::DepthFunc(func);
443 }
444
445 GL_APICALL void GL_APIENTRY glDepthMask(GLboolean flag)
446 {
447         return es2::DepthMask(flag);
448 }
449
450 GL_APICALL void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
451 {
452         return es2::DepthRangef(zNear, zFar);
453 }
454
455 GL_APICALL void GL_APIENTRY glDetachShader(GLuint program, GLuint shader)
456 {
457         return es2::DetachShader(program, shader);
458 }
459
460 GL_APICALL void GL_APIENTRY glDisable(GLenum cap)
461 {
462         return es2::Disable(cap);
463 }
464
465 GL_APICALL void GL_APIENTRY glDisableVertexAttribArray(GLuint index)
466 {
467         return es2::DisableVertexAttribArray(index);
468 }
469
470 GL_APICALL void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
471 {
472         return es2::DrawArrays(mode, first, count);
473 }
474
475 GL_APICALL void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
476 {
477         return es2::DrawElements(mode, count, type, indices);
478 }
479
480 GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
481 {
482         return es2::DrawArraysInstancedEXT(mode, first, count, instanceCount);
483 }
484
485 GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
486 {
487         return es2::DrawElementsInstancedEXT(mode, count, type, indices, instanceCount);
488 }
489
490 GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT(GLuint index, GLuint divisor)
491 {
492         return es2::VertexAttribDivisorEXT(index, divisor);
493 }
494
495 GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
496 {
497         return es2::DrawArraysInstancedANGLE(mode, first, count, instanceCount);
498 }
499
500 GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
501 {
502         return es2::DrawElementsInstancedANGLE(mode, count, type, indices, instanceCount);
503 }
504
505 GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor)
506 {
507         return es2::VertexAttribDivisorANGLE(index, divisor);
508 }
509
510 GL_APICALL void GL_APIENTRY glEnable(GLenum cap)
511 {
512         return es2::Enable(cap);
513 }
514
515 GL_APICALL void GL_APIENTRY glEnableVertexAttribArray(GLuint index)
516 {
517         return es2::EnableVertexAttribArray(index);
518 }
519
520 GL_APICALL void GL_APIENTRY glEndQueryEXT(GLenum target)
521 {
522         return es2::EndQueryEXT(target);
523 }
524
525 GL_APICALL void GL_APIENTRY glFinishFenceNV(GLuint fence)
526 {
527         return es2::FinishFenceNV(fence);
528 }
529
530 GL_APICALL void GL_APIENTRY glFinish(void)
531 {
532         return es2::Finish();
533 }
534
535 GL_APICALL void GL_APIENTRY glFlush(void)
536 {
537         return es2::Flush();
538 }
539
540 GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
541 {
542         return es2::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
543 }
544
545 GL_APICALL void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
546 {
547         return es2::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
548 }
549
550 GL_APICALL void GL_APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
551 {
552         return es2::FramebufferTexture2D(target, attachment, textarget, texture, level);
553 }
554
555 GL_APICALL void GL_APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
556 {
557         return es2::FramebufferTexture2D(target, attachment, textarget, texture, level);
558 }
559
560 GL_APICALL void GL_APIENTRY glFrontFace(GLenum mode)
561 {
562         return es2::FrontFace(mode);
563 }
564
565 GL_APICALL void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers)
566 {
567         return es2::GenBuffers(n, buffers);
568 }
569
570 GL_APICALL void GL_APIENTRY glGenerateMipmap(GLenum target)
571 {
572         return es2::GenerateMipmap(target);
573 }
574
575 GL_APICALL void GL_APIENTRY glGenerateMipmapOES(GLenum target)
576 {
577         return es2::GenerateMipmap(target);
578 }
579
580 GL_APICALL void GL_APIENTRY glGenFencesNV(GLsizei n, GLuint* fences)
581 {
582         return es2::GenFencesNV(n, fences);
583 }
584
585 GL_APICALL void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers)
586 {
587         return es2::GenFramebuffers(n, framebuffers);
588 }
589
590 GL_APICALL void GL_APIENTRY glGenFramebuffersOES(GLsizei n, GLuint* framebuffers)
591 {
592         return es2::GenFramebuffers(n, framebuffers);
593 }
594
595 GL_APICALL void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint* ids)
596 {
597         return es2::GenQueriesEXT(n, ids);
598 }
599
600 GL_APICALL void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
601 {
602         return es2::GenRenderbuffers(n, renderbuffers);
603 }
604
605 GL_APICALL void GL_APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers)
606 {
607         return es2::GenRenderbuffers(n, renderbuffers);
608 }
609
610 GL_APICALL void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures)
611 {
612         return es2::GenTextures(n, textures);
613 }
614
615 GL_APICALL void GL_APIENTRY glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
616 {
617         return es2::GetActiveAttrib(program, index, bufsize, length, size, type, name);
618 }
619
620 GL_APICALL void GL_APIENTRY glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
621 {
622         return es2::GetActiveUniform(program, index, bufsize, length, size, type, name);
623 }
624
625 GL_APICALL void GL_APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
626 {
627         return es2::GetAttachedShaders(program, maxcount, count, shaders);
628 }
629
630 GL_APICALL int GL_APIENTRY glGetAttribLocation(GLuint program, const GLchar* name)
631 {
632         return es2::GetAttribLocation(program, name);
633 }
634
635 GL_APICALL void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params)
636 {
637         return es2::GetBooleanv(pname, params);
638 }
639
640 GL_APICALL void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
641 {
642         return es2::GetBufferParameteriv(target, pname, params);
643 }
644
645 GL_APICALL GLenum GL_APIENTRY glGetError(void)
646 {
647         return es2::GetError();
648 }
649
650 GL_APICALL void GL_APIENTRY glGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
651 {
652         return es2::GetFenceivNV(fence, pname, params);
653 }
654
655 GL_APICALL void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params)
656 {
657         return es2::GetFloatv(pname, params);
658 }
659
660 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
661 {
662         return es2::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
663 }
664
665 GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params)
666 {
667         return es2::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
668 }
669
670 GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT(void)
671 {
672         return es2::GetGraphicsResetStatusEXT();
673 }
674
675 GL_APICALL void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params)
676 {
677         return es2::GetIntegerv(pname, params);
678 }
679
680 GL_APICALL void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params)
681 {
682         return es2::GetProgramiv(program, pname, params);
683 }
684
685 GL_APICALL void GL_APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
686 {
687         return es2::GetProgramInfoLog(program, bufsize, length, infolog);
688 }
689
690 GL_APICALL void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint *params)
691 {
692         return es2::GetQueryivEXT(target, pname, params);
693 }
694
695 GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT(GLuint name, GLenum pname, GLuint *params)
696 {
697         return es2::GetQueryObjectuivEXT(name, pname, params);
698 }
699
700 GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
701 {
702         return es2::GetRenderbufferParameteriv(target, pname, params);
703 }
704
705 GL_APICALL void GL_APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params)
706 {
707         return es2::GetRenderbufferParameteriv(target, pname, params);
708 }
709
710 GL_APICALL void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
711 {
712         return es2::GetShaderiv(shader, pname, params);
713 }
714
715 GL_APICALL void GL_APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
716 {
717         return es2::GetShaderInfoLog(shader, bufsize, length, infolog);
718 }
719
720 GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
721 {
722         return es2::GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
723 }
724
725 GL_APICALL void GL_APIENTRY glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
726 {
727         return es2::GetShaderSource(shader, bufsize, length, source);
728 }
729
730 GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name)
731 {
732         return es2::GetString(name);
733 }
734
735 GL_APICALL void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
736 {
737         return es2::GetTexParameterfv(target, pname, params);
738 }
739
740 GL_APICALL void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
741 {
742         return es2::GetTexParameteriv(target, pname, params);
743 }
744
745 GL_APICALL void GL_APIENTRY glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params)
746 {
747         return es2::GetnUniformfvEXT(program, location, bufSize, params);
748 }
749
750 GL_APICALL void GL_APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat* params)
751 {
752         return es2::GetUniformfv(program, location, params);
753 }
754
755 GL_APICALL void GL_APIENTRY glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params)
756 {
757         return es2::GetnUniformivEXT(program, location, bufSize, params);
758 }
759
760 GL_APICALL void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params)
761 {
762         return es2::GetUniformiv(program, location, params);
763 }
764
765 GL_APICALL int GL_APIENTRY glGetUniformLocation(GLuint program, const GLchar* name)
766 {
767         return es2::GetUniformLocation(program, name);
768 }
769
770 GL_APICALL void GL_APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
771 {
772         return es2::GetVertexAttribfv(index, pname, params);
773 }
774
775 GL_APICALL void GL_APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
776 {
777         return es2::GetVertexAttribiv(index, pname, params);
778 }
779
780 GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
781 {
782         return es2::GetVertexAttribPointerv(index, pname, pointer);
783 }
784
785 GL_APICALL void GL_APIENTRY glHint(GLenum target, GLenum mode)
786 {
787         return es2::Hint(target, mode);
788 }
789
790 GL_APICALL GLboolean GL_APIENTRY glIsBuffer(GLuint buffer)
791 {
792         return es2::IsBuffer(buffer);
793 }
794
795 GL_APICALL GLboolean GL_APIENTRY glIsEnabled(GLenum cap)
796 {
797         return es2::IsEnabled(cap);
798 }
799
800 GL_APICALL GLboolean GL_APIENTRY glIsFenceNV(GLuint fence)
801 {
802         return es2::IsFenceNV(fence);
803 }
804
805 GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer)
806 {
807         return es2::IsFramebuffer(framebuffer);
808 }
809
810 GL_APICALL GLboolean GL_APIENTRY glIsFramebufferOES(GLuint framebuffer)
811 {
812         return es2::IsFramebuffer(framebuffer);
813 }
814
815 GL_APICALL GLboolean GL_APIENTRY glIsProgram(GLuint program)
816 {
817         return es2::IsProgram(program);
818 }
819
820 GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT(GLuint name)
821 {
822         return es2::IsQueryEXT(name);
823 }
824
825 GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer)
826 {
827         return es2::IsRenderbuffer(renderbuffer);
828 }
829
830 GL_APICALL GLboolean GL_APIENTRY glIsRenderbufferOES(GLuint renderbuffer)
831 {
832         return es2::IsRenderbuffer(renderbuffer);
833 }
834
835 GL_APICALL GLboolean GL_APIENTRY glIsShader(GLuint shader)
836 {
837         return es2::IsShader(shader);
838 }
839
840 GL_APICALL GLboolean GL_APIENTRY glIsTexture(GLuint texture)
841 {
842         return es2::IsTexture(texture);
843 }
844
845 GL_APICALL void GL_APIENTRY glLineWidth(GLfloat width)
846 {
847         return es2::LineWidth(width);
848 }
849
850 GL_APICALL void GL_APIENTRY glLinkProgram(GLuint program)
851 {
852         return es2::LinkProgram(program);
853 }
854
855 GL_APICALL void GL_APIENTRY glPixelStorei(GLenum pname, GLint param)
856 {
857         return es2::PixelStorei(pname, param);
858 }
859
860 GL_APICALL void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
861 {
862         return es2::PolygonOffset(factor, units);
863 }
864
865 GL_APICALL void GL_APIENTRY glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height,
866                                              GLenum format, GLenum type, GLsizei bufSize, GLvoid *data)
867 {
868         return es2::ReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
869 }
870
871 GL_APICALL void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
872 {
873         return es2::ReadPixels(x, y, width, height, format, type, pixels);
874 }
875
876 GL_APICALL void GL_APIENTRY glReleaseShaderCompiler(void)
877 {
878         return es2::ReleaseShaderCompiler();
879 }
880
881 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
882 {
883         return es2::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
884 }
885
886 GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
887 {
888         return es2::RenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
889 }
890
891 GL_APICALL void GL_APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
892 {
893         return es2::RenderbufferStorage(target, internalformat, width, height);
894 }
895
896 GL_APICALL void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
897 {
898         return es2::RenderbufferStorage(target, internalformat, width, height);
899 }
900
901 GL_APICALL void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert)
902 {
903         return es2::SampleCoverage(value, invert);
904 }
905
906 GL_APICALL void GL_APIENTRY glSetFenceNV(GLuint fence, GLenum condition)
907 {
908         return es2::SetFenceNV(fence, condition);
909 }
910
911 GL_APICALL void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
912 {
913         return es2::Scissor(x, y, width, height);
914 }
915
916 GL_APICALL void GL_APIENTRY glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
917 {
918         return es2::ShaderBinary(n, shaders, binaryformat, binary, length);
919 }
920
921 GL_APICALL void GL_APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
922 {
923         return es2::ShaderSource(shader, count, string, length);
924 }
925
926 GL_APICALL void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
927 {
928         return es2::StencilFunc(func, ref, mask);
929 }
930
931 GL_APICALL void GL_APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
932 {
933         return es2::StencilFuncSeparate(face, func, ref, mask);
934 }
935
936 GL_APICALL void GL_APIENTRY glStencilMask(GLuint mask)
937 {
938         return es2::StencilMask(mask);
939 }
940
941 GL_APICALL void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask)
942 {
943         return es2::StencilMaskSeparate(face, mask);
944 }
945
946 GL_APICALL void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
947 {
948         return es2::StencilOp(fail, zfail, zpass);
949 }
950
951 GL_APICALL void GL_APIENTRY glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
952 {
953         return es2::StencilOpSeparate(face, fail, zfail, zpass);
954 }
955
956 GLboolean GL_APIENTRY glTestFenceNV(GLuint fence)
957 {
958         return es2::TestFenceNV(fence);
959 }
960
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)
963 {
964         return es2::TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
965 }
966
967 GL_APICALL void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
968 {
969         return es2::TexParameterf(target, pname, param);
970 }
971
972 GL_APICALL void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
973 {
974         return es2::TexParameterfv(target, pname, params);
975 }
976
977 GL_APICALL void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
978 {
979         return es2::TexParameteri(target, pname, param);
980 }
981
982 GL_APICALL void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
983 {
984         return es2::TexParameteriv(target, pname, params);
985 }
986
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)
989 {
990         return es2::TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
991 }
992
993 GL_APICALL void GL_APIENTRY glUniform1f(GLint location, GLfloat x)
994 {
995         return es2::Uniform1f(location, x);
996 }
997
998 GL_APICALL void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
999 {
1000         return es2::Uniform1fv(location, count, v);
1001 }
1002
1003 GL_APICALL void GL_APIENTRY glUniform1i(GLint location, GLint x)
1004 {
1005         return es2::Uniform1i(location, x);
1006 }
1007
1008 GL_APICALL void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v)
1009 {
1010         return es2::Uniform1iv(location, count, v);
1011 }
1012
1013 GL_APICALL void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y)
1014 {
1015         return es2::Uniform2f(location, x, y);
1016 }
1017
1018 GL_APICALL void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
1019 {
1020         return es2::Uniform2fv(location, count, v);
1021 }
1022
1023 GL_APICALL void GL_APIENTRY glUniform2i(GLint location, GLint x, GLint y)
1024 {
1025         return es2::Uniform2i(location, x, y);
1026 }
1027
1028 GL_APICALL void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v)
1029 {
1030         return es2::Uniform2iv(location, count, v);
1031 }
1032
1033 GL_APICALL void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
1034 {
1035         return es2::Uniform3f(location, x, y, z);
1036 }
1037
1038 GL_APICALL void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
1039 {
1040         return es2::Uniform3fv(location, count, v);
1041 }
1042
1043 GL_APICALL void GL_APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z)
1044 {
1045         return es2::Uniform3i(location, x, y, z);
1046 }
1047
1048 GL_APICALL void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v)
1049 {
1050         return es2::Uniform3iv(location, count, v);
1051 }
1052
1053 GL_APICALL void GL_APIENTRY glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1054 {
1055         return es2::Uniform4f(location, x, y, z, w);
1056 }
1057
1058 GL_APICALL void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
1059 {
1060         return es2::Uniform4fv(location, count, v);
1061 }
1062
1063 GL_APICALL void GL_APIENTRY glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
1064 {
1065         return es2::Uniform4i(location, x, y, z, w);
1066 }
1067
1068 GL_APICALL void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v)
1069 {
1070         return es2::Uniform4iv(location, count, v);
1071 }
1072
1073 GL_APICALL void GL_APIENTRY glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1074 {
1075         return es2::UniformMatrix2fv(location, count, transpose, value);
1076 }
1077
1078 GL_APICALL void GL_APIENTRY glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1079 {
1080         return es2::UniformMatrix3fv(location, count, transpose, value);
1081 }
1082
1083 GL_APICALL void GL_APIENTRY glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1084 {
1085         return es2::UniformMatrix4fv(location, count, transpose, value);
1086 }
1087
1088 GL_APICALL void GL_APIENTRY glUseProgram(GLuint program)
1089 {
1090         return es2::UseProgram(program);
1091 }
1092
1093 GL_APICALL void GL_APIENTRY glValidateProgram(GLuint program)
1094 {
1095         return es2::ValidateProgram(program);
1096 }
1097
1098 GL_APICALL void GL_APIENTRY glVertexAttrib1f(GLuint index, GLfloat x)
1099 {
1100         return es2::VertexAttrib1f(index, x);
1101 }
1102
1103 GL_APICALL void GL_APIENTRY glVertexAttrib1fv(GLuint index, const GLfloat* values)
1104 {
1105         return es2::VertexAttrib1fv(index, values);
1106 }
1107
1108 GL_APICALL void GL_APIENTRY glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
1109 {
1110         return es2::VertexAttrib2f(index, x, y);
1111 }
1112
1113 GL_APICALL void GL_APIENTRY glVertexAttrib2fv(GLuint index, const GLfloat* values)
1114 {
1115         return es2::VertexAttrib2fv(index, values);
1116 }
1117
1118 GL_APICALL void GL_APIENTRY glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
1119 {
1120         return es2::VertexAttrib3f(index, x, y, z);
1121 }
1122
1123 GL_APICALL void GL_APIENTRY glVertexAttrib3fv(GLuint index, const GLfloat* values)
1124 {
1125         return es2::VertexAttrib3fv(index, values);
1126 }
1127
1128 GL_APICALL void GL_APIENTRY glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1129 {
1130         return es2::VertexAttrib4f(index, x, y, z, w);
1131 }
1132
1133 GL_APICALL void GL_APIENTRY glVertexAttrib4fv(GLuint index, const GLfloat* values)
1134 {
1135         return es2::VertexAttrib4fv(index, values);
1136 }
1137
1138 GL_APICALL void GL_APIENTRY glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
1139 {
1140         return es2::VertexAttribPointer(index, size, type, normalized, stride, ptr);
1141 }
1142
1143 GL_APICALL void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
1144 {
1145         return es2::Viewport(x, y, width, height);
1146 }
1147
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)
1149 {
1150         return es2::BlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
1151 }
1152
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)
1155 {
1156         return es2::BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
1157 }
1158
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)
1161 {
1162         return es2::TexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
1163 }
1164
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)
1166 {
1167         return es2::TexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
1168 }
1169
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)
1171 {
1172         return es2::CopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
1173 }
1174
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)
1176 {
1177         return es2::CompressedTexImage3DOES(target, level,internalformat, width, height, depth, border, imageSize, data);
1178 }
1179
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)
1181 {
1182         return es2::CompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
1183 }
1184
1185 GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
1186 {
1187         return es2::FramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
1188 }
1189
1190 GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
1191 {
1192         return es2::EGLImageTargetTexture2DOES(target, image);
1193 }
1194
1195 GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
1196 {
1197         return es2::EGLImageTargetRenderbufferStorageOES(target, image);
1198 }
1199
1200 GL_APICALL void GL_APIENTRY glDrawBuffersEXT(GLsizei n, const GLenum *bufs)
1201 {
1202         return es2::DrawBuffersEXT(n, bufs);
1203 }
1204
1205 void GL_APIENTRY Register(const char *licenseKey)
1206 {
1207         // Nothing to do, SwiftShader is open-source
1208 }
1209 }
1210
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);
1217
1218 LibGLESv2exports::LibGLESv2exports()
1219 {
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;
1414
1415         this->es2CreateContext = ::es2CreateContext;
1416         this->es2GetProcAddress = ::es2GetProcAddress;
1417         this->createBackBuffer = ::createBackBuffer;
1418         this->createBackBufferFromClientBuffer = ::createBackBufferFromClientBuffer;
1419         this->createDepthStencil = ::createDepthStencil;
1420         this->createFrameBuffer = ::createFrameBuffer;
1421 }
1422
1423 extern "C" GL_APICALL LibGLESv2exports *libGLESv2_swiftshader()
1424 {
1425         static LibGLESv2exports libGLESv2;
1426         return &libGLESv2;
1427 }
1428
1429 LibEGL libEGL(getLibraryDirectoryFromSymbol((void*)libGLESv2_swiftshader));
1430 LibGLES_CM libGLES_CM(getLibraryDirectoryFromSymbol((void*)libGLESv2_swiftshader));