Imported Upstream version 0.1.0+git20131207+e452e83
[deb_libhybris.git] / hybris / glesv2 / glesv2.c
CommitLineData
d42e7319
JB
1/*
2 * Copyright (c) 2012 Carsten Munk <carsten.munk@gmail.com>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#define GL_GLEXT_PROTOTYPES
19#include <GLES2/gl2.h>
20#include <GLES2/gl2ext.h>
21#include <dlfcn.h>
22#include <stddef.h>
23#include <stdlib.h>
24
25#include <hybris/internal/binding.h>
26#include <hybris/internal/floating_point_abi.h>
27
28static void *_libglesv2 = NULL;
29
30static void (*_glActiveTexture)(GLenum texture) = NULL;
31static void (*_glAttachShader)(GLuint program, GLuint shader) = NULL;
32static void (*_glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name) = NULL;
33static void (*_glBindBuffer)(GLenum target, GLuint buffer) = NULL;
34static void (*_glBindFramebuffer)(GLenum target, GLuint framebuffer) = NULL;
35static void (*_glBindRenderbuffer)(GLenum target, GLuint renderbuffer) = NULL;
36static void (*_glBindTexture)(GLenum target, GLuint texture) = NULL;
37static void (*_glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) FP_ATTRIB = NULL;
38static void (*_glBlendEquation)(GLenum mode ) = NULL;
39static void (*_glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) = NULL;
40static void (*_glBlendFunc)(GLenum sfactor, GLenum dfactor) = NULL;
41static void (*_glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) = NULL;
42static void (*_glBufferData)(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) = NULL;
43static void (*_glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) = NULL;
44static GLenum (*_glCheckFramebufferStatus)(GLenum target) = NULL;
45static void (*_glClear)(GLbitfield mask) = NULL;
46static void (*_glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) FP_ATTRIB = NULL;
47static void (*_glClearDepthf)(GLclampf depth) FP_ATTRIB = NULL;
48static void (*_glClearStencil)(GLint s) = NULL;
49static void (*_glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) = NULL;
50static void (*_glCompileShader)(GLuint shader) = NULL;
51static void (*_glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) = NULL;
52static void (*_glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) = NULL;
53static void (*_glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) = NULL;
54static void (*_glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) = NULL;
55static GLuint (*_glCreateProgram)(void) = NULL;
56static GLuint (*_glCreateShader)(GLenum type) = NULL;
57static void (*_glCullFace)(GLenum mode) = NULL;
58static void (*_glDeleteBuffers)(GLsizei n, const GLuint* buffers) = NULL;
59static void (*_glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) = NULL;
60static void (*_glDeleteProgram)(GLuint program) = NULL;
61static void (*_glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) = NULL;
62static void (*_glDeleteShader)(GLuint shader) = NULL;
63static void (*_glDeleteTextures)(GLsizei n, const GLuint* textures) = NULL;
64static void (*_glDepthFunc)(GLenum func) = NULL;
65static void (*_glDepthMask)(GLboolean flag) = NULL;
66static void (*_glDepthRangef)(GLclampf zNear, GLclampf zFar) FP_ATTRIB = NULL;
67static void (*_glDetachShader)(GLuint program, GLuint shader) = NULL;
68static void (*_glDisable)(GLenum cap) = NULL;
69static void (*_glDisableVertexAttribArray)(GLuint index) = NULL;
70static void (*_glDrawArrays)(GLenum mode, GLint first, GLsizei count) = NULL;
71static void (*_glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) = NULL;
72static void (*_glEnable)(GLenum cap) = NULL;
73static void (*_glEnableVertexAttribArray)(GLuint index) = NULL;
74static void (*_glFinish)(void) = NULL;
75static void (*_glFlush)(void) = NULL;
76static void (*_glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) = NULL;
77static void (*_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) = NULL;
78static void (*_glFrontFace)(GLenum mode) = NULL;
79static void (*_glGenBuffers)(GLsizei n, GLuint* buffers) = NULL;
80static void (*_glGenerateMipmap)(GLenum target) = NULL;
81static void (*_glGenFramebuffers)(GLsizei n, GLuint* framebuffers) = NULL;
82static void (*_glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers) = NULL;
83static void (*_glGenTextures)(GLsizei n, GLuint* textures) = NULL;
84static void (*_glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) = NULL;
85static void (*_glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) = NULL;
86static void (*_glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) = NULL;
87static int (*_glGetAttribLocation)(GLuint program, const GLchar* name) = NULL;
88static void (*_glGetBooleanv)(GLenum pname, GLboolean* params) = NULL;
89static void (*_glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) = NULL;
90static GLenum (*_glGetError)(void) = NULL;
91static void (*_glGetFloatv)(GLenum pname, GLfloat* params) = NULL;
92static void (*_glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) = NULL;
93static void (*_glGetIntegerv)(GLenum pname, GLint* params) = NULL;
94static void (*_glGetProgramiv)(GLuint program, GLenum pname, GLint* params) = NULL;
95static void (*_glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) = NULL;
96static void (*_glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) = NULL;
97static void (*_glGetShaderiv)(GLuint shader, GLenum pname, GLint* params) = NULL;
98static void (*_glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) = NULL;
99static void (*_glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) = NULL;
100static void (*_glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) = NULL;
101static const GLubyte* (*_glGetString)(GLenum name) = NULL;
102static void (*_glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) = NULL;
103static void (*_glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) = NULL;
104static void (*_glGetUniformfv)(GLuint program, GLint location, GLfloat* params) = NULL;
105static void (*_glGetUniformiv)(GLuint program, GLint location, GLint* params) = NULL;
106static int (*_glGetUniformLocation)(GLuint program, const GLchar* name) = NULL;
107static void (*_glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) = NULL;
108static void (*_glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) = NULL;
109static void (*_glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) = NULL;
110static void (*_glHint)(GLenum target, GLenum mode) = NULL;
111static GLboolean (*_glIsBuffer)(GLuint buffer) = NULL;
112static GLboolean (*_glIsEnabled)(GLenum cap) = NULL;
113static GLboolean (*_glIsFramebuffer)(GLuint framebuffer) = NULL;
114static GLboolean (*_glIsProgram)(GLuint program) = NULL;
115static GLboolean (*_glIsRenderbuffer)(GLuint renderbuffer) = NULL;
116static GLboolean (*_glIsShader)(GLuint shader) = NULL;
117static GLboolean (*_glIsTexture)(GLuint texture) = NULL;
118static void (*_glLineWidth)(GLfloat width) FP_ATTRIB = NULL;
119static void (*_glLinkProgram)(GLuint program) = NULL;
120static void (*_glPixelStorei)(GLenum pname, GLint param) = NULL;
121static void (*_glPolygonOffset)(GLfloat factor, GLfloat units) FP_ATTRIB = NULL;
122static void (*_glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) = NULL;
123static void (*_glReleaseShaderCompiler)(void) = NULL;
124static void (*_glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) = NULL;
125static void (*_glSampleCoverage)(GLclampf value, GLboolean invert) FP_ATTRIB = NULL;
126static void (*_glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) = NULL;
127static void (*_glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) = NULL;
128static void (*_glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) = NULL;
129static void (*_glStencilFunc)(GLenum func, GLint ref, GLuint mask) = NULL;
130static void (*_glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) = NULL;
131static void (*_glStencilMask)(GLuint mask) = NULL;
132static void (*_glStencilMaskSeparate)(GLenum face, GLuint mask) = NULL;
133static void (*_glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) = NULL;
134static void (*_glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) = NULL;
135static void (*_glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) = NULL;
136static void (*_glTexParameterf)(GLenum target, GLenum pname, GLfloat param) FP_ATTRIB = NULL;
137static void (*_glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) = NULL;
138static void (*_glTexParameteri)(GLenum target, GLenum pname, GLint param) = NULL;
139static void (*_glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) = NULL;
140static void (*_glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) = NULL;
141static void (*_glUniform1f)(GLint location, GLfloat x) FP_ATTRIB = NULL;
142static void (*_glUniform1fv)(GLint location, GLsizei count, const GLfloat* v) = NULL;
143static void (*_glUniform1i)(GLint location, GLint x) = NULL;
144static void (*_glUniform1iv)(GLint location, GLsizei count, const GLint* v) = NULL;
145static void (*_glUniform2f)(GLint location, GLfloat x, GLfloat y) FP_ATTRIB = NULL;
146static void (*_glUniform2fv)(GLint location, GLsizei count, const GLfloat* v) = NULL;
147static void (*_glUniform2i)(GLint location, GLint x, GLint y) = NULL;
148static void (*_glUniform2iv)(GLint location, GLsizei count, const GLint* v) = NULL;
149static void (*_glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) FP_ATTRIB = NULL;
150static void (*_glUniform3fv)(GLint location, GLsizei count, const GLfloat* v) = NULL;
151static void (*_glUniform3i)(GLint location, GLint x, GLint y, GLint z) = NULL;
152static void (*_glUniform3iv)(GLint location, GLsizei count, const GLint* v) = NULL;
153static void (*_glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FP_ATTRIB = NULL;
154static void (*_glUniform4fv)(GLint location, GLsizei count, const GLfloat* v) = NULL;
155static void (*_glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) = NULL;
156static void (*_glUniform4iv)(GLint location, GLsizei count, const GLint* v) = NULL;
157static void (*_glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL;
158static void (*_glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL;
159static void (*_glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) = NULL;
160static void (*_glUseProgram)(GLuint program) = NULL;
161static void (*_glValidateProgram)(GLuint program) = NULL;
162static void (*_glVertexAttrib1f)(GLuint indx, GLfloat x) FP_ATTRIB = NULL;
163static void (*_glVertexAttrib1fv)(GLuint indx, const GLfloat* values) = NULL;
164static void (*_glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) FP_ATTRIB = NULL;
165static void (*_glVertexAttrib2fv)(GLuint indx, const GLfloat* values) = NULL;
166static void (*_glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) FP_ATTRIB = NULL;
167static void (*_glVertexAttrib3fv)(GLuint indx, const GLfloat* values) = NULL;
168static void (*_glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) FP_ATTRIB = NULL;
169static void (*_glVertexAttrib4fv)(GLuint indx, const GLfloat* values) = NULL;
170static void (*_glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) = NULL;
171static void (*_glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) = NULL;
172static void (*_glEGLImageTargetTexture2DOES) (GLenum target, GLeglImageOES image) = NULL;
173
174
175#define GLES2_LOAD(sym) { *(&_ ## sym) = (void *) android_dlsym(_libglesv2, #sym); }
176
177static void __attribute__((constructor)) _init_androidglesv2() {
178 _libglesv2 = (void *) android_dlopen(getenv("LIBGLESV2") ? getenv("LIBGLESV2") : "libGLESv2.so", RTLD_NOW);
179 GLES2_LOAD(glActiveTexture);
180 GLES2_LOAD(glAttachShader);
181 GLES2_LOAD(glBindAttribLocation);
182 GLES2_LOAD(glBindBuffer);
183 GLES2_LOAD(glBindFramebuffer);
184 GLES2_LOAD(glBindRenderbuffer);
185 GLES2_LOAD(glBindTexture);
186 GLES2_LOAD(glBlendColor);
187 GLES2_LOAD(glBlendEquation);
188 GLES2_LOAD(glBlendEquationSeparate);
189 GLES2_LOAD(glBlendFunc);
190 GLES2_LOAD(glBlendFuncSeparate);
191 GLES2_LOAD(glBufferData);
192 GLES2_LOAD(glBufferSubData);
193 GLES2_LOAD(glCheckFramebufferStatus);
194 GLES2_LOAD(glClear);
195 GLES2_LOAD(glClearColor);
196 GLES2_LOAD(glClearDepthf);
197 GLES2_LOAD(glClearStencil);
198 GLES2_LOAD(glColorMask);
199 GLES2_LOAD(glCompileShader);
200 GLES2_LOAD(glCompressedTexImage2D);
201 GLES2_LOAD(glCompressedTexSubImage2D);
202 GLES2_LOAD(glCopyTexImage2D);
203 GLES2_LOAD(glCopyTexSubImage2D);
204 GLES2_LOAD(glCreateProgram);
205 GLES2_LOAD(glCreateShader);
206 GLES2_LOAD(glCullFace);
207 GLES2_LOAD(glDeleteBuffers);
208 GLES2_LOAD(glDeleteFramebuffers);
209 GLES2_LOAD(glDeleteProgram);
210 GLES2_LOAD(glDeleteRenderbuffers);
211 GLES2_LOAD(glDeleteShader);
212 GLES2_LOAD(glDeleteTextures);
213 GLES2_LOAD(glDepthFunc);
214 GLES2_LOAD(glDepthMask);
215 GLES2_LOAD(glDepthRangef);
216 GLES2_LOAD(glDetachShader);
217 GLES2_LOAD(glDisable);
218 GLES2_LOAD(glDisableVertexAttribArray);
219 GLES2_LOAD(glDrawArrays);
220 GLES2_LOAD(glDrawElements);
221 GLES2_LOAD(glEnable);
222 GLES2_LOAD(glEnableVertexAttribArray);
223 GLES2_LOAD(glFinish);
224 GLES2_LOAD(glFlush);
225 GLES2_LOAD(glFramebufferRenderbuffer);
226 GLES2_LOAD(glFramebufferTexture2D);
227 GLES2_LOAD(glFrontFace);
228 GLES2_LOAD(glGenBuffers);
229 GLES2_LOAD(glGenerateMipmap);
230 GLES2_LOAD(glGenFramebuffers);
231 GLES2_LOAD(glGenRenderbuffers);
232 GLES2_LOAD(glGenTextures);
233 GLES2_LOAD(glGetActiveAttrib);
234 GLES2_LOAD(glGetActiveUniform);
235 GLES2_LOAD(glGetAttachedShaders);
236 GLES2_LOAD(glGetAttribLocation);
237 GLES2_LOAD(glGetBooleanv);
238 GLES2_LOAD(glGetBufferParameteriv);
239 GLES2_LOAD(glGetError);
240 GLES2_LOAD(glGetFloatv);
241 GLES2_LOAD(glGetFramebufferAttachmentParameteriv);
242 GLES2_LOAD(glGetIntegerv);
243 GLES2_LOAD(glGetProgramiv);
244 GLES2_LOAD(glGetProgramInfoLog);
245 GLES2_LOAD(glGetRenderbufferParameteriv);
246 GLES2_LOAD(glGetShaderiv);
247 GLES2_LOAD(glGetShaderInfoLog);
248 GLES2_LOAD(glGetShaderPrecisionFormat);
249 GLES2_LOAD(glGetShaderSource);
250 GLES2_LOAD(glGetString);
251 GLES2_LOAD(glGetTexParameterfv);
252 GLES2_LOAD(glGetTexParameteriv);
253 GLES2_LOAD(glGetUniformfv);
254 GLES2_LOAD(glGetUniformiv);
255 GLES2_LOAD(glGetUniformLocation);
256 GLES2_LOAD(glGetVertexAttribfv);
257 GLES2_LOAD(glGetVertexAttribiv);
258 GLES2_LOAD(glGetVertexAttribPointerv);
259 GLES2_LOAD(glHint);
260 GLES2_LOAD(glIsBuffer);
261 GLES2_LOAD(glIsEnabled);
262 GLES2_LOAD(glIsFramebuffer);
263 GLES2_LOAD(glIsProgram);
264 GLES2_LOAD(glIsRenderbuffer);
265 GLES2_LOAD(glIsShader);
266 GLES2_LOAD(glIsTexture);
267 GLES2_LOAD(glLineWidth);
268 GLES2_LOAD(glLinkProgram);
269 GLES2_LOAD(glPixelStorei);
270 GLES2_LOAD(glPolygonOffset);
271 GLES2_LOAD(glReadPixels);
272 GLES2_LOAD(glReleaseShaderCompiler);
273 GLES2_LOAD(glRenderbufferStorage);
274 GLES2_LOAD(glSampleCoverage);
275 GLES2_LOAD(glScissor);
276 GLES2_LOAD(glShaderBinary);
277 GLES2_LOAD(glShaderSource);
278 GLES2_LOAD(glStencilFunc);
279 GLES2_LOAD(glStencilFuncSeparate);
280 GLES2_LOAD(glStencilMask);
281 GLES2_LOAD(glStencilMaskSeparate);
282 GLES2_LOAD(glStencilOp);
283 GLES2_LOAD(glStencilOpSeparate);
284 GLES2_LOAD(glTexImage2D);
285 GLES2_LOAD(glTexParameterf);
286 GLES2_LOAD(glTexParameterfv);
287 GLES2_LOAD(glTexParameteri);
288 GLES2_LOAD(glTexParameteriv);
289 GLES2_LOAD(glTexSubImage2D);
290 GLES2_LOAD(glUniform1f);
291 GLES2_LOAD(glUniform1fv);
292 GLES2_LOAD(glUniform1i);
293 GLES2_LOAD(glUniform1iv);
294 GLES2_LOAD(glUniform2f);
295 GLES2_LOAD(glUniform2fv);
296 GLES2_LOAD(glUniform2i);
297 GLES2_LOAD(glUniform2iv);
298 GLES2_LOAD(glUniform3f);
299 GLES2_LOAD(glUniform3fv);
300 GLES2_LOAD(glUniform3i);
301 GLES2_LOAD(glUniform3iv);
302 GLES2_LOAD(glUniform4f);
303 GLES2_LOAD(glUniform4fv);
304 GLES2_LOAD(glUniform4i);
305 GLES2_LOAD(glUniform4iv);
306 GLES2_LOAD(glUniformMatrix2fv);
307 GLES2_LOAD(glUniformMatrix3fv);
308 GLES2_LOAD(glUniformMatrix4fv);
309 GLES2_LOAD(glUseProgram);
310 GLES2_LOAD(glValidateProgram);
311 GLES2_LOAD(glVertexAttrib1f);
312 GLES2_LOAD(glVertexAttrib1fv);
313 GLES2_LOAD(glVertexAttrib2f);
314 GLES2_LOAD(glVertexAttrib2fv);
315 GLES2_LOAD(glVertexAttrib3f);
316 GLES2_LOAD(glVertexAttrib3fv);
317 GLES2_LOAD(glVertexAttrib4f);
318 GLES2_LOAD(glVertexAttrib4fv);
319 GLES2_LOAD(glVertexAttribPointer);
320 GLES2_LOAD(glViewport);
321 GLES2_LOAD(glEGLImageTargetTexture2DOES);
322
323}
324
325
326void glActiveTexture (GLenum texture)
327{
328 return (*_glActiveTexture)(texture);
329}
330
331void glAttachShader (GLuint program, GLuint shader)
332{
333 return (*_glAttachShader)(program, shader);
334}
335
336void glBindAttribLocation (GLuint program, GLuint index, const GLchar* name)
337{
338 return (*_glBindAttribLocation)(program, index, name);
339}
340
341void glBindBuffer (GLenum target, GLuint buffer)
342{
343 return (*_glBindBuffer)(target, buffer);
344}
345
346void glBindFramebuffer (GLenum target, GLuint framebuffer)
347{
348 return (*_glBindFramebuffer)(target, framebuffer);
349}
350
351void glBindRenderbuffer (GLenum target, GLuint renderbuffer)
352{
353 return (*_glBindRenderbuffer)(target, renderbuffer);
354}
355
356void glBindTexture (GLenum target, GLuint texture)
357{
358 return (*_glBindTexture)(target, texture);
359}
360
361void glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
362{
363 return (*_glBlendColor)(red, green, blue, alpha);
364}
365
366void glBlendEquation ( GLenum mode )
367{
368 return (*_glBlendEquation)(mode);
369}
370
371void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
372{
373 return (*_glBlendEquationSeparate)(modeRGB, modeAlpha);
374}
375
376void glBlendFunc (GLenum sfactor, GLenum dfactor)
377{
378 return (*_glBlendFunc)(sfactor, dfactor);
379}
380
381void glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
382{
383 return (*_glBlendFuncSeparate)(srcRGB, dstRGB, srcAlpha, dstAlpha);
384}
385
386void glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
387{
388 return (*_glBufferData)(target, size, data, usage);
389}
390
391void glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
392{
393 return (*_glBufferSubData)(target, offset, size, data);
394}
395
396GLenum glCheckFramebufferStatus (GLenum target)
397{
398 return (*_glCheckFramebufferStatus)(target);
399}
400
401void glClear (GLbitfield mask)
402{
403 return (*_glClear)(mask);
404}
405
406void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
407{
408 return (*_glClearColor)(red, green, blue, alpha);
409}
410
411void glClearDepthf (GLclampf depth)
412{
413 return (*_glClearDepthf)(depth);
414}
415
416void glClearStencil (GLint s)
417{
418 return (*_glClearStencil)(s);
419}
420
421void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
422{
423 return (*_glColorMask)(red, green, blue, alpha);
424}
425
426void glCompileShader (GLuint shader)
427{
428 return (*_glCompileShader)(shader);
429}
430
431void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
432{
433 return (*_glCompressedTexImage2D)(target, level, internalformat, width, height, border, imageSize, data);
434}
435
436void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
437{
438 return (*_glCompressedTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, imageSize, data);
439}
440
441void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
442{
443 return (*_glCopyTexImage2D)(target, level, internalformat, x, y, width, height, border);
444}
445
446void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
447{
448 return (*_glCopyTexSubImage2D)(target, level, xoffset, yoffset, x, y, width, height);
449}
450
451GLuint glCreateProgram (void)
452{
453 return (*_glCreateProgram)();
454}
455
456GLuint glCreateShader (GLenum type)
457{
458 return (*_glCreateShader)(type);
459}
460
461void glCullFace (GLenum mode)
462{
463 return (*_glCullFace)(mode);
464}
465
466void glDeleteBuffers (GLsizei n, const GLuint* buffers)
467{
468 return (*_glDeleteBuffers)(n, buffers);
469}
470
471void glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers)
472{
473 return (*_glDeleteFramebuffers)(n, framebuffers);
474}
475
476void glDeleteProgram (GLuint program)
477{
478 return (*_glDeleteProgram)(program);
479}
480
481void glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers)
482{
483 return (*_glDeleteRenderbuffers)(n, renderbuffers);
484}
485
486void glDeleteShader (GLuint shader)
487{
488 return (*_glDeleteShader)(shader);
489}
490
491void glDeleteTextures (GLsizei n, const GLuint* textures)
492{
493 return (*_glDeleteTextures)(n, textures);
494}
495
496void glDepthFunc (GLenum func)
497{
498 return (*_glDepthFunc)(func);
499}
500
501void glDepthMask (GLboolean flag)
502{
503 return (*_glDepthMask)(flag);
504}
505
506void glDepthRangef (GLclampf zNear, GLclampf zFar)
507{
508 return (*_glDepthRangef)(zNear, zFar);
509}
510
511void glDetachShader (GLuint program, GLuint shader)
512{
513 return (*_glDetachShader)(program, shader);
514}
515
516void glDisable (GLenum cap)
517{
518 return (*_glDisable)(cap);
519}
520
521void glDisableVertexAttribArray (GLuint index)
522{
523 return (*_glDisableVertexAttribArray)(index);
524}
525
526void glDrawArrays (GLenum mode, GLint first, GLsizei count)
527{
528 return (*_glDrawArrays)(mode, first, count);
529}
530
531void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
532{
533 return (*_glDrawElements)(mode, count, type, indices);
534}
535
536void glEnable (GLenum cap)
537{
538 return (*_glEnable)(cap);
539}
540
541void glEnableVertexAttribArray (GLuint index)
542{
543 return (*_glEnableVertexAttribArray)(index);
544}
545
546void glFinish (void)
547{
548 return (*_glFinish)();
549}
550
551void glFlush (void)
552{
553 return (*_glFlush)();
554}
555
556void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
557{
558 return (*_glFramebufferRenderbuffer)(target, attachment, renderbuffertarget, renderbuffer);
559}
560
561void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
562{
563 return (*_glFramebufferTexture2D)(target, attachment, textarget, texture, level);
564}
565
566void glFrontFace (GLenum mode)
567{
568 return (*_glFrontFace)(mode);
569}
570
571void glGenBuffers (GLsizei n, GLuint* buffers)
572{
573 return (*_glGenBuffers)(n, buffers);
574}
575
576void glGenerateMipmap (GLenum target)
577{
578 return (*_glGenerateMipmap)(target);
579}
580
581void glGenFramebuffers (GLsizei n, GLuint* framebuffers)
582{
583 return (*_glGenFramebuffers)(n, framebuffers);
584}
585
586void glGenRenderbuffers (GLsizei n, GLuint* renderbuffers)
587{
588 return (*_glGenRenderbuffers)(n, renderbuffers);
589}
590
591void glGenTextures (GLsizei n, GLuint* textures)
592{
593 return (*_glGenTextures)(n, textures);
594}
595
596void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
597{
598 return (*_glGetActiveAttrib)(program, index, bufsize, length, size, type, name);
599}
600
601void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
602{
603 return (*_glGetActiveUniform)(program, index, bufsize, length, size, type, name);
604}
605
606void glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
607{
608 return (*_glGetAttachedShaders)(program, maxcount, count, shaders);
609}
610
611int glGetAttribLocation (GLuint program, const GLchar* name)
612{
613 return (*_glGetAttribLocation)(program, name);
614}
615
616void glGetBooleanv (GLenum pname, GLboolean* params)
617{
618 return (*_glGetBooleanv)(pname, params);
619}
620
621void glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params)
622{
623 return (*_glGetBufferParameteriv)(target, pname, params);
624}
625
626GLenum glGetError (void)
627{
628 return (*_glGetError)();
629}
630
631void glGetFloatv (GLenum pname, GLfloat* params)
632{
633 return (*_glGetFloatv)(pname, params);
634}
635
636void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params)
637{
638 return (*_glGetFramebufferAttachmentParameteriv)(target, attachment, pname, params);
639}
640
641void glGetIntegerv (GLenum pname, GLint* params)
642{
643 return (*_glGetIntegerv)(pname, params);
644}
645
646void glGetProgramiv (GLuint program, GLenum pname, GLint* params)
647{
648 return (*_glGetProgramiv)(program, pname, params);
649}
650
651void glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
652{
653 return (*_glGetProgramInfoLog)(program, bufsize, length, infolog);
654}
655
656void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params)
657{
658 return (*_glGetRenderbufferParameteriv)(target, pname, params);
659}
660
661void glGetShaderiv (GLuint shader, GLenum pname, GLint* params)
662{
663 return (*_glGetShaderiv)(shader, pname, params);
664}
665
666void glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
667{
668 return (*_glGetShaderInfoLog)(shader, bufsize, length, infolog);
669}
670
671void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
672{
673 return (*_glGetShaderPrecisionFormat)(shadertype, precisiontype, range, precision);
674}
675
676void glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
677{
678 return (*_glGetShaderSource)(shader, bufsize, length, source);
679}
680
681const GLubyte* glGetString (GLenum name)
682{
683 return (*_glGetString)(name);
684}
685
686void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params)
687{
688 return (*_glGetTexParameterfv)(target, pname, params);
689}
690
691void glGetTexParameteriv (GLenum target, GLenum pname, GLint* params)
692{
693 return (*_glGetTexParameteriv)(target, pname, params);
694}
695
696void glGetUniformfv (GLuint program, GLint location, GLfloat* params)
697{
698 return (*_glGetUniformfv)(program, location, params);
699}
700
701void glGetUniformiv (GLuint program, GLint location, GLint* params)
702{
703 return (*_glGetUniformiv)(program, location, params);
704}
705
706int glGetUniformLocation (GLuint program, const GLchar* name)
707{
708 return (*_glGetUniformLocation)(program, name);
709}
710
711void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params)
712{
713 return (*_glGetVertexAttribfv)(index, pname, params);
714}
715
716void glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params)
717{
718 return (*_glGetVertexAttribiv)(index, pname, params);
719}
720
721void glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer)
722{
723 return (*_glGetVertexAttribPointerv)(index, pname, pointer);
724}
725
726void glHint (GLenum target, GLenum mode)
727{
728 return (*_glHint)(target, mode);
729}
730
731GLboolean glIsBuffer (GLuint buffer)
732{
733 return (*_glIsBuffer)(buffer);
734}
735
736GLboolean glIsEnabled (GLenum cap)
737{
738 return (*_glIsEnabled)(cap);
739}
740
741GLboolean glIsFramebuffer (GLuint framebuffer)
742{
743 return (*_glIsFramebuffer)(framebuffer);
744}
745
746GLboolean glIsProgram (GLuint program)
747{
748 return (*_glIsProgram)(program);
749}
750
751GLboolean glIsRenderbuffer (GLuint renderbuffer)
752{
753 return (*_glIsRenderbuffer)(renderbuffer);
754}
755
756GLboolean glIsShader (GLuint shader)
757{
758 return (*_glIsShader)(shader);
759}
760
761GLboolean glIsTexture (GLuint texture)
762{
763 return (*_glIsTexture)(texture);
764}
765
766void glLineWidth (GLfloat width)
767{
768 return (*_glLineWidth)(width);
769}
770
771void glLinkProgram (GLuint program)
772{
773 return (*_glLinkProgram)(program);
774}
775
776void glPixelStorei (GLenum pname, GLint param)
777{
778 return (*_glPixelStorei)(pname, param);
779}
780
781void glPolygonOffset (GLfloat factor, GLfloat units)
782{
783 return (*_glPolygonOffset)(factor, units);
784}
785
786void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
787{
788 return (*_glReadPixels)(x, y, width, height, format, type, pixels);
789
790}
791
792void glReleaseShaderCompiler (void)
793{
794 return (*_glReleaseShaderCompiler)();
795}
796
797void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
798{
799 return (*_glRenderbufferStorage)(target, internalformat, width, height);
800}
801
802void glSampleCoverage (GLclampf value, GLboolean invert)
803{
804 return (*_glSampleCoverage)(value, invert);
805}
806
807void glScissor (GLint x, GLint y, GLsizei width, GLsizei height)
808{
809 return (*_glScissor)(x, y, width, height);
810}
811
812void glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
813{
814 return (*_glShaderBinary)(n, shaders, binaryformat, binary, length);
815}
816
817void glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
818{
819 return (*_glShaderSource)(shader, count, string, length);
820}
821
822void glStencilFunc (GLenum func, GLint ref, GLuint mask)
823{
824 return (*_glStencilFunc)(func, ref, mask);
825}
826
827void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
828{
829 return (*_glStencilFuncSeparate)(face, func, ref, mask);
830}
831
832void glStencilMask (GLuint mask)
833{
834 return (*_glStencilMask)(mask);
835}
836
837void glStencilMaskSeparate (GLenum face, GLuint mask)
838{
839 return (*_glStencilMaskSeparate)(face, mask);
840}
841
842void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass)
843{
844 return (*_glStencilOp)(fail, zfail, zpass);
845}
846
847void glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
848{
849 return (*_glStencilOpSeparate)(face, fail, zfail, zpass);
850}
851
852void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
853{
854 return (*_glTexImage2D)(target, level, internalformat, width, height, border, format, type, pixels);
855}
856
857void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
858{
859 return (*_glTexParameterf)(target, pname, param);
860}
861
862void glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params)
863{
864 return (*_glTexParameterfv)(target, pname, params);
865}
866
867void glTexParameteri (GLenum target, GLenum pname, GLint param)
868{
869 return (*_glTexParameteri)(target, pname, param);
870}
871
872void glTexParameteriv (GLenum target, GLenum pname, const GLint* params)
873{
874 return (*_glTexParameteriv)(target, pname, params);
875}
876
877void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
878{
879 return (*_glTexSubImage2D)(target, level, xoffset, yoffset, width, height, format, type, pixels);
880}
881
882void glUniform1f (GLint location, GLfloat x)
883{
884 return (*_glUniform1f)(location, x);
885}
886
887void glUniform1fv (GLint location, GLsizei count, const GLfloat* v)
888{
889 return (*_glUniform1fv)(location, count, v);
890}
891
892void glUniform1i (GLint location, GLint x)
893{
894 return (*_glUniform1i)(location, x);
895}
896
897void glUniform1iv (GLint location, GLsizei count, const GLint* v)
898{
899 return (*_glUniform1iv)(location, count, v);
900}
901
902void glUniform2f (GLint location, GLfloat x, GLfloat y)
903{
904 return (*_glUniform2f)(location, x, y);
905}
906
907void glUniform2fv (GLint location, GLsizei count, const GLfloat* v)
908{
909 return (*_glUniform2fv)(location, count, v);
910}
911
912void glUniform2i (GLint location, GLint x, GLint y)
913{
914 return (*_glUniform2i)(location, x, y);
915}
916
917void glUniform2iv (GLint location, GLsizei count, const GLint* v)
918{
919 return (*_glUniform2iv)(location, count, v);
920}
921
922void glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)
923{
924 return (*_glUniform3f)(location, x, y, z);
925}
926
927void glUniform3fv (GLint location, GLsizei count, const GLfloat* v)
928{
929 return (*_glUniform3fv)(location, count, v);
930}
931
932void glUniform3i (GLint location, GLint x, GLint y, GLint z)
933{
934 return (*_glUniform3i)(location, x, y, z);
935}
936
937void glUniform3iv (GLint location, GLsizei count, const GLint* v)
938{
939 return (*_glUniform3iv)(location, count, v);
940}
941
942void glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
943{
944 return (*_glUniform4f)(location, x, y, z, w);
945}
946
947void glUniform4fv (GLint location, GLsizei count, const GLfloat* v)
948{
949 return (*_glUniform4fv)(location, count, v);
950}
951
952void glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w)
953{
954 return (*_glUniform4i)(location, x, y, z, w);
955}
956
957void glUniform4iv (GLint location, GLsizei count, const GLint* v)
958{
959 return (*_glUniform4iv)(location, count, v);
960}
961
962void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
963{
964 return (*_glUniformMatrix2fv)(location, count, transpose, value);
965}
966
967void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
968{
969 return (*_glUniformMatrix3fv)(location, count, transpose, value);
970}
971
972void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
973{
974 return (*_glUniformMatrix4fv)(location, count, transpose, value);
975}
976
977void glUseProgram (GLuint program)
978{
979 return (*_glUseProgram)(program);
980}
981
982void glValidateProgram (GLuint program)
983{
984 return (*_glValidateProgram)(program);
985}
986
987void glVertexAttrib1f (GLuint indx, GLfloat x)
988{
989 return (*_glVertexAttrib1f)(indx, x);
990}
991
992void glVertexAttrib1fv (GLuint indx, const GLfloat* values)
993{
994 return (*_glVertexAttrib1fv)(indx, values);
995}
996
997void glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)
998{
999 return (*_glVertexAttrib2f)(indx, x, y);
1000}
1001
1002void glVertexAttrib2fv (GLuint indx, const GLfloat* values)
1003{
1004 return (*_glVertexAttrib2fv)(indx, values);
1005}
1006
1007void glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)
1008{
1009 return (*_glVertexAttrib3f)(indx, x, y, z);
1010}
1011
1012void glVertexAttrib3fv (GLuint indx, const GLfloat* values)
1013{
1014 return (*_glVertexAttrib3fv)(indx, values);
1015}
1016
1017void glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1018{
1019 return (*_glVertexAttrib4f)(indx, x, y, z, w);
1020}
1021
1022void glVertexAttrib4fv (GLuint indx, const GLfloat* values)
1023{
1024 return (*_glVertexAttrib4fv)(indx, values);
1025}
1026
1027void glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
1028{
1029 return (*_glVertexAttribPointer)(indx, size, type, normalized, stride, ptr);
1030}
1031
1032void glViewport (GLint x, GLint y, GLsizei width, GLsizei height)
1033{
1034 return (*_glViewport)(x, y, width, height);
1035}
1036
1037void glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image)
1038{
1039 (*_glEGLImageTargetTexture2DOES)(target, image);
1040}
1041
1042