blob: 3e6021ce47e6c7c046fdf05010b81479897868ce [file] [log] [blame]
Nicolas Capens0bac2852016-05-07 06:09:58 -04001// 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// main.cpp: DLL entry point and management of thread-local data.
16
17#include "main.h"
18
19#include "libGLESv2.hpp"
20#include "Framebuffer.h"
21#include "libEGL/main.h"
Nicolas Capens31c07a32017-06-13 23:44:13 -040022#include "common/Surface.hpp"
Nicolas Capens0bac2852016-05-07 06:09:58 -040023#include "Common/Thread.hpp"
24#include "Common/SharedLibrary.hpp"
25#include "common/debug.h"
26
27#if !defined(_MSC_VER)
28#define CONSTRUCTOR __attribute__((constructor))
29#define DESTRUCTOR __attribute__((destructor))
30#else
31#define CONSTRUCTOR
32#define DESTRUCTOR
33#endif
34
35static void glAttachThread()
36{
37 TRACE("()");
38}
39
40static void glDetachThread()
41{
42 TRACE("()");
43}
44
45CONSTRUCTOR static void glAttachProcess()
46{
47 TRACE("()");
48
49 glAttachThread();
50}
51
52DESTRUCTOR static void glDetachProcess()
53{
54 TRACE("()");
55
56 glDetachThread();
57}
58
59#if defined(_WIN32)
60extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
61{
62 switch(reason)
63 {
64 case DLL_PROCESS_ATTACH:
65 glAttachProcess();
66 break;
67 case DLL_THREAD_ATTACH:
68 glAttachThread();
69 break;
70 case DLL_THREAD_DETACH:
71 glDetachThread();
72 break;
73 case DLL_PROCESS_DETACH:
74 glDetachProcess();
75 break;
76 default:
77 break;
78 }
79
80 return TRUE;
81}
82#endif
83
84namespace es2
85{
86es2::Context *getContext()
87{
88 egl::Context *context = libEGL->clientGetCurrentContext();
89
90 if(context && (context->getClientVersion() == 2 ||
91 context->getClientVersion() == 3))
92 {
93 return static_cast<es2::Context*>(context);
94 }
95
Nicolas Capens81aa97b2017-06-27 17:08:08 -040096 return nullptr;
Nicolas Capens0bac2852016-05-07 06:09:58 -040097}
98
99Device *getDevice()
100{
101 Context *context = getContext();
102
Nicolas Capens81aa97b2017-06-27 17:08:08 -0400103 return context ? context->getDevice() : nullptr;
Nicolas Capens0bac2852016-05-07 06:09:58 -0400104}
105
106// Records an error code
107void error(GLenum errorCode)
108{
109 es2::Context *context = es2::getContext();
110
111 if(context)
112 {
113 switch(errorCode)
114 {
115 case GL_INVALID_ENUM:
116 context->recordInvalidEnum();
117 TRACE("\t! Error generated: invalid enum\n");
118 break;
119 case GL_INVALID_VALUE:
120 context->recordInvalidValue();
121 TRACE("\t! Error generated: invalid value\n");
122 break;
123 case GL_INVALID_OPERATION:
124 context->recordInvalidOperation();
125 TRACE("\t! Error generated: invalid operation\n");
126 break;
127 case GL_OUT_OF_MEMORY:
128 context->recordOutOfMemory();
129 TRACE("\t! Error generated: out of memory\n");
130 break;
131 case GL_INVALID_FRAMEBUFFER_OPERATION:
132 context->recordInvalidFramebufferOperation();
133 TRACE("\t! Error generated: invalid framebuffer operation\n");
134 break;
135 default: UNREACHABLE(errorCode);
136 }
137 }
138}
139}
140
141namespace egl
142{
143GLint getClientVersion()
144{
145 Context *context = libEGL->clientGetCurrentContext();
146
147 return context ? context->getClientVersion() : 0;
148}
149}
150
151namespace es2
152{
153void ActiveTexture(GLenum texture);
154void AttachShader(GLuint program, GLuint shader);
155void BeginQueryEXT(GLenum target, GLuint name);
156void BindAttribLocation(GLuint program, GLuint index, const GLchar* name);
157void BindBuffer(GLenum target, GLuint buffer);
158void BindFramebuffer(GLenum target, GLuint framebuffer);
159void BindRenderbuffer(GLenum target, GLuint renderbuffer);
160void BindTexture(GLenum target, GLuint texture);
161void BlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
162void BlendEquation(GLenum mode);
163void BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
164void BlendFunc(GLenum sfactor, GLenum dfactor);
165void BlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
166void BufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
167void BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
168GLenum CheckFramebufferStatus(GLenum target);
169void Clear(GLbitfield mask);
170void ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
171void ClearDepthf(GLclampf depth);
172void ClearStencil(GLint s);
173void ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
174void CompileShader(GLuint shader);
175void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
176 GLint border, GLsizei imageSize, const GLvoid* data);
177void CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
178 GLenum format, GLsizei imageSize, const GLvoid* data);
179void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
180void CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
181GLuint CreateProgram(void);
182GLuint CreateShader(GLenum type);
183void CullFace(GLenum mode);
184void DeleteBuffers(GLsizei n, const GLuint* buffers);
185void DeleteFencesNV(GLsizei n, const GLuint* fences);
186void DeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
187void DeleteProgram(GLuint program);
188void DeleteQueriesEXT(GLsizei n, const GLuint *ids);
189void DeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
190void DeleteShader(GLuint shader);
191void DeleteTextures(GLsizei n, const GLuint* textures);
192void DepthFunc(GLenum func);
193void DepthMask(GLboolean flag);
194void DepthRangef(GLclampf zNear, GLclampf zFar);
195void DetachShader(GLuint program, GLuint shader);
196void Disable(GLenum cap);
197void DisableVertexAttribArray(GLuint index);
198void DrawArrays(GLenum mode, GLint first, GLsizei count);
199void DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
200void DrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
201void DrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
202void VertexAttribDivisorEXT(GLuint index, GLuint divisor);
203void DrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount);
204void DrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount);
205void VertexAttribDivisorANGLE(GLuint index, GLuint divisor);
206void Enable(GLenum cap);
207void EnableVertexAttribArray(GLuint index);
208void EndQueryEXT(GLenum target);
209void FinishFenceNV(GLuint fence);
210void Finish(void);
211void Flush(void);
212void FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
213void FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
214void FrontFace(GLenum mode);
215void GenBuffers(GLsizei n, GLuint* buffers);
216void GenerateMipmap(GLenum target);
217void GenFencesNV(GLsizei n, GLuint* fences);
218void GenFramebuffers(GLsizei n, GLuint* framebuffers);
219void GenQueriesEXT(GLsizei n, GLuint* ids);
220void GenRenderbuffers(GLsizei n, GLuint* renderbuffers);
221void GenTextures(GLsizei n, GLuint* textures);
222void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
223void GetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
224void GetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
225int GetAttribLocation(GLuint program, const GLchar* name);
226void GetBooleanv(GLenum pname, GLboolean* params);
227void GetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
228GLenum GetError(void);
229void GetFenceivNV(GLuint fence, GLenum pname, GLint *params);
230void GetFloatv(GLenum pname, GLfloat* params);
231void GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
232GLenum GetGraphicsResetStatusEXT(void);
233void GetIntegerv(GLenum pname, GLint* params);
234void GetProgramiv(GLuint program, GLenum pname, GLint* params);
235void GetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
236void GetQueryivEXT(GLenum target, GLenum pname, GLint *params);
237void GetQueryObjectuivEXT(GLuint name, GLenum pname, GLuint *params);
238void GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
239void GetShaderiv(GLuint shader, GLenum pname, GLint* params);
240void GetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
241void GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
242void GetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
243const GLubyte* GetString(GLenum name);
244void GetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
245void GetTexParameteriv(GLenum target, GLenum pname, GLint* params);
246void GetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params);
247void GetUniformfv(GLuint program, GLint location, GLfloat* params);
248void GetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params);
249void GetUniformiv(GLuint program, GLint location, GLint* params);
250int GetUniformLocation(GLuint program, const GLchar* name);
251void GetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
252void GetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
253void GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
254void Hint(GLenum target, GLenum mode);
255GLboolean IsBuffer(GLuint buffer);
256GLboolean IsEnabled(GLenum cap);
257GLboolean IsFenceNV(GLuint fence);
258GLboolean IsFramebuffer(GLuint framebuffer);
259GLboolean IsProgram(GLuint program);
260GLboolean IsQueryEXT(GLuint name);
261GLboolean IsRenderbuffer(GLuint renderbuffer);
262GLboolean IsShader(GLuint shader);
263GLboolean IsTexture(GLuint texture);
264void LineWidth(GLfloat width);
265void LinkProgram(GLuint program);
266void PixelStorei(GLenum pname, GLint param);
267void PolygonOffset(GLfloat factor, GLfloat units);
268void ReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height,
269 GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
270void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
271void ReleaseShaderCompiler(void);
Nicolas Capens400667e2017-03-29 14:40:14 -0400272void RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
Nicolas Capens0bac2852016-05-07 06:09:58 -0400273void RenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
274void RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
275void SampleCoverage(GLclampf value, GLboolean invert);
276void SetFenceNV(GLuint fence, GLenum condition);
277void Scissor(GLint x, GLint y, GLsizei width, GLsizei height);
278void ShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
279void ShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length);
280void StencilFunc(GLenum func, GLint ref, GLuint mask);
281void StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
282void StencilMask(GLuint mask);
283void StencilMaskSeparate(GLenum face, GLuint mask);
284void StencilOp(GLenum fail, GLenum zfail, GLenum zpass);
285void StencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
286GLboolean TestFenceNV(GLuint fence);
287void TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
288 GLint border, GLenum format, GLenum type, const GLvoid* pixels);
289void TexParameterf(GLenum target, GLenum pname, GLfloat param);
290void TexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
291void TexParameteri(GLenum target, GLenum pname, GLint param);
292void TexParameteriv(GLenum target, GLenum pname, const GLint* params);
293void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
294 GLenum format, GLenum type, const GLvoid* pixels);
295void Uniform1f(GLint location, GLfloat x);
296void Uniform1fv(GLint location, GLsizei count, const GLfloat* v);
297void Uniform1i(GLint location, GLint x);
298void Uniform1iv(GLint location, GLsizei count, const GLint* v);
299void Uniform2f(GLint location, GLfloat x, GLfloat y);
300void Uniform2fv(GLint location, GLsizei count, const GLfloat* v);
301void Uniform2i(GLint location, GLint x, GLint y);
302void Uniform2iv(GLint location, GLsizei count, const GLint* v);
303void Uniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
304void Uniform3fv(GLint location, GLsizei count, const GLfloat* v);
305void Uniform3i(GLint location, GLint x, GLint y, GLint z);
306void Uniform3iv(GLint location, GLsizei count, const GLint* v);
307void Uniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
308void Uniform4fv(GLint location, GLsizei count, const GLfloat* v);
309void Uniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
310void Uniform4iv(GLint location, GLsizei count, const GLint* v);
311void UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
312void UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
313void UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
314void UseProgram(GLuint program);
315void ValidateProgram(GLuint program);
316void VertexAttrib1f(GLuint index, GLfloat x);
317void VertexAttrib1fv(GLuint index, const GLfloat* values);
318void VertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
319void VertexAttrib2fv(GLuint index, const GLfloat* values);
320void VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
321void VertexAttrib3fv(GLuint index, const GLfloat* values);
322void VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
323void VertexAttrib4fv(GLuint index, const GLfloat* values);
324GL_APICALL void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
325GL_APICALL void Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
326GL_APICALL void BlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
327GL_APICALL void BlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
328 GLbitfield mask, GLenum filter);
329GL_APICALL void TexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
330 GLint border, GLenum format, GLenum type, const GLvoid* pixels);
331GL_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);
332GL_APICALL void CopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
333GL_APICALL void CompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
334GL_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);
335GL_APICALL void FramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
336GL_APICALL void EGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
337GL_APICALL void EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
338GL_APICALL GLboolean IsRenderbufferOES(GLuint renderbuffer);
339GL_APICALL void BindRenderbufferOES(GLenum target, GLuint renderbuffer);
340GL_APICALL void DeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers);
341GL_APICALL void GenRenderbuffersOES(GLsizei n, GLuint* renderbuffers);
342GL_APICALL void RenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
343GL_APICALL void GetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params);
344GL_APICALL GLboolean IsFramebufferOES(GLuint framebuffer);
345GL_APICALL void BindFramebufferOES(GLenum target, GLuint framebuffer);
346GL_APICALL void DeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers);
347GL_APICALL void GenFramebuffersOES(GLsizei n, GLuint* framebuffers);
348GL_APICALL GLenum CheckFramebufferStatusOES(GLenum target);
349GL_APICALL void FramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
350GL_APICALL void FramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
351GL_APICALL void GetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params);
352GL_APICALL void GenerateMipmapOES(GLenum target);
353GL_APICALL void DrawBuffersEXT(GLsizei n, const GLenum *bufs);
354}
355
356extern "C"
357{
358GL_APICALL void GL_APIENTRY glActiveTexture(GLenum texture)
359{
360 return es2::ActiveTexture(texture);
361}
362
363GL_APICALL void GL_APIENTRY glAttachShader(GLuint program, GLuint shader)
364{
365 return es2::AttachShader(program, shader);
366}
367
368GL_APICALL void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint name)
369{
370 return es2::BeginQueryEXT(target, name);
371}
372
373GL_APICALL void GL_APIENTRY glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
374{
375 return es2::BindAttribLocation(program, index, name);
376}
377
378GL_APICALL void GL_APIENTRY glBindBuffer(GLenum target, GLuint buffer)
379{
380 return es2::BindBuffer(target, buffer);
381}
382
383GL_APICALL void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
384{
385 return es2::BindFramebuffer(target, framebuffer);
386}
387
388GL_APICALL void GL_APIENTRY glBindFramebufferOES(GLenum target, GLuint framebuffer)
389{
390 return es2::BindFramebuffer(target, framebuffer);
391}
392
393GL_APICALL void GL_APIENTRY glBindRenderbuffer(GLenum target, GLuint renderbuffer)
394{
395 return es2::BindRenderbuffer(target, renderbuffer);
396}
397
398GL_APICALL void GL_APIENTRY glBindRenderbufferOES(GLenum target, GLuint renderbuffer)
399{
400 return es2::BindRenderbuffer(target, renderbuffer);
401}
402
403GL_APICALL void GL_APIENTRY glBindTexture(GLenum target, GLuint texture)
404{
405 return es2::BindTexture(target, texture);
406}
407
408GL_APICALL void GL_APIENTRY glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
409{
410 return es2::BlendColor(red, green, blue, alpha);
411}
412
413GL_APICALL void GL_APIENTRY glBlendEquation(GLenum mode)
414{
415 return es2::BlendEquation(mode);
416}
417
418GL_APICALL void GL_APIENTRY glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
419{
420 return es2::BlendEquationSeparate(modeRGB, modeAlpha);
421}
422
423GL_APICALL void GL_APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
424{
425 return es2::BlendFunc(sfactor, dfactor);
426}
427
428GL_APICALL void GL_APIENTRY glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
429{
430 return es2::BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
431}
432
433GL_APICALL void GL_APIENTRY glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
434{
435 return es2::BufferData(target, size, data, usage);
436}
437
438GL_APICALL void GL_APIENTRY glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
439{
440 return es2::BufferSubData(target, offset, size, data);
441}
442
443GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus(GLenum target)
444{
445 return es2::CheckFramebufferStatus(target);
446}
447
448GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatusOES(GLenum target)
449{
450 return es2::CheckFramebufferStatus(target);
451}
452
453GL_APICALL void GL_APIENTRY glClear(GLbitfield mask)
454{
455 return es2::Clear(mask);
456}
457
458GL_APICALL void GL_APIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
459{
460 return es2::ClearColor(red, green, blue, alpha);
461}
462
463GL_APICALL void GL_APIENTRY glClearDepthf(GLclampf depth)
464{
465 return es2::ClearDepthf(depth);
466}
467
468GL_APICALL void GL_APIENTRY glClearStencil(GLint s)
469{
470 return es2::ClearStencil(s);
471}
472
473GL_APICALL void GL_APIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
474{
475 return es2::ColorMask(red, green, blue, alpha);
476}
477
478GL_APICALL void GL_APIENTRY glCompileShader(GLuint shader)
479{
480 return es2::CompileShader(shader);
481}
482
483GL_APICALL void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
484 GLint border, GLsizei imageSize, const GLvoid* data)
485{
486 return es2::CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
487}
488
489GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
490 GLenum format, GLsizei imageSize, const GLvoid* data)
491{
492 return es2::CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
493}
494
495GL_APICALL void GL_APIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
496{
497 return es2::CopyTexImage2D(target, level, internalformat, x, y, width, height, border);
498}
499
500GL_APICALL void GL_APIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
501{
502 return es2::CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
503}
504
505GL_APICALL GLuint GL_APIENTRY glCreateProgram(void)
506{
507 return es2::CreateProgram();
508}
509
510GL_APICALL GLuint GL_APIENTRY glCreateShader(GLenum type)
511{
512 return es2::CreateShader(type);
513}
514
515GL_APICALL void GL_APIENTRY glCullFace(GLenum mode)
516{
517 return es2::CullFace(mode);
518}
519
520GL_APICALL void GL_APIENTRY glDeleteBuffers(GLsizei n, const GLuint* buffers)
521{
522 return es2::DeleteBuffers(n, buffers);
523}
524
525GL_APICALL void GL_APIENTRY glDeleteFencesNV(GLsizei n, const GLuint* fences)
526{
527 return es2::DeleteFencesNV(n, fences);
528}
529
530GL_APICALL void GL_APIENTRY glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
531{
532 return es2::DeleteFramebuffers(n, framebuffers);
533}
534
535GL_APICALL void GL_APIENTRY glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers)
536{
537 return es2::DeleteFramebuffers(n, framebuffers);
538}
539
540GL_APICALL void GL_APIENTRY glDeleteProgram(GLuint program)
541{
542 return es2::DeleteProgram(program);
543}
544
545GL_APICALL void GL_APIENTRY glDeleteQueriesEXT(GLsizei n, const GLuint *ids)
546{
547 return es2::DeleteQueriesEXT(n, ids);
548}
549
550GL_APICALL void GL_APIENTRY glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
551{
552 return es2::DeleteRenderbuffers(n, renderbuffers);
553}
554
555GL_APICALL void GL_APIENTRY glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers)
556{
557 return es2::DeleteRenderbuffers(n, renderbuffers);
558}
559
560GL_APICALL void GL_APIENTRY glDeleteShader(GLuint shader)
561{
562 return es2::DeleteShader(shader);
563}
564
565GL_APICALL void GL_APIENTRY glDeleteTextures(GLsizei n, const GLuint* textures)
566{
567 return es2::DeleteTextures(n, textures);
568}
569
570GL_APICALL void GL_APIENTRY glDepthFunc(GLenum func)
571{
572 return es2::DepthFunc(func);
573}
574
575GL_APICALL void GL_APIENTRY glDepthMask(GLboolean flag)
576{
577 return es2::DepthMask(flag);
578}
579
580GL_APICALL void GL_APIENTRY glDepthRangef(GLclampf zNear, GLclampf zFar)
581{
582 return es2::DepthRangef(zNear, zFar);
583}
584
585GL_APICALL void GL_APIENTRY glDetachShader(GLuint program, GLuint shader)
586{
587 return es2::DetachShader(program, shader);
588}
589
590GL_APICALL void GL_APIENTRY glDisable(GLenum cap)
591{
592 return es2::Disable(cap);
593}
594
595GL_APICALL void GL_APIENTRY glDisableVertexAttribArray(GLuint index)
596{
597 return es2::DisableVertexAttribArray(index);
598}
599
600GL_APICALL void GL_APIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count)
601{
602 return es2::DrawArrays(mode, first, count);
603}
604
605GL_APICALL void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
606{
607 return es2::DrawElements(mode, count, type, indices);
608}
609
610GL_APICALL void GL_APIENTRY glDrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
611{
612 return es2::DrawArraysInstancedEXT(mode, first, count, instanceCount);
613}
614
615GL_APICALL void GL_APIENTRY glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
616{
617 return es2::DrawElementsInstancedEXT(mode, count, type, indices, instanceCount);
618}
619
620GL_APICALL void GL_APIENTRY glVertexAttribDivisorEXT(GLuint index, GLuint divisor)
621{
622 return es2::VertexAttribDivisorEXT(index, divisor);
623}
624
625GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount)
626{
627 return es2::DrawArraysInstancedANGLE(mode, first, count, instanceCount);
628}
629
630GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instanceCount)
631{
632 return es2::DrawElementsInstancedANGLE(mode, count, type, indices, instanceCount);
633}
634
635GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor)
636{
637 return es2::VertexAttribDivisorANGLE(index, divisor);
638}
639
640GL_APICALL void GL_APIENTRY glEnable(GLenum cap)
641{
642 return es2::Enable(cap);
643}
644
645GL_APICALL void GL_APIENTRY glEnableVertexAttribArray(GLuint index)
646{
647 return es2::EnableVertexAttribArray(index);
648}
649
650GL_APICALL void GL_APIENTRY glEndQueryEXT(GLenum target)
651{
652 return es2::EndQueryEXT(target);
653}
654
655GL_APICALL void GL_APIENTRY glFinishFenceNV(GLuint fence)
656{
657 return es2::FinishFenceNV(fence);
658}
659
660GL_APICALL void GL_APIENTRY glFinish(void)
661{
662 return es2::Finish();
663}
664
665GL_APICALL void GL_APIENTRY glFlush(void)
666{
667 return es2::Flush();
668}
669
670GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
671{
672 return es2::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
673}
674
675GL_APICALL void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
676{
677 return es2::FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
678}
679
680GL_APICALL void GL_APIENTRY glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
681{
682 return es2::FramebufferTexture2D(target, attachment, textarget, texture, level);
683}
684
685GL_APICALL void GL_APIENTRY glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
686{
687 return es2::FramebufferTexture2D(target, attachment, textarget, texture, level);
688}
689
690GL_APICALL void GL_APIENTRY glFrontFace(GLenum mode)
691{
692 return es2::FrontFace(mode);
693}
694
695GL_APICALL void GL_APIENTRY glGenBuffers(GLsizei n, GLuint* buffers)
696{
697 return es2::GenBuffers(n, buffers);
698}
699
700GL_APICALL void GL_APIENTRY glGenerateMipmap(GLenum target)
701{
702 return es2::GenerateMipmap(target);
703}
704
705GL_APICALL void GL_APIENTRY glGenerateMipmapOES(GLenum target)
706{
707 return es2::GenerateMipmap(target);
708}
709
710GL_APICALL void GL_APIENTRY glGenFencesNV(GLsizei n, GLuint* fences)
711{
712 return es2::GenFencesNV(n, fences);
713}
714
715GL_APICALL void GL_APIENTRY glGenFramebuffers(GLsizei n, GLuint* framebuffers)
716{
717 return es2::GenFramebuffers(n, framebuffers);
718}
719
720GL_APICALL void GL_APIENTRY glGenFramebuffersOES(GLsizei n, GLuint* framebuffers)
721{
722 return es2::GenFramebuffers(n, framebuffers);
723}
724
725GL_APICALL void GL_APIENTRY glGenQueriesEXT(GLsizei n, GLuint* ids)
726{
727 return es2::GenQueriesEXT(n, ids);
728}
729
730GL_APICALL void GL_APIENTRY glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
731{
732 return es2::GenRenderbuffers(n, renderbuffers);
733}
734
735GL_APICALL void GL_APIENTRY glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers)
736{
737 return es2::GenRenderbuffers(n, renderbuffers);
738}
739
740GL_APICALL void GL_APIENTRY glGenTextures(GLsizei n, GLuint* textures)
741{
742 return es2::GenTextures(n, textures);
743}
744
745GL_APICALL void GL_APIENTRY glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
746{
747 return es2::GetActiveAttrib(program, index, bufsize, length, size, type, name);
748}
749
750GL_APICALL void GL_APIENTRY glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
751{
752 return es2::GetActiveUniform(program, index, bufsize, length, size, type, name);
753}
754
755GL_APICALL void GL_APIENTRY glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
756{
757 return es2::GetAttachedShaders(program, maxcount, count, shaders);
758}
759
760GL_APICALL int GL_APIENTRY glGetAttribLocation(GLuint program, const GLchar* name)
761{
762 return es2::GetAttribLocation(program, name);
763}
764
765GL_APICALL void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params)
766{
767 return es2::GetBooleanv(pname, params);
768}
769
770GL_APICALL void GL_APIENTRY glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
771{
772 return es2::GetBufferParameteriv(target, pname, params);
773}
774
775GL_APICALL GLenum GL_APIENTRY glGetError(void)
776{
777 return es2::GetError();
778}
779
780GL_APICALL void GL_APIENTRY glGetFenceivNV(GLuint fence, GLenum pname, GLint *params)
781{
782 return es2::GetFenceivNV(fence, pname, params);
783}
784
785GL_APICALL void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params)
786{
787 return es2::GetFloatv(pname, params);
788}
789
790GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
791{
792 return es2::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
793}
794
795GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params)
796{
797 return es2::GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
798}
799
800GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT(void)
801{
802 return es2::GetGraphicsResetStatusEXT();
803}
804
805GL_APICALL void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params)
806{
807 return es2::GetIntegerv(pname, params);
808}
809
810GL_APICALL void GL_APIENTRY glGetProgramiv(GLuint program, GLenum pname, GLint* params)
811{
812 return es2::GetProgramiv(program, pname, params);
813}
814
815GL_APICALL void GL_APIENTRY glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
816{
817 return es2::GetProgramInfoLog(program, bufsize, length, infolog);
818}
819
820GL_APICALL void GL_APIENTRY glGetQueryivEXT(GLenum target, GLenum pname, GLint *params)
821{
822 return es2::GetQueryivEXT(target, pname, params);
823}
824
825GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT(GLuint name, GLenum pname, GLuint *params)
826{
827 return es2::GetQueryObjectuivEXT(name, pname, params);
828}
829
830GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
831{
832 return es2::GetRenderbufferParameteriv(target, pname, params);
833}
834
835GL_APICALL void GL_APIENTRY glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params)
836{
837 return es2::GetRenderbufferParameteriv(target, pname, params);
838}
839
840GL_APICALL void GL_APIENTRY glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
841{
842 return es2::GetShaderiv(shader, pname, params);
843}
844
845GL_APICALL void GL_APIENTRY glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
846{
847 return es2::GetShaderInfoLog(shader, bufsize, length, infolog);
848}
849
850GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
851{
852 return es2::GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
853}
854
855GL_APICALL void GL_APIENTRY glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
856{
857 return es2::GetShaderSource(shader, bufsize, length, source);
858}
859
860GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name)
861{
862 return es2::GetString(name);
863}
864
865GL_APICALL void GL_APIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
866{
867 return es2::GetTexParameterfv(target, pname, params);
868}
869
870GL_APICALL void GL_APIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
871{
872 return es2::GetTexParameteriv(target, pname, params);
873}
874
875GL_APICALL void GL_APIENTRY glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat* params)
876{
877 return es2::GetnUniformfvEXT(program, location, bufSize, params);
878}
879
880GL_APICALL void GL_APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat* params)
881{
882 return es2::GetUniformfv(program, location, params);
883}
884
885GL_APICALL void GL_APIENTRY glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params)
886{
887 return es2::GetnUniformivEXT(program, location, bufSize, params);
888}
889
890GL_APICALL void GL_APIENTRY glGetUniformiv(GLuint program, GLint location, GLint* params)
891{
892 return es2::GetUniformiv(program, location, params);
893}
894
895GL_APICALL int GL_APIENTRY glGetUniformLocation(GLuint program, const GLchar* name)
896{
897 return es2::GetUniformLocation(program, name);
898}
899
900GL_APICALL void GL_APIENTRY glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
901{
902 return es2::GetVertexAttribfv(index, pname, params);
903}
904
905GL_APICALL void GL_APIENTRY glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
906{
907 return es2::GetVertexAttribiv(index, pname, params);
908}
909
910GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
911{
912 return es2::GetVertexAttribPointerv(index, pname, pointer);
913}
914
915GL_APICALL void GL_APIENTRY glHint(GLenum target, GLenum mode)
916{
917 return es2::Hint(target, mode);
918}
919
920GL_APICALL GLboolean GL_APIENTRY glIsBuffer(GLuint buffer)
921{
922 return es2::IsBuffer(buffer);
923}
924
925GL_APICALL GLboolean GL_APIENTRY glIsEnabled(GLenum cap)
926{
927 return es2::IsEnabled(cap);
928}
929
930GL_APICALL GLboolean GL_APIENTRY glIsFenceNV(GLuint fence)
931{
932 return es2::IsFenceNV(fence);
933}
934
935GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer(GLuint framebuffer)
936{
937 return es2::IsFramebuffer(framebuffer);
938}
939
940GL_APICALL GLboolean GL_APIENTRY glIsFramebufferOES(GLuint framebuffer)
941{
942 return es2::IsFramebuffer(framebuffer);
943}
944
945GL_APICALL GLboolean GL_APIENTRY glIsProgram(GLuint program)
946{
947 return es2::IsProgram(program);
948}
949
950GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT(GLuint name)
951{
952 return es2::IsQueryEXT(name);
953}
954
955GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer(GLuint renderbuffer)
956{
957 return es2::IsRenderbuffer(renderbuffer);
958}
959
960GL_APICALL GLboolean GL_APIENTRY glIsRenderbufferOES(GLuint renderbuffer)
961{
962 return es2::IsRenderbuffer(renderbuffer);
963}
964
965GL_APICALL GLboolean GL_APIENTRY glIsShader(GLuint shader)
966{
967 return es2::IsShader(shader);
968}
969
970GL_APICALL GLboolean GL_APIENTRY glIsTexture(GLuint texture)
971{
972 return es2::IsTexture(texture);
973}
974
975GL_APICALL void GL_APIENTRY glLineWidth(GLfloat width)
976{
977 return es2::LineWidth(width);
978}
979
980GL_APICALL void GL_APIENTRY glLinkProgram(GLuint program)
981{
982 return es2::LinkProgram(program);
983}
984
985GL_APICALL void GL_APIENTRY glPixelStorei(GLenum pname, GLint param)
986{
987 return es2::PixelStorei(pname, param);
988}
989
990GL_APICALL void GL_APIENTRY glPolygonOffset(GLfloat factor, GLfloat units)
991{
992 return es2::PolygonOffset(factor, units);
993}
994
995GL_APICALL void GL_APIENTRY glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height,
996 GLenum format, GLenum type, GLsizei bufSize, GLvoid *data)
997{
998 return es2::ReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
999}
1000
1001GL_APICALL void GL_APIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
1002{
1003 return es2::ReadPixels(x, y, width, height, format, type, pixels);
1004}
1005
1006GL_APICALL void GL_APIENTRY glReleaseShaderCompiler(void)
1007{
1008 return es2::ReleaseShaderCompiler();
1009}
1010
Nicolas Capens400667e2017-03-29 14:40:14 -04001011GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
1012{
1013 return es2::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
1014}
1015
Nicolas Capens0bac2852016-05-07 06:09:58 -04001016GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
1017{
1018 return es2::RenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
1019}
1020
1021GL_APICALL void GL_APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1022{
1023 return es2::RenderbufferStorage(target, internalformat, width, height);
1024}
1025
1026GL_APICALL void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1027{
1028 return es2::RenderbufferStorage(target, internalformat, width, height);
1029}
1030
1031GL_APICALL void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert)
1032{
1033 return es2::SampleCoverage(value, invert);
1034}
1035
1036GL_APICALL void GL_APIENTRY glSetFenceNV(GLuint fence, GLenum condition)
1037{
1038 return es2::SetFenceNV(fence, condition);
1039}
1040
1041GL_APICALL void GL_APIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
1042{
1043 return es2::Scissor(x, y, width, height);
1044}
1045
1046GL_APICALL void GL_APIENTRY glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
1047{
1048 return es2::ShaderBinary(n, shaders, binaryformat, binary, length);
1049}
1050
1051GL_APICALL void GL_APIENTRY glShaderSource(GLuint shader, GLsizei count, const GLchar *const *string, const GLint *length)
1052{
1053 return es2::ShaderSource(shader, count, string, length);
1054}
1055
1056GL_APICALL void GL_APIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask)
1057{
1058 return es2::StencilFunc(func, ref, mask);
1059}
1060
1061GL_APICALL void GL_APIENTRY glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
1062{
1063 return es2::StencilFuncSeparate(face, func, ref, mask);
1064}
1065
1066GL_APICALL void GL_APIENTRY glStencilMask(GLuint mask)
1067{
1068 return es2::StencilMask(mask);
1069}
1070
1071GL_APICALL void GL_APIENTRY glStencilMaskSeparate(GLenum face, GLuint mask)
1072{
1073 return es2::StencilMaskSeparate(face, mask);
1074}
1075
1076GL_APICALL void GL_APIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
1077{
1078 return es2::StencilOp(fail, zfail, zpass);
1079}
1080
1081GL_APICALL void GL_APIENTRY glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
1082{
1083 return es2::StencilOpSeparate(face, fail, zfail, zpass);
1084}
1085
1086GLboolean GL_APIENTRY glTestFenceNV(GLuint fence)
1087{
1088 return es2::TestFenceNV(fence);
1089}
1090
1091GL_APICALL void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
1092 GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1093{
1094 return es2::TexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
1095}
1096
1097GL_APICALL void GL_APIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param)
1098{
1099 return es2::TexParameterf(target, pname, param);
1100}
1101
1102GL_APICALL void GL_APIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
1103{
1104 return es2::TexParameterfv(target, pname, params);
1105}
1106
1107GL_APICALL void GL_APIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param)
1108{
1109 return es2::TexParameteri(target, pname, param);
1110}
1111
1112GL_APICALL void GL_APIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
1113{
1114 return es2::TexParameteriv(target, pname, params);
1115}
1116
1117GL_APICALL void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height,
1118 GLenum format, GLenum type, const GLvoid* pixels)
1119{
1120 return es2::TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
1121}
1122
1123GL_APICALL void GL_APIENTRY glUniform1f(GLint location, GLfloat x)
1124{
1125 return es2::Uniform1f(location, x);
1126}
1127
1128GL_APICALL void GL_APIENTRY glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
1129{
1130 return es2::Uniform1fv(location, count, v);
1131}
1132
1133GL_APICALL void GL_APIENTRY glUniform1i(GLint location, GLint x)
1134{
1135 return es2::Uniform1i(location, x);
1136}
1137
1138GL_APICALL void GL_APIENTRY glUniform1iv(GLint location, GLsizei count, const GLint* v)
1139{
1140 return es2::Uniform1iv(location, count, v);
1141}
1142
1143GL_APICALL void GL_APIENTRY glUniform2f(GLint location, GLfloat x, GLfloat y)
1144{
1145 return es2::Uniform2f(location, x, y);
1146}
1147
1148GL_APICALL void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
1149{
1150 return es2::Uniform2fv(location, count, v);
1151}
1152
1153GL_APICALL void GL_APIENTRY glUniform2i(GLint location, GLint x, GLint y)
1154{
1155 return es2::Uniform2i(location, x, y);
1156}
1157
1158GL_APICALL void GL_APIENTRY glUniform2iv(GLint location, GLsizei count, const GLint* v)
1159{
1160 return es2::Uniform2iv(location, count, v);
1161}
1162
1163GL_APICALL void GL_APIENTRY glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
1164{
1165 return es2::Uniform3f(location, x, y, z);
1166}
1167
1168GL_APICALL void GL_APIENTRY glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
1169{
1170 return es2::Uniform3fv(location, count, v);
1171}
1172
1173GL_APICALL void GL_APIENTRY glUniform3i(GLint location, GLint x, GLint y, GLint z)
1174{
1175 return es2::Uniform3i(location, x, y, z);
1176}
1177
1178GL_APICALL void GL_APIENTRY glUniform3iv(GLint location, GLsizei count, const GLint* v)
1179{
1180 return es2::Uniform3iv(location, count, v);
1181}
1182
1183GL_APICALL void GL_APIENTRY glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1184{
1185 return es2::Uniform4f(location, x, y, z, w);
1186}
1187
1188GL_APICALL void GL_APIENTRY glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
1189{
1190 return es2::Uniform4fv(location, count, v);
1191}
1192
1193GL_APICALL void GL_APIENTRY glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
1194{
1195 return es2::Uniform4i(location, x, y, z, w);
1196}
1197
1198GL_APICALL void GL_APIENTRY glUniform4iv(GLint location, GLsizei count, const GLint* v)
1199{
1200 return es2::Uniform4iv(location, count, v);
1201}
1202
1203GL_APICALL void GL_APIENTRY glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1204{
1205 return es2::UniformMatrix2fv(location, count, transpose, value);
1206}
1207
1208GL_APICALL void GL_APIENTRY glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1209{
1210 return es2::UniformMatrix3fv(location, count, transpose, value);
1211}
1212
1213GL_APICALL void GL_APIENTRY glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1214{
1215 return es2::UniformMatrix4fv(location, count, transpose, value);
1216}
1217
1218GL_APICALL void GL_APIENTRY glUseProgram(GLuint program)
1219{
1220 return es2::UseProgram(program);
1221}
1222
1223GL_APICALL void GL_APIENTRY glValidateProgram(GLuint program)
1224{
1225 return es2::ValidateProgram(program);
1226}
1227
1228GL_APICALL void GL_APIENTRY glVertexAttrib1f(GLuint index, GLfloat x)
1229{
1230 return es2::VertexAttrib1f(index, x);
1231}
1232
1233GL_APICALL void GL_APIENTRY glVertexAttrib1fv(GLuint index, const GLfloat* values)
1234{
1235 return es2::VertexAttrib1fv(index, values);
1236}
1237
1238GL_APICALL void GL_APIENTRY glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
1239{
1240 return es2::VertexAttrib2f(index, x, y);
1241}
1242
1243GL_APICALL void GL_APIENTRY glVertexAttrib2fv(GLuint index, const GLfloat* values)
1244{
1245 return es2::VertexAttrib2fv(index, values);
1246}
1247
1248GL_APICALL void GL_APIENTRY glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
1249{
1250 return es2::VertexAttrib3f(index, x, y, z);
1251}
1252
1253GL_APICALL void GL_APIENTRY glVertexAttrib3fv(GLuint index, const GLfloat* values)
1254{
1255 return es2::VertexAttrib3fv(index, values);
1256}
1257
1258GL_APICALL void GL_APIENTRY glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1259{
1260 return es2::VertexAttrib4f(index, x, y, z, w);
1261}
1262
1263GL_APICALL void GL_APIENTRY glVertexAttrib4fv(GLuint index, const GLfloat* values)
1264{
1265 return es2::VertexAttrib4fv(index, values);
1266}
1267
1268GL_APICALL void GL_APIENTRY glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
1269{
1270 return es2::VertexAttribPointer(index, size, type, normalized, stride, ptr);
1271}
1272
1273GL_APICALL void GL_APIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
1274{
1275 return es2::Viewport(x, y, width, height);
1276}
1277
1278GL_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)
1279{
1280 return es2::BlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
1281}
1282
1283GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
1284 GLbitfield mask, GLenum filter)
1285{
1286 return es2::BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
1287}
1288
1289GL_APICALL void GL_APIENTRY glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth,
1290 GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1291{
1292 return es2::TexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
1293}
1294
1295GL_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)
1296{
1297 return es2::TexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
1298}
1299
1300GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
1301{
1302 return es2::CopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
1303}
1304
1305GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)
1306{
1307 return es2::CompressedTexImage3DOES(target, level,internalformat, width, height, depth, border, imageSize, data);
1308}
1309
1310GL_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)
1311{
1312 return es2::CompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
1313}
1314
1315GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
1316{
1317 return es2::FramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
1318}
1319
1320GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
1321{
1322 return es2::EGLImageTargetTexture2DOES(target, image);
1323}
1324
1325GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
1326{
1327 return es2::EGLImageTargetRenderbufferStorageOES(target, image);
1328}
1329
1330GL_APICALL void GL_APIENTRY glDrawBuffersEXT(GLsizei n, const GLenum *bufs)
1331{
1332 return es2::DrawBuffersEXT(n, bufs);
1333}
Nicolas Capens0caecb32016-09-06 14:58:10 -04001334
1335void GL_APIENTRY Register(const char *licenseKey)
1336{
1337 // Nothing to do, SwiftShader is open-source
1338}
Nicolas Capens0bac2852016-05-07 06:09:58 -04001339}
1340
Nicolas Capensf6a377b2017-05-19 09:31:35 -04001341egl::Context *es2CreateContext(egl::Display *display, const egl::Context *shareContext, int clientVersion, const egl::Config *config);
Nicolas Capens0bac2852016-05-07 06:09:58 -04001342extern "C" __eglMustCastToProperFunctionPointerType es2GetProcAddress(const char *procname);
1343egl::Image *createBackBuffer(int width, int height, const egl::Config *config);
1344egl::Image *createDepthStencil(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard);
Nicolas Capense7e70d02016-06-07 14:40:12 -04001345sw::FrameBuffer *createFrameBuffer(void *nativeDisplay, EGLNativeWindowType window, int width, int height);
Nicolas Capens0bac2852016-05-07 06:09:58 -04001346
1347LibGLESv2exports::LibGLESv2exports()
1348{
1349 this->glActiveTexture = es2::ActiveTexture;
1350 this->glAttachShader = es2::AttachShader;
1351 this->glBeginQueryEXT = es2::BeginQueryEXT;
1352 this->glBindAttribLocation = es2::BindAttribLocation;
1353 this->glBindBuffer = es2::BindBuffer;
1354 this->glBindFramebuffer = es2::BindFramebuffer;
1355 this->glBindRenderbuffer = es2::BindRenderbuffer;
1356 this->glBindTexture = es2::BindTexture;
1357 this->glBlendColor = es2::BlendColor;
1358 this->glBlendEquation = es2::BlendEquation;
1359 this->glBlendEquationSeparate = es2::BlendEquationSeparate;
1360 this->glBlendFunc = es2::BlendFunc;
1361 this->glBlendFuncSeparate = es2::BlendFuncSeparate;
1362 this->glBufferData = es2::BufferData;
1363 this->glBufferSubData = es2::BufferSubData;
1364 this->glCheckFramebufferStatus = es2::CheckFramebufferStatus;
1365 this->glClear = es2::Clear;
1366 this->glClearColor = es2::ClearColor;
1367 this->glClearDepthf = es2::ClearDepthf;
1368 this->glClearStencil = es2::ClearStencil;
1369 this->glColorMask = es2::ColorMask;
1370 this->glCompileShader = es2::CompileShader;
1371 this->glCompressedTexImage2D = es2::CompressedTexImage2D;
1372 this->glCompressedTexSubImage2D = es2::CompressedTexSubImage2D;
1373 this->glCopyTexImage2D = es2::CopyTexImage2D;
1374 this->glCopyTexSubImage2D = es2::CopyTexSubImage2D;
1375 this->glCreateProgram = es2::CreateProgram;
1376 this->glCreateShader = es2::CreateShader;
1377 this->glCullFace = es2::CullFace;
1378 this->glDeleteBuffers = es2::DeleteBuffers;
1379 this->glDeleteFencesNV = es2::DeleteFencesNV;
1380 this->glDeleteFramebuffers = es2::DeleteFramebuffers;
1381 this->glDeleteProgram = es2::DeleteProgram;
1382 this->glDeleteQueriesEXT = es2::DeleteQueriesEXT;
1383 this->glDeleteRenderbuffers = es2::DeleteRenderbuffers;
1384 this->glDeleteShader = es2::DeleteShader;
1385 this->glDeleteTextures = es2::DeleteTextures;
1386 this->glDepthFunc = es2::DepthFunc;
1387 this->glDepthMask = es2::DepthMask;
1388 this->glDepthRangef = es2::DepthRangef;
1389 this->glDetachShader = es2::DetachShader;
1390 this->glDisable = es2::Disable;
1391 this->glDisableVertexAttribArray = es2::DisableVertexAttribArray;
1392 this->glDrawArrays = es2::DrawArrays;
1393 this->glDrawElements = es2::DrawElements;
1394 this->glDrawArraysInstancedEXT = es2::DrawArraysInstancedEXT;
1395 this->glDrawElementsInstancedEXT = es2::DrawElementsInstancedEXT;
1396 this->glVertexAttribDivisorEXT = es2::VertexAttribDivisorEXT;
1397 this->glDrawArraysInstancedANGLE = es2::DrawArraysInstancedANGLE;
1398 this->glDrawElementsInstancedANGLE = es2::DrawElementsInstancedANGLE;
1399 this->glVertexAttribDivisorANGLE = es2::VertexAttribDivisorANGLE;
1400 this->glEnable = es2::Enable;
1401 this->glEnableVertexAttribArray = es2::EnableVertexAttribArray;
1402 this->glEndQueryEXT = es2::EndQueryEXT;
1403 this->glFinishFenceNV = es2::FinishFenceNV;
1404 this->glFinish = es2::Finish;
1405 this->glFlush = es2::Flush;
1406 this->glFramebufferRenderbuffer = es2::FramebufferRenderbuffer;
1407 this->glFramebufferTexture2D = es2::FramebufferTexture2D;
1408 this->glFrontFace = es2::FrontFace;
1409 this->glGenBuffers = es2::GenBuffers;
1410 this->glGenerateMipmap = es2::GenerateMipmap;
1411 this->glGenFencesNV = es2::GenFencesNV;
1412 this->glGenFramebuffers = es2::GenFramebuffers;
1413 this->glGenQueriesEXT = es2::GenQueriesEXT;
1414 this->glGenRenderbuffers = es2::GenRenderbuffers;
1415 this->glGenTextures = es2::GenTextures;
1416 this->glGetActiveAttrib = es2::GetActiveAttrib;
1417 this->glGetActiveUniform = es2::GetActiveUniform;
1418 this->glGetAttachedShaders = es2::GetAttachedShaders;
1419 this->glGetAttribLocation = es2::GetAttribLocation;
1420 this->glGetBooleanv = es2::GetBooleanv;
1421 this->glGetBufferParameteriv = es2::GetBufferParameteriv;
1422 this->glGetError = es2::GetError;
1423 this->glGetFenceivNV = es2::GetFenceivNV;
1424 this->glGetFloatv = es2::GetFloatv;
1425 this->glGetFramebufferAttachmentParameteriv = es2::GetFramebufferAttachmentParameteriv;
1426 this->glGetGraphicsResetStatusEXT = es2::GetGraphicsResetStatusEXT;
1427 this->glGetIntegerv = es2::GetIntegerv;
1428 this->glGetProgramiv = es2::GetProgramiv;
1429 this->glGetProgramInfoLog = es2::GetProgramInfoLog;
1430 this->glGetQueryivEXT = es2::GetQueryivEXT;
1431 this->glGetQueryObjectuivEXT = es2::GetQueryObjectuivEXT;
1432 this->glGetRenderbufferParameteriv = es2::GetRenderbufferParameteriv;
1433 this->glGetShaderiv = es2::GetShaderiv;
1434 this->glGetShaderInfoLog = es2::GetShaderInfoLog;
1435 this->glGetShaderPrecisionFormat = es2::GetShaderPrecisionFormat;
1436 this->glGetShaderSource = es2::GetShaderSource;
1437 this->glGetString = es2::GetString;
1438 this->glGetTexParameterfv = es2::GetTexParameterfv;
1439 this->glGetTexParameteriv = es2::GetTexParameteriv;
1440 this->glGetnUniformfvEXT = es2::GetnUniformfvEXT;
1441 this->glGetUniformfv = es2::GetUniformfv;
1442 this->glGetnUniformivEXT = es2::GetnUniformivEXT;
1443 this->glGetUniformiv = es2::GetUniformiv;
1444 this->glGetUniformLocation = es2::GetUniformLocation;
1445 this->glGetVertexAttribfv = es2::GetVertexAttribfv;
1446 this->glGetVertexAttribiv = es2::GetVertexAttribiv;
1447 this->glGetVertexAttribPointerv = es2::GetVertexAttribPointerv;
1448 this->glHint = es2::Hint;
1449 this->glIsBuffer = es2::IsBuffer;
1450 this->glIsEnabled = es2::IsEnabled;
1451 this->glIsFenceNV = es2::IsFenceNV;
1452 this->glIsFramebuffer = es2::IsFramebuffer;
1453 this->glIsProgram = es2::IsProgram;
1454 this->glIsQueryEXT = es2::IsQueryEXT;
1455 this->glIsRenderbuffer = es2::IsRenderbuffer;
1456 this->glIsShader = es2::IsShader;
1457 this->glIsTexture = es2::IsTexture;
1458 this->glLineWidth = es2::LineWidth;
1459 this->glLinkProgram = es2::LinkProgram;
1460 this->glPixelStorei = es2::PixelStorei;
1461 this->glPolygonOffset = es2::PolygonOffset;
1462 this->glReadnPixelsEXT = es2::ReadnPixelsEXT;
1463 this->glReadPixels = es2::ReadPixels;
1464 this->glReleaseShaderCompiler = es2::ReleaseShaderCompiler;
Nicolas Capens400667e2017-03-29 14:40:14 -04001465 this->glRenderbufferStorageMultisample = es2::RenderbufferStorageMultisample;
Nicolas Capens0bac2852016-05-07 06:09:58 -04001466 this->glRenderbufferStorageMultisampleANGLE = es2::RenderbufferStorageMultisampleANGLE;
1467 this->glRenderbufferStorage = es2::RenderbufferStorage;
1468 this->glSampleCoverage = es2::SampleCoverage;
1469 this->glSetFenceNV = es2::SetFenceNV;
1470 this->glScissor = es2::Scissor;
1471 this->glShaderBinary = es2::ShaderBinary;
1472 this->glShaderSource = es2::ShaderSource;
1473 this->glStencilFunc = es2::StencilFunc;
1474 this->glStencilFuncSeparate = es2::StencilFuncSeparate;
1475 this->glStencilMask = es2::StencilMask;
1476 this->glStencilMaskSeparate = es2::StencilMaskSeparate;
1477 this->glStencilOp = es2::StencilOp;
1478 this->glStencilOpSeparate = es2::StencilOpSeparate;
1479 this->glTestFenceNV = es2::TestFenceNV;
1480 this->glTexImage2D = es2::TexImage2D;
1481 this->glTexParameterf = es2::TexParameterf;
1482 this->glTexParameterfv = es2::TexParameterfv;
1483 this->glTexParameteri = es2::TexParameteri;
1484 this->glTexParameteriv = es2::TexParameteriv;
1485 this->glTexSubImage2D = es2::TexSubImage2D;
1486 this->glUniform1f = es2::Uniform1f;
1487 this->glUniform1fv = es2::Uniform1fv;
1488 this->glUniform1i = es2::Uniform1i;
1489 this->glUniform1iv = es2::Uniform1iv;
1490 this->glUniform2f = es2::Uniform2f;
1491 this->glUniform2fv = es2::Uniform2fv;
1492 this->glUniform2i = es2::Uniform2i;
1493 this->glUniform2iv = es2::Uniform2iv;
1494 this->glUniform3f = es2::Uniform3f;
1495 this->glUniform3fv = es2::Uniform3fv;
1496 this->glUniform3i = es2::Uniform3i;
1497 this->glUniform3iv = es2::Uniform3iv;
1498 this->glUniform4f = es2::Uniform4f;
1499 this->glUniform4fv = es2::Uniform4fv;
1500 this->glUniform4i = es2::Uniform4i;
1501 this->glUniform4iv = es2::Uniform4iv;
1502 this->glUniformMatrix2fv = es2::UniformMatrix2fv;
1503 this->glUniformMatrix3fv = es2::UniformMatrix3fv;
1504 this->glUniformMatrix4fv = es2::UniformMatrix4fv;
1505 this->glUseProgram = es2::UseProgram;
1506 this->glValidateProgram = es2::ValidateProgram;
1507 this->glVertexAttrib1f = es2::VertexAttrib1f;
1508 this->glVertexAttrib1fv = es2::VertexAttrib1fv;
1509 this->glVertexAttrib2f = es2::VertexAttrib2f;
1510 this->glVertexAttrib2fv = es2::VertexAttrib2fv;
1511 this->glVertexAttrib3f = es2::VertexAttrib3f;
1512 this->glVertexAttrib3fv = es2::VertexAttrib3fv;
1513 this->glVertexAttrib4f = es2::VertexAttrib4f;
1514 this->glVertexAttrib4fv = es2::VertexAttrib4fv;
1515 this->glVertexAttribPointer = es2::VertexAttribPointer;
1516 this->glViewport = es2::Viewport;
1517 this->glBlitFramebufferNV = es2::BlitFramebufferNV;
1518 this->glBlitFramebufferANGLE = es2::BlitFramebufferANGLE;
1519 this->glTexImage3DOES = es2::TexImage3DOES;
1520 this->glTexSubImage3DOES = es2::TexSubImage3DOES;
1521 this->glCopyTexSubImage3DOES = es2::CopyTexSubImage3DOES;
1522 this->glCompressedTexImage3DOES = es2::CompressedTexImage3DOES;
1523 this->glCompressedTexSubImage3DOES = es2::CompressedTexSubImage3DOES;
1524 this->glFramebufferTexture3DOES = es2::FramebufferTexture3DOES;
1525 this->glEGLImageTargetTexture2DOES = es2::EGLImageTargetTexture2DOES;
1526 this->glEGLImageTargetRenderbufferStorageOES = es2::EGLImageTargetRenderbufferStorageOES;
1527 this->glIsRenderbufferOES = es2::IsRenderbufferOES;
1528 this->glBindRenderbufferOES = es2::BindRenderbufferOES;
1529 this->glDeleteRenderbuffersOES = es2::DeleteRenderbuffersOES;
1530 this->glGenRenderbuffersOES = es2::GenRenderbuffersOES;
1531 this->glRenderbufferStorageOES = es2::RenderbufferStorageOES;
1532 this->glGetRenderbufferParameterivOES = es2::GetRenderbufferParameterivOES;
1533 this->glIsFramebufferOES = es2::IsFramebufferOES;
1534 this->glBindFramebufferOES = es2::BindFramebufferOES;
1535 this->glDeleteFramebuffersOES = es2::DeleteFramebuffersOES;
1536 this->glGenFramebuffersOES = es2::GenFramebuffersOES;
1537 this->glCheckFramebufferStatusOES = es2::CheckFramebufferStatusOES;
1538 this->glFramebufferRenderbufferOES = es2::FramebufferRenderbufferOES;
1539 this->glFramebufferTexture2DOES = es2::FramebufferTexture2DOES;
1540 this->glGetFramebufferAttachmentParameterivOES = es2::GetFramebufferAttachmentParameterivOES;
1541 this->glGenerateMipmapOES = es2::GenerateMipmapOES;
1542 this->glDrawBuffersEXT = es2::DrawBuffersEXT;
1543
1544 this->es2CreateContext = ::es2CreateContext;
1545 this->es2GetProcAddress = ::es2GetProcAddress;
1546 this->createBackBuffer = ::createBackBuffer;
1547 this->createDepthStencil = ::createDepthStencil;
1548 this->createFrameBuffer = ::createFrameBuffer;
1549}
1550
1551extern "C" GL_APICALL LibGLESv2exports *libGLESv2_swiftshader()
1552{
1553 static LibGLESv2exports libGLESv2;
1554 return &libGLESv2;
1555}
1556
1557LibEGL libEGL;
Nicolas Capensa2308052015-04-15 16:50:21 -04001558LibGLES_CM libGLES_CM;