1 // Generated Code - DO NOT EDIT !!
2 // generated by 'emugen'
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include "gl2_client_context.h"
6 
7 extern "C" {
8 	void glActiveTexture(GLenum texture);
9 	void glAttachShader(GLuint program, GLuint shader);
10 	void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name);
11 	void glBindBuffer(GLenum target, GLuint buffer);
12 	void glBindFramebuffer(GLenum target, GLuint framebuffer);
13 	void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
14 	void glBindTexture(GLenum target, GLuint texture);
15 	void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
16 	void glBlendEquation(GLenum mode);
17 	void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
18 	void glBlendFunc(GLenum sfactor, GLenum dfactor);
19 	void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
20 	void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
21 	void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
22 	GLenum glCheckFramebufferStatus(GLenum target);
23 	void glClear(GLbitfield mask);
24 	void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
25 	void glClearDepthf(GLclampf depth);
26 	void glClearStencil(GLint s);
27 	void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
28 	void glCompileShader(GLuint shader);
29 	void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
30 	void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
31 	void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
32 	void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
33 	GLuint glCreateProgram();
34 	GLuint glCreateShader(GLenum type);
35 	void glCullFace(GLenum mode);
36 	void glDeleteBuffers(GLsizei n, const GLuint* buffers);
37 	void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
38 	void glDeleteProgram(GLuint program);
39 	void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
40 	void glDeleteShader(GLuint shader);
41 	void glDeleteTextures(GLsizei n, const GLuint* textures);
42 	void glDepthFunc(GLenum func);
43 	void glDepthMask(GLboolean flag);
44 	void glDepthRangef(GLclampf zNear, GLclampf zFar);
45 	void glDetachShader(GLuint program, GLuint shader);
46 	void glDisable(GLenum cap);
47 	void glDisableVertexAttribArray(GLuint index);
48 	void glDrawArrays(GLenum mode, GLint first, GLsizei count);
49 	void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
50 	void glEnable(GLenum cap);
51 	void glEnableVertexAttribArray(GLuint index);
52 	void glFinish();
53 	void glFlush();
54 	void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
55 	void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
56 	void glFrontFace(GLenum mode);
57 	void glGenBuffers(GLsizei n, GLuint* buffers);
58 	void glGenerateMipmap(GLenum target);
59 	void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
60 	void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
61 	void glGenTextures(GLsizei n, GLuint* textures);
62 	void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
63 	void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
64 	void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
65 	int glGetAttribLocation(GLuint program, const GLchar* name);
66 	void glGetBooleanv(GLenum pname, GLboolean* params);
67 	void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
68 	GLenum glGetError();
69 	void glGetFloatv(GLenum pname, GLfloat* params);
70 	void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
71 	void glGetIntegerv(GLenum pname, GLint* params);
72 	void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
73 	void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
74 	void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
75 	void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
76 	void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
77 	void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
78 	void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
79 	const GLubyte* glGetString(GLenum name);
80 	void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
81 	void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
82 	void glGetUniformfv(GLuint program, GLint location, GLfloat* params);
83 	void glGetUniformiv(GLuint program, GLint location, GLint* params);
84 	int glGetUniformLocation(GLuint program, const GLchar* name);
85 	void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
86 	void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
87 	void glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
88 	void glHint(GLenum target, GLenum mode);
89 	GLboolean glIsBuffer(GLuint buffer);
90 	GLboolean glIsEnabled(GLenum cap);
91 	GLboolean glIsFramebuffer(GLuint framebuffer);
92 	GLboolean glIsProgram(GLuint program);
93 	GLboolean glIsRenderbuffer(GLuint renderbuffer);
94 	GLboolean glIsShader(GLuint shader);
95 	GLboolean glIsTexture(GLuint texture);
96 	void glLineWidth(GLfloat width);
97 	void glLinkProgram(GLuint program);
98 	void glPixelStorei(GLenum pname, GLint param);
99 	void glPolygonOffset(GLfloat factor, GLfloat units);
100 	void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
101 	void glReleaseShaderCompiler();
102 	void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
103 	void glSampleCoverage(GLclampf value, GLboolean invert);
104 	void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
105 	void glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
106 	void glShaderSource(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
107 	void glStencilFunc(GLenum func, GLint ref, GLuint mask);
108 	void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
109 	void glStencilMask(GLuint mask);
110 	void glStencilMaskSeparate(GLenum face, GLuint mask);
111 	void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
112 	void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
113 	void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
114 	void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
115 	void glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
116 	void glTexParameteri(GLenum target, GLenum pname, GLint param);
117 	void glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
118 	void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
119 	void glUniform1f(GLint location, GLfloat x);
120 	void glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
121 	void glUniform1i(GLint location, GLint x);
122 	void glUniform1iv(GLint location, GLsizei count, const GLint* v);
123 	void glUniform2f(GLint location, GLfloat x, GLfloat y);
124 	void glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
125 	void glUniform2i(GLint location, GLint x, GLint y);
126 	void glUniform2iv(GLint location, GLsizei count, const GLint* v);
127 	void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
128 	void glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
129 	void glUniform3i(GLint location, GLint x, GLint y, GLint z);
130 	void glUniform3iv(GLint location, GLsizei count, const GLint* v);
131 	void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
132 	void glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
133 	void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
134 	void glUniform4iv(GLint location, GLsizei count, const GLint* v);
135 	void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
136 	void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
137 	void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
138 	void glUseProgram(GLuint program);
139 	void glValidateProgram(GLuint program);
140 	void glVertexAttrib1f(GLuint indx, GLfloat x);
141 	void glVertexAttrib1fv(GLuint indx, const GLfloat* values);
142 	void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
143 	void glVertexAttrib2fv(GLuint indx, const GLfloat* values);
144 	void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
145 	void glVertexAttrib3fv(GLuint indx, const GLfloat* values);
146 	void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
147 	void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
148 	void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
149 	void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
150 	void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image);
151 	void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
152 	void glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary);
153 	void glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLint length);
154 	void* glMapBufferOES(GLenum target, GLenum access);
155 	GLboolean glUnmapBufferOES(GLenum target);
156 	void glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
157 	void glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
158 	void glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
159 	void glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
160 	void glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
161 	void glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
162 	void glBindVertexArrayOES(GLuint array);
163 	void glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays);
164 	void glGenVertexArraysOES(GLsizei n, GLuint* arrays);
165 	GLboolean glIsVertexArrayOES(GLuint array);
166 	void glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum* attachments);
167 	void glMultiDrawArraysEXT(GLenum mode, const GLint* first, const GLsizei* count, GLsizei primcount);
168 	void glMultiDrawElementsEXT(GLenum mode, const GLsizei* count, GLenum type, const GLvoid* const* indices, GLsizei primcount);
169 	void glGetPerfMonitorGroupsAMD(GLint* numGroups, GLsizei groupsSize, GLuint* groups);
170 	void glGetPerfMonitorCountersAMD(GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters);
171 	void glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei* length, GLchar* groupString);
172 	void glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, GLchar* counterString);
173 	void glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid* data);
174 	void glGenPerfMonitorsAMD(GLsizei n, GLuint* monitors);
175 	void glDeletePerfMonitorsAMD(GLsizei n, GLuint* monitors);
176 	void glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList);
177 	void glBeginPerfMonitorAMD(GLuint monitor);
178 	void glEndPerfMonitorAMD(GLuint monitor);
179 	void glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten);
180 	void glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
181 	void glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
182 	void glDeleteFencesNV(GLsizei n, const GLuint* fences);
183 	void glGenFencesNV(GLsizei n, GLuint* fences);
184 	GLboolean glIsFenceNV(GLuint fence);
185 	GLboolean glTestFenceNV(GLuint fence);
186 	void glGetFenceivNV(GLuint fence, GLenum pname, GLint* params);
187 	void glFinishFenceNV(GLuint fence);
188 	void glSetFenceNV(GLuint fence, GLenum condition);
189 	void glCoverageMaskNV(GLboolean mask);
190 	void glCoverageOperationNV(GLenum operation);
191 	void glGetDriverControlsQCOM(GLint* num, GLsizei size, GLuint* driverControls);
192 	void glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei* length, GLchar* driverControlString);
193 	void glEnableDriverControlQCOM(GLuint driverControl);
194 	void glDisableDriverControlQCOM(GLuint driverControl);
195 	void glExtGetTexturesQCOM(GLuint* textures, GLint maxTextures, GLint* numTextures);
196 	void glExtGetBuffersQCOM(GLuint* buffers, GLint maxBuffers, GLint* numBuffers);
197 	void glExtGetRenderbuffersQCOM(GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers);
198 	void glExtGetFramebuffersQCOM(GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers);
199 	void glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params);
200 	void glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param);
201 	void glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* texels);
202 	void glExtGetBufferPointervQCOM(GLenum target, GLvoidptr* params);
203 	void glExtGetShadersQCOM(GLuint* shaders, GLint maxShaders, GLint* numShaders);
204 	void glExtGetProgramsQCOM(GLuint* programs, GLint maxPrograms, GLint* numPrograms);
205 	GLboolean glExtIsProgramBinaryQCOM(GLuint program);
206 	void glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar* source, GLint* length);
207 	void glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
208 	void glEndTilingQCOM(GLbitfield preserveMask);
209 	void glVertexAttribPointerData(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void* data, GLuint datalen);
210 	void glVertexAttribPointerOffset(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint offset);
211 	void glDrawElementsOffset(GLenum mode, GLsizei count, GLenum type, GLuint offset);
212 	void glDrawElementsData(GLenum mode, GLsizei count, GLenum type, void* data, GLuint datalen);
213 	void glGetCompressedTextureFormats(int count, GLint* formats);
214 	void glShaderString(GLuint shader, const GLchar* string, GLsizei len);
215 	int glFinishRoundTrip();
216 	void glGenVertexArrays(GLsizei n, GLuint* arrays);
217 	void glBindVertexArray(GLuint array);
218 	void glDeleteVertexArrays(GLsizei n, const GLuint* arrays);
219 	GLboolean glIsVertexArray(GLuint array);
220 	void* glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
221 	GLboolean glUnmapBuffer(GLenum target);
222 	void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
223 	void glMapBufferRangeAEMU(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void* mapped);
224 	void glUnmapBufferAEMU(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void* guest_buffer, GLboolean* out_res);
225 	void glFlushMappedBufferRangeAEMU(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void* guest_buffer);
226 	void glReadPixelsOffsetAEMU(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLuint offset);
227 	void glCompressedTexImage2DOffsetAEMU(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLuint offset);
228 	void glCompressedTexSubImage2DOffsetAEMU(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLuint offset);
229 	void glTexImage2DOffsetAEMU(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLuint offset);
230 	void glTexSubImage2DOffsetAEMU(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLuint offset);
231 	void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
232 	void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
233 	void glCopyBufferSubData(GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size);
234 	void glClearBufferiv(GLenum buffer, GLint drawBuffer, const GLint* value);
235 	void glClearBufferuiv(GLenum buffer, GLint drawBuffer, const GLuint* value);
236 	void glClearBufferfv(GLenum buffer, GLint drawBuffer, const GLfloat* value);
237 	void glClearBufferfi(GLenum buffer, GLint drawBuffer, GLfloat depth, GLint stencil);
238 	void glGetBufferParameteri64v(GLenum target, GLenum value, GLint64* data);
239 	void glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params);
240 	void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
241 	GLuint glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName);
242 	void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar** uniformNames, GLuint* uniformIndices);
243 	void glGetUniformIndicesAEMU(GLuint program, GLsizei uniformCount, const GLchar* packedUniformNames, GLsizei packedLen, GLuint* uniformIndices);
244 	void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params);
245 	void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName);
246 	void glUniform1ui(GLint location, GLuint v0);
247 	void glUniform2ui(GLint location, GLuint v0, GLuint v1);
248 	void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
249 	void glUniform4ui(GLint location, GLint v0, GLuint v1, GLuint v2, GLuint v3);
250 	void glUniform1uiv(GLint location, GLsizei count, const GLuint* value);
251 	void glUniform2uiv(GLint location, GLsizei count, const GLuint* value);
252 	void glUniform3uiv(GLint location, GLsizei count, const GLuint* value);
253 	void glUniform4uiv(GLint location, GLsizei count, const GLuint* value);
254 	void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
255 	void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
256 	void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
257 	void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
258 	void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
259 	void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
260 	void glGetUniformuiv(GLuint program, GLint location, GLuint* params);
261 	void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params);
262 	void glVertexAttribI4i(GLuint index, GLint v0, GLint v1, GLint v2, GLint v3);
263 	void glVertexAttribI4ui(GLuint index, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
264 	void glVertexAttribI4iv(GLuint index, const GLint* v);
265 	void glVertexAttribI4uiv(GLuint index, const GLuint* v);
266 	void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer);
267 	void glVertexAttribIPointerOffsetAEMU(GLuint index, GLint size, GLenum type, GLsizei stride, GLuint offset);
268 	void glVertexAttribIPointerDataAEMU(GLuint index, GLint size, GLenum type, GLsizei stride, void* data, GLuint datalen);
269 	void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params);
270 	void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params);
271 	void glVertexAttribDivisor(GLuint index, GLuint divisor);
272 	void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
273 	void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount);
274 	void glDrawElementsInstancedDataAEMU(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount, GLsizei datalen);
275 	void glDrawElementsInstancedOffsetAEMU(GLenum mode, GLsizei count, GLenum type, GLuint offset, GLsizei primcount);
276 	void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices);
277 	void glDrawRangeElementsDataAEMU(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices, GLsizei datalen);
278 	void glDrawRangeElementsOffsetAEMU(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLuint offset);
279 	GLsync glFenceSync(GLenum condition, GLbitfield flags);
280 	GLenum glClientWaitSync(GLsync wait_on, GLbitfield flags, GLuint64 timeout);
281 	void glWaitSync(GLsync wait_on, GLbitfield flags, GLuint64 timeout);
282 	void glDeleteSync(GLsync to_delete);
283 	GLboolean glIsSync(GLsync sync);
284 	void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values);
285 	uint64_t glFenceSyncAEMU(GLenum condition, GLbitfield flags);
286 	GLenum glClientWaitSyncAEMU(uint64_t wait_on, GLbitfield flags, GLuint64 timeout);
287 	void glWaitSyncAEMU(uint64_t wait_on, GLbitfield flags, GLuint64 timeout);
288 	void glDeleteSyncAEMU(uint64_t to_delete);
289 	GLboolean glIsSyncAEMU(uint64_t sync);
290 	void glGetSyncivAEMU(uint64_t sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values);
291 	void glDrawBuffers(GLsizei n, const GLenum* bufs);
292 	void glReadBuffer(GLenum src);
293 	void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
294 	void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments);
295 	void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height);
296 	void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
297 	void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
298 	void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
299 	void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params);
300 	void glBeginTransformFeedback(GLenum primitiveMode);
301 	void glEndTransformFeedback();
302 	void glGenTransformFeedbacks(GLsizei n, GLuint* ids);
303 	void glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids);
304 	void glBindTransformFeedback(GLenum target, GLuint id);
305 	void glPauseTransformFeedback();
306 	void glResumeTransformFeedback();
307 	GLboolean glIsTransformFeedback(GLuint id);
308 	void glTransformFeedbackVaryings(GLuint program, GLsizei count, const char** varyings, GLenum bufferMode);
309 	void glTransformFeedbackVaryingsAEMU(GLuint program, GLsizei count, const char* packedVaryings, GLuint packedVaryingsLen, GLenum bufferMode);
310 	void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, char* name);
311 	void glGenSamplers(GLsizei n, GLuint* samplers);
312 	void glDeleteSamplers(GLsizei n, const GLuint* samplers);
313 	void glBindSampler(GLuint unit, GLuint sampler);
314 	void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
315 	void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
316 	void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* params);
317 	void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* params);
318 	void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params);
319 	void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params);
320 	GLboolean glIsSampler(GLuint sampler);
321 	void glGenQueries(GLsizei n, GLuint* queries);
322 	void glDeleteQueries(GLsizei n, const GLuint* queries);
323 	void glBeginQuery(GLenum target, GLuint query);
324 	void glEndQuery(GLenum target);
325 	void glGetQueryiv(GLenum target, GLenum pname, GLint* params);
326 	void glGetQueryObjectuiv(GLuint query, GLenum pname, GLuint* params);
327 	GLboolean glIsQuery(GLuint query);
328 	void glProgramParameteri(GLuint program, GLenum pname, GLint value);
329 	void glProgramBinary(GLuint program, GLenum binaryFormat, const void* binary, GLsizei length);
330 	void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void* binary);
331 	GLint glGetFragDataLocation(GLuint program, const char* name);
332 	void glGetInteger64v(GLenum pname, GLint64* data);
333 	void glGetIntegeri_v(GLenum target, GLuint index, GLint* data);
334 	void glGetInteger64i_v(GLenum target, GLuint index, GLint64* data);
335 	void glTexImage3D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* data);
336 	void glTexImage3DOffsetAEMU(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLuint offset);
337 	void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
338 	void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* data);
339 	void glTexSubImage3DOffsetAEMU(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLuint offset);
340 	void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
341 	void glCompressedTexImage3DOffsetAEMU(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLuint offset);
342 	void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
343 	void glCompressedTexSubImage3DOffsetAEMU(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLuint data);
344 	void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
345 	const GLubyte* glGetStringi(GLenum name, GLuint index);
346 	void glGetBooleani_v(GLenum target, GLuint index, GLboolean* data);
347 	void glMemoryBarrier(GLbitfield barriers);
348 	void glMemoryBarrierByRegion(GLbitfield barriers);
349 	void glGenProgramPipelines(GLsizei n, GLuint* pipelines);
350 	void glDeleteProgramPipelines(GLsizei n, const GLuint* pipelines);
351 	void glBindProgramPipeline(GLuint pipeline);
352 	void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint* params);
353 	void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog);
354 	void glValidateProgramPipeline(GLuint pipeline);
355 	GLboolean glIsProgramPipeline(GLuint pipeline);
356 	void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
357 	void glActiveShaderProgram(GLuint pipeline, GLuint program);
358 	GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const char** strings);
359 	GLuint glCreateShaderProgramvAEMU(GLenum type, GLsizei count, const char* packedStrings, GLuint packedLen);
360 	void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
361 	void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
362 	void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
363 	void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
364 	void glProgramUniform1i(GLuint program, GLint location, GLint v0);
365 	void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
366 	void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
367 	void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
368 	void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
369 	void glProgramUniform2ui(GLuint program, GLint location, GLint v0, GLuint v1);
370 	void glProgramUniform3ui(GLuint program, GLint location, GLint v0, GLint v1, GLuint v2);
371 	void glProgramUniform4ui(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLuint v3);
372 	void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat* value);
373 	void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat* value);
374 	void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat* value);
375 	void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat* value);
376 	void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint* value);
377 	void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint* value);
378 	void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint* value);
379 	void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint* value);
380 	void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint* value);
381 	void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint* value);
382 	void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint* value);
383 	void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint* value);
384 	void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
385 	void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
386 	void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
387 	void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
388 	void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
389 	void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
390 	void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
391 	void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
392 	void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
393 	void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint* params);
394 	void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei* length, GLint* params);
395 	GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const char* name);
396 	GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const char* name);
397 	void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, char* name);
398 	void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
399 	void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
400 	void glDispatchComputeIndirect(GLintptr indirect);
401 	void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLintptr stride);
402 	void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
403 	void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
404 	void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
405 	void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
406 	void glDrawArraysIndirect(GLenum mode, const void* indirect);
407 	void glDrawArraysIndirectDataAEMU(GLenum mode, const void* indirect, GLuint datalen);
408 	void glDrawArraysIndirectOffsetAEMU(GLenum mode, GLuint offset);
409 	void glDrawElementsIndirect(GLenum mode, GLenum type, const void* indirect);
410 	void glDrawElementsIndirectDataAEMU(GLenum mode, GLenum type, const void* indirect, GLuint datalen);
411 	void glDrawElementsIndirectOffsetAEMU(GLenum mode, GLenum type, GLuint offset);
412 	void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
413 	void glSampleMaski(GLuint maskNumber, GLbitfield mask);
414 	void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat* val);
415 	void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
416 	void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint* params);
417 	void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params);
418 	void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params);
419 };
420 
421 #ifndef GET_CONTEXT
422 static gl2_client_context_t::CONTEXT_ACCESSOR_TYPE *getCurrentContext = NULL;
setContextAccessor(CONTEXT_ACCESSOR_TYPE * f)423 void gl2_client_context_t::setContextAccessor(CONTEXT_ACCESSOR_TYPE *f) { getCurrentContext = f; }
424 #define GET_CONTEXT gl2_client_context_t * ctx = getCurrentContext()
425 #endif
426 
glActiveTexture(GLenum texture)427 void glActiveTexture(GLenum texture)
428 {
429 	GET_CONTEXT;
430 	ctx->glActiveTexture(ctx, texture);
431 }
432 
glAttachShader(GLuint program,GLuint shader)433 void glAttachShader(GLuint program, GLuint shader)
434 {
435 	GET_CONTEXT;
436 	ctx->glAttachShader(ctx, program, shader);
437 }
438 
glBindAttribLocation(GLuint program,GLuint index,const GLchar * name)439 void glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
440 {
441 	GET_CONTEXT;
442 	ctx->glBindAttribLocation(ctx, program, index, name);
443 }
444 
glBindBuffer(GLenum target,GLuint buffer)445 void glBindBuffer(GLenum target, GLuint buffer)
446 {
447 	GET_CONTEXT;
448 	ctx->glBindBuffer(ctx, target, buffer);
449 }
450 
glBindFramebuffer(GLenum target,GLuint framebuffer)451 void glBindFramebuffer(GLenum target, GLuint framebuffer)
452 {
453 	GET_CONTEXT;
454 	ctx->glBindFramebuffer(ctx, target, framebuffer);
455 }
456 
glBindRenderbuffer(GLenum target,GLuint renderbuffer)457 void glBindRenderbuffer(GLenum target, GLuint renderbuffer)
458 {
459 	GET_CONTEXT;
460 	ctx->glBindRenderbuffer(ctx, target, renderbuffer);
461 }
462 
glBindTexture(GLenum target,GLuint texture)463 void glBindTexture(GLenum target, GLuint texture)
464 {
465 	GET_CONTEXT;
466 	ctx->glBindTexture(ctx, target, texture);
467 }
468 
glBlendColor(GLclampf red,GLclampf green,GLclampf blue,GLclampf alpha)469 void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
470 {
471 	GET_CONTEXT;
472 	ctx->glBlendColor(ctx, red, green, blue, alpha);
473 }
474 
glBlendEquation(GLenum mode)475 void glBlendEquation(GLenum mode)
476 {
477 	GET_CONTEXT;
478 	ctx->glBlendEquation(ctx, mode);
479 }
480 
glBlendEquationSeparate(GLenum modeRGB,GLenum modeAlpha)481 void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
482 {
483 	GET_CONTEXT;
484 	ctx->glBlendEquationSeparate(ctx, modeRGB, modeAlpha);
485 }
486 
glBlendFunc(GLenum sfactor,GLenum dfactor)487 void glBlendFunc(GLenum sfactor, GLenum dfactor)
488 {
489 	GET_CONTEXT;
490 	ctx->glBlendFunc(ctx, sfactor, dfactor);
491 }
492 
glBlendFuncSeparate(GLenum srcRGB,GLenum dstRGB,GLenum srcAlpha,GLenum dstAlpha)493 void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
494 {
495 	GET_CONTEXT;
496 	ctx->glBlendFuncSeparate(ctx, srcRGB, dstRGB, srcAlpha, dstAlpha);
497 }
498 
glBufferData(GLenum target,GLsizeiptr size,const GLvoid * data,GLenum usage)499 void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
500 {
501 	GET_CONTEXT;
502 	ctx->glBufferData(ctx, target, size, data, usage);
503 }
504 
glBufferSubData(GLenum target,GLintptr offset,GLsizeiptr size,const GLvoid * data)505 void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
506 {
507 	GET_CONTEXT;
508 	ctx->glBufferSubData(ctx, target, offset, size, data);
509 }
510 
glCheckFramebufferStatus(GLenum target)511 GLenum glCheckFramebufferStatus(GLenum target)
512 {
513 	GET_CONTEXT;
514 	return ctx->glCheckFramebufferStatus(ctx, target);
515 }
516 
glClear(GLbitfield mask)517 void glClear(GLbitfield mask)
518 {
519 	GET_CONTEXT;
520 	ctx->glClear(ctx, mask);
521 }
522 
glClearColor(GLclampf red,GLclampf green,GLclampf blue,GLclampf alpha)523 void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
524 {
525 	GET_CONTEXT;
526 	ctx->glClearColor(ctx, red, green, blue, alpha);
527 }
528 
glClearDepthf(GLclampf depth)529 void glClearDepthf(GLclampf depth)
530 {
531 	GET_CONTEXT;
532 	ctx->glClearDepthf(ctx, depth);
533 }
534 
glClearStencil(GLint s)535 void glClearStencil(GLint s)
536 {
537 	GET_CONTEXT;
538 	ctx->glClearStencil(ctx, s);
539 }
540 
glColorMask(GLboolean red,GLboolean green,GLboolean blue,GLboolean alpha)541 void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
542 {
543 	GET_CONTEXT;
544 	ctx->glColorMask(ctx, red, green, blue, alpha);
545 }
546 
glCompileShader(GLuint shader)547 void glCompileShader(GLuint shader)
548 {
549 	GET_CONTEXT;
550 	ctx->glCompileShader(ctx, shader);
551 }
552 
glCompressedTexImage2D(GLenum target,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLint border,GLsizei imageSize,const GLvoid * data)553 void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
554 {
555 	GET_CONTEXT;
556 	 if(imageSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
557 	ctx->glCompressedTexImage2D(ctx, target, level, internalformat, width, height, border, imageSize, data);
558 }
559 
glCompressedTexSubImage2D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLsizei imageSize,const GLvoid * data)560 void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
561 {
562 	GET_CONTEXT;
563 	 if(imageSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
564 	ctx->glCompressedTexSubImage2D(ctx, target, level, xoffset, yoffset, width, height, format, imageSize, data);
565 }
566 
glCopyTexImage2D(GLenum target,GLint level,GLenum internalformat,GLint x,GLint y,GLsizei width,GLsizei height,GLint border)567 void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
568 {
569 	GET_CONTEXT;
570 	ctx->glCopyTexImage2D(ctx, target, level, internalformat, x, y, width, height, border);
571 }
572 
glCopyTexSubImage2D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint x,GLint y,GLsizei width,GLsizei height)573 void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
574 {
575 	GET_CONTEXT;
576 	ctx->glCopyTexSubImage2D(ctx, target, level, xoffset, yoffset, x, y, width, height);
577 }
578 
glCreateProgram()579 GLuint glCreateProgram()
580 {
581 	GET_CONTEXT;
582 	return ctx->glCreateProgram(ctx);
583 }
584 
glCreateShader(GLenum type)585 GLuint glCreateShader(GLenum type)
586 {
587 	GET_CONTEXT;
588 	return ctx->glCreateShader(ctx, type);
589 }
590 
glCullFace(GLenum mode)591 void glCullFace(GLenum mode)
592 {
593 	GET_CONTEXT;
594 	ctx->glCullFace(ctx, mode);
595 }
596 
glDeleteBuffers(GLsizei n,const GLuint * buffers)597 void glDeleteBuffers(GLsizei n, const GLuint* buffers)
598 {
599 	GET_CONTEXT;
600 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
601 	ctx->glDeleteBuffers(ctx, n, buffers);
602 }
603 
glDeleteFramebuffers(GLsizei n,const GLuint * framebuffers)604 void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
605 {
606 	GET_CONTEXT;
607 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
608 	ctx->glDeleteFramebuffers(ctx, n, framebuffers);
609 }
610 
glDeleteProgram(GLuint program)611 void glDeleteProgram(GLuint program)
612 {
613 	GET_CONTEXT;
614 	ctx->glDeleteProgram(ctx, program);
615 }
616 
glDeleteRenderbuffers(GLsizei n,const GLuint * renderbuffers)617 void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
618 {
619 	GET_CONTEXT;
620 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
621 	ctx->glDeleteRenderbuffers(ctx, n, renderbuffers);
622 }
623 
glDeleteShader(GLuint shader)624 void glDeleteShader(GLuint shader)
625 {
626 	GET_CONTEXT;
627 	ctx->glDeleteShader(ctx, shader);
628 }
629 
glDeleteTextures(GLsizei n,const GLuint * textures)630 void glDeleteTextures(GLsizei n, const GLuint* textures)
631 {
632 	GET_CONTEXT;
633 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
634 	ctx->glDeleteTextures(ctx, n, textures);
635 }
636 
glDepthFunc(GLenum func)637 void glDepthFunc(GLenum func)
638 {
639 	GET_CONTEXT;
640 	ctx->glDepthFunc(ctx, func);
641 }
642 
glDepthMask(GLboolean flag)643 void glDepthMask(GLboolean flag)
644 {
645 	GET_CONTEXT;
646 	ctx->glDepthMask(ctx, flag);
647 }
648 
glDepthRangef(GLclampf zNear,GLclampf zFar)649 void glDepthRangef(GLclampf zNear, GLclampf zFar)
650 {
651 	GET_CONTEXT;
652 	ctx->glDepthRangef(ctx, zNear, zFar);
653 }
654 
glDetachShader(GLuint program,GLuint shader)655 void glDetachShader(GLuint program, GLuint shader)
656 {
657 	GET_CONTEXT;
658 	ctx->glDetachShader(ctx, program, shader);
659 }
660 
glDisable(GLenum cap)661 void glDisable(GLenum cap)
662 {
663 	GET_CONTEXT;
664 	ctx->glDisable(ctx, cap);
665 }
666 
glDisableVertexAttribArray(GLuint index)667 void glDisableVertexAttribArray(GLuint index)
668 {
669 	GET_CONTEXT;
670 	ctx->glDisableVertexAttribArray(ctx, index);
671 }
672 
glDrawArrays(GLenum mode,GLint first,GLsizei count)673 void glDrawArrays(GLenum mode, GLint first, GLsizei count)
674 {
675 	GET_CONTEXT;
676 	ctx->glDrawArrays(ctx, mode, first, count);
677 }
678 
glDrawElements(GLenum mode,GLsizei count,GLenum type,const GLvoid * indices)679 void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
680 {
681 	GET_CONTEXT;
682 	ctx->glDrawElements(ctx, mode, count, type, indices);
683 }
684 
glEnable(GLenum cap)685 void glEnable(GLenum cap)
686 {
687 	GET_CONTEXT;
688 	ctx->glEnable(ctx, cap);
689 }
690 
glEnableVertexAttribArray(GLuint index)691 void glEnableVertexAttribArray(GLuint index)
692 {
693 	GET_CONTEXT;
694 	ctx->glEnableVertexAttribArray(ctx, index);
695 }
696 
glFinish()697 void glFinish()
698 {
699 	GET_CONTEXT;
700 	ctx->glFinish(ctx);
701 }
702 
glFlush()703 void glFlush()
704 {
705 	GET_CONTEXT;
706 	ctx->glFlush(ctx);
707 }
708 
glFramebufferRenderbuffer(GLenum target,GLenum attachment,GLenum renderbuffertarget,GLuint renderbuffer)709 void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
710 {
711 	GET_CONTEXT;
712 	ctx->glFramebufferRenderbuffer(ctx, target, attachment, renderbuffertarget, renderbuffer);
713 }
714 
glFramebufferTexture2D(GLenum target,GLenum attachment,GLenum textarget,GLuint texture,GLint level)715 void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
716 {
717 	GET_CONTEXT;
718 	ctx->glFramebufferTexture2D(ctx, target, attachment, textarget, texture, level);
719 }
720 
glFrontFace(GLenum mode)721 void glFrontFace(GLenum mode)
722 {
723 	GET_CONTEXT;
724 	ctx->glFrontFace(ctx, mode);
725 }
726 
glGenBuffers(GLsizei n,GLuint * buffers)727 void glGenBuffers(GLsizei n, GLuint* buffers)
728 {
729 	GET_CONTEXT;
730 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
731 	ctx->glGenBuffers(ctx, n, buffers);
732 }
733 
glGenerateMipmap(GLenum target)734 void glGenerateMipmap(GLenum target)
735 {
736 	GET_CONTEXT;
737 	ctx->glGenerateMipmap(ctx, target);
738 }
739 
glGenFramebuffers(GLsizei n,GLuint * framebuffers)740 void glGenFramebuffers(GLsizei n, GLuint* framebuffers)
741 {
742 	GET_CONTEXT;
743 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
744 	ctx->glGenFramebuffers(ctx, n, framebuffers);
745 }
746 
glGenRenderbuffers(GLsizei n,GLuint * renderbuffers)747 void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
748 {
749 	GET_CONTEXT;
750 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
751 	ctx->glGenRenderbuffers(ctx, n, renderbuffers);
752 }
753 
glGenTextures(GLsizei n,GLuint * textures)754 void glGenTextures(GLsizei n, GLuint* textures)
755 {
756 	GET_CONTEXT;
757 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
758 	ctx->glGenTextures(ctx, n, textures);
759 }
760 
glGetActiveAttrib(GLuint program,GLuint index,GLsizei bufsize,GLsizei * length,GLint * size,GLenum * type,GLchar * name)761 void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
762 {
763 	GET_CONTEXT;
764 	 if(bufsize<0){ ctx->setError(GL_INVALID_VALUE); return; }
765 	ctx->glGetActiveAttrib(ctx, program, index, bufsize, length, size, type, name);
766 }
767 
glGetActiveUniform(GLuint program,GLuint index,GLsizei bufsize,GLsizei * length,GLint * size,GLenum * type,GLchar * name)768 void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
769 {
770 	GET_CONTEXT;
771 	 if(bufsize<0){ ctx->setError(GL_INVALID_VALUE); return; }
772 	ctx->glGetActiveUniform(ctx, program, index, bufsize, length, size, type, name);
773 }
774 
glGetAttachedShaders(GLuint program,GLsizei maxcount,GLsizei * count,GLuint * shaders)775 void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
776 {
777 	GET_CONTEXT;
778 	ctx->glGetAttachedShaders(ctx, program, maxcount, count, shaders);
779 }
780 
glGetAttribLocation(GLuint program,const GLchar * name)781 int glGetAttribLocation(GLuint program, const GLchar* name)
782 {
783 	GET_CONTEXT;
784 	return ctx->glGetAttribLocation(ctx, program, name);
785 }
786 
glGetBooleanv(GLenum pname,GLboolean * params)787 void glGetBooleanv(GLenum pname, GLboolean* params)
788 {
789 	GET_CONTEXT;
790 	ctx->glGetBooleanv(ctx, pname, params);
791 }
792 
glGetBufferParameteriv(GLenum target,GLenum pname,GLint * params)793 void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
794 {
795 	GET_CONTEXT;
796 	ctx->glGetBufferParameteriv(ctx, target, pname, params);
797 }
798 
glGetError()799 GLenum glGetError()
800 {
801 	GET_CONTEXT;
802 	return ctx->glGetError(ctx);
803 }
804 
glGetFloatv(GLenum pname,GLfloat * params)805 void glGetFloatv(GLenum pname, GLfloat* params)
806 {
807 	GET_CONTEXT;
808 	ctx->glGetFloatv(ctx, pname, params);
809 }
810 
glGetFramebufferAttachmentParameteriv(GLenum target,GLenum attachment,GLenum pname,GLint * params)811 void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
812 {
813 	GET_CONTEXT;
814 	ctx->glGetFramebufferAttachmentParameteriv(ctx, target, attachment, pname, params);
815 }
816 
glGetIntegerv(GLenum pname,GLint * params)817 void glGetIntegerv(GLenum pname, GLint* params)
818 {
819 	GET_CONTEXT;
820 	ctx->glGetIntegerv(ctx, pname, params);
821 }
822 
glGetProgramiv(GLuint program,GLenum pname,GLint * params)823 void glGetProgramiv(GLuint program, GLenum pname, GLint* params)
824 {
825 	GET_CONTEXT;
826 	ctx->glGetProgramiv(ctx, program, pname, params);
827 }
828 
glGetProgramInfoLog(GLuint program,GLsizei bufsize,GLsizei * length,GLchar * infolog)829 void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
830 {
831 	GET_CONTEXT;
832 	 if(bufsize<0){ ctx->setError(GL_INVALID_VALUE); return; }
833 	ctx->glGetProgramInfoLog(ctx, program, bufsize, length, infolog);
834 }
835 
glGetRenderbufferParameteriv(GLenum target,GLenum pname,GLint * params)836 void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
837 {
838 	GET_CONTEXT;
839 	ctx->glGetRenderbufferParameteriv(ctx, target, pname, params);
840 }
841 
glGetShaderiv(GLuint shader,GLenum pname,GLint * params)842 void glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
843 {
844 	GET_CONTEXT;
845 	ctx->glGetShaderiv(ctx, shader, pname, params);
846 }
847 
glGetShaderInfoLog(GLuint shader,GLsizei bufsize,GLsizei * length,GLchar * infolog)848 void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
849 {
850 	GET_CONTEXT;
851 	 if(bufsize<0){ ctx->setError(GL_INVALID_VALUE); return; }
852 	ctx->glGetShaderInfoLog(ctx, shader, bufsize, length, infolog);
853 }
854 
glGetShaderPrecisionFormat(GLenum shadertype,GLenum precisiontype,GLint * range,GLint * precision)855 void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
856 {
857 	GET_CONTEXT;
858 	ctx->glGetShaderPrecisionFormat(ctx, shadertype, precisiontype, range, precision);
859 }
860 
glGetShaderSource(GLuint shader,GLsizei bufsize,GLsizei * length,GLchar * source)861 void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
862 {
863 	GET_CONTEXT;
864 	 if(bufsize<0){ ctx->setError(GL_INVALID_VALUE); return; }
865 	ctx->glGetShaderSource(ctx, shader, bufsize, length, source);
866 }
867 
glGetString(GLenum name)868 const GLubyte* glGetString(GLenum name)
869 {
870 	GET_CONTEXT;
871 	return ctx->glGetString(ctx, name);
872 }
873 
glGetTexParameterfv(GLenum target,GLenum pname,GLfloat * params)874 void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
875 {
876 	GET_CONTEXT;
877 	ctx->glGetTexParameterfv(ctx, target, pname, params);
878 }
879 
glGetTexParameteriv(GLenum target,GLenum pname,GLint * params)880 void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
881 {
882 	GET_CONTEXT;
883 	ctx->glGetTexParameteriv(ctx, target, pname, params);
884 }
885 
glGetUniformfv(GLuint program,GLint location,GLfloat * params)886 void glGetUniformfv(GLuint program, GLint location, GLfloat* params)
887 {
888 	GET_CONTEXT;
889 	ctx->glGetUniformfv(ctx, program, location, params);
890 }
891 
glGetUniformiv(GLuint program,GLint location,GLint * params)892 void glGetUniformiv(GLuint program, GLint location, GLint* params)
893 {
894 	GET_CONTEXT;
895 	ctx->glGetUniformiv(ctx, program, location, params);
896 }
897 
glGetUniformLocation(GLuint program,const GLchar * name)898 int glGetUniformLocation(GLuint program, const GLchar* name)
899 {
900 	GET_CONTEXT;
901 	return ctx->glGetUniformLocation(ctx, program, name);
902 }
903 
glGetVertexAttribfv(GLuint index,GLenum pname,GLfloat * params)904 void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
905 {
906 	GET_CONTEXT;
907 	ctx->glGetVertexAttribfv(ctx, index, pname, params);
908 }
909 
glGetVertexAttribiv(GLuint index,GLenum pname,GLint * params)910 void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
911 {
912 	GET_CONTEXT;
913 	ctx->glGetVertexAttribiv(ctx, index, pname, params);
914 }
915 
glGetVertexAttribPointerv(GLuint index,GLenum pname,GLvoid ** pointer)916 void glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
917 {
918 	GET_CONTEXT;
919 	ctx->glGetVertexAttribPointerv(ctx, index, pname, pointer);
920 }
921 
glHint(GLenum target,GLenum mode)922 void glHint(GLenum target, GLenum mode)
923 {
924 	GET_CONTEXT;
925 	ctx->glHint(ctx, target, mode);
926 }
927 
glIsBuffer(GLuint buffer)928 GLboolean glIsBuffer(GLuint buffer)
929 {
930 	GET_CONTEXT;
931 	return ctx->glIsBuffer(ctx, buffer);
932 }
933 
glIsEnabled(GLenum cap)934 GLboolean glIsEnabled(GLenum cap)
935 {
936 	GET_CONTEXT;
937 	return ctx->glIsEnabled(ctx, cap);
938 }
939 
glIsFramebuffer(GLuint framebuffer)940 GLboolean glIsFramebuffer(GLuint framebuffer)
941 {
942 	GET_CONTEXT;
943 	return ctx->glIsFramebuffer(ctx, framebuffer);
944 }
945 
glIsProgram(GLuint program)946 GLboolean glIsProgram(GLuint program)
947 {
948 	GET_CONTEXT;
949 	return ctx->glIsProgram(ctx, program);
950 }
951 
glIsRenderbuffer(GLuint renderbuffer)952 GLboolean glIsRenderbuffer(GLuint renderbuffer)
953 {
954 	GET_CONTEXT;
955 	return ctx->glIsRenderbuffer(ctx, renderbuffer);
956 }
957 
glIsShader(GLuint shader)958 GLboolean glIsShader(GLuint shader)
959 {
960 	GET_CONTEXT;
961 	return ctx->glIsShader(ctx, shader);
962 }
963 
glIsTexture(GLuint texture)964 GLboolean glIsTexture(GLuint texture)
965 {
966 	GET_CONTEXT;
967 	return ctx->glIsTexture(ctx, texture);
968 }
969 
glLineWidth(GLfloat width)970 void glLineWidth(GLfloat width)
971 {
972 	GET_CONTEXT;
973 	ctx->glLineWidth(ctx, width);
974 }
975 
glLinkProgram(GLuint program)976 void glLinkProgram(GLuint program)
977 {
978 	GET_CONTEXT;
979 	ctx->glLinkProgram(ctx, program);
980 }
981 
glPixelStorei(GLenum pname,GLint param)982 void glPixelStorei(GLenum pname, GLint param)
983 {
984 	GET_CONTEXT;
985 	ctx->glPixelStorei(ctx, pname, param);
986 }
987 
glPolygonOffset(GLfloat factor,GLfloat units)988 void glPolygonOffset(GLfloat factor, GLfloat units)
989 {
990 	GET_CONTEXT;
991 	ctx->glPolygonOffset(ctx, factor, units);
992 }
993 
glReadPixels(GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLvoid * pixels)994 void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
995 {
996 	GET_CONTEXT;
997 	ctx->glReadPixels(ctx, x, y, width, height, format, type, pixels);
998 }
999 
glReleaseShaderCompiler()1000 void glReleaseShaderCompiler()
1001 {
1002 	GET_CONTEXT;
1003 	ctx->glReleaseShaderCompiler(ctx);
1004 }
1005 
glRenderbufferStorage(GLenum target,GLenum internalformat,GLsizei width,GLsizei height)1006 void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1007 {
1008 	GET_CONTEXT;
1009 	ctx->glRenderbufferStorage(ctx, target, internalformat, width, height);
1010 }
1011 
glSampleCoverage(GLclampf value,GLboolean invert)1012 void glSampleCoverage(GLclampf value, GLboolean invert)
1013 {
1014 	GET_CONTEXT;
1015 	ctx->glSampleCoverage(ctx, value, invert);
1016 }
1017 
glScissor(GLint x,GLint y,GLsizei width,GLsizei height)1018 void glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
1019 {
1020 	GET_CONTEXT;
1021 	ctx->glScissor(ctx, x, y, width, height);
1022 }
1023 
glShaderBinary(GLsizei n,const GLuint * shaders,GLenum binaryformat,const GLvoid * binary,GLsizei length)1024 void glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
1025 {
1026 	GET_CONTEXT;
1027 	ctx->glShaderBinary(ctx, n, shaders, binaryformat, binary, length);
1028 }
1029 
glShaderSource(GLuint shader,GLsizei count,const GLchar * const * string,const GLint * length)1030 void glShaderSource(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length)
1031 {
1032 	GET_CONTEXT;
1033 	ctx->glShaderSource(ctx, shader, count, string, length);
1034 }
1035 
glStencilFunc(GLenum func,GLint ref,GLuint mask)1036 void glStencilFunc(GLenum func, GLint ref, GLuint mask)
1037 {
1038 	GET_CONTEXT;
1039 	ctx->glStencilFunc(ctx, func, ref, mask);
1040 }
1041 
glStencilFuncSeparate(GLenum face,GLenum func,GLint ref,GLuint mask)1042 void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
1043 {
1044 	GET_CONTEXT;
1045 	ctx->glStencilFuncSeparate(ctx, face, func, ref, mask);
1046 }
1047 
glStencilMask(GLuint mask)1048 void glStencilMask(GLuint mask)
1049 {
1050 	GET_CONTEXT;
1051 	ctx->glStencilMask(ctx, mask);
1052 }
1053 
glStencilMaskSeparate(GLenum face,GLuint mask)1054 void glStencilMaskSeparate(GLenum face, GLuint mask)
1055 {
1056 	GET_CONTEXT;
1057 	ctx->glStencilMaskSeparate(ctx, face, mask);
1058 }
1059 
glStencilOp(GLenum fail,GLenum zfail,GLenum zpass)1060 void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
1061 {
1062 	GET_CONTEXT;
1063 	ctx->glStencilOp(ctx, fail, zfail, zpass);
1064 }
1065 
glStencilOpSeparate(GLenum face,GLenum fail,GLenum zfail,GLenum zpass)1066 void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
1067 {
1068 	GET_CONTEXT;
1069 	ctx->glStencilOpSeparate(ctx, face, fail, zfail, zpass);
1070 }
1071 
glTexImage2D(GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,const GLvoid * pixels)1072 void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1073 {
1074 	GET_CONTEXT;
1075 	ctx->glTexImage2D(ctx, target, level, internalformat, width, height, border, format, type, pixels);
1076 }
1077 
glTexParameterf(GLenum target,GLenum pname,GLfloat param)1078 void glTexParameterf(GLenum target, GLenum pname, GLfloat param)
1079 {
1080 	GET_CONTEXT;
1081 	ctx->glTexParameterf(ctx, target, pname, param);
1082 }
1083 
glTexParameterfv(GLenum target,GLenum pname,const GLfloat * params)1084 void glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
1085 {
1086 	GET_CONTEXT;
1087 	ctx->glTexParameterfv(ctx, target, pname, params);
1088 }
1089 
glTexParameteri(GLenum target,GLenum pname,GLint param)1090 void glTexParameteri(GLenum target, GLenum pname, GLint param)
1091 {
1092 	GET_CONTEXT;
1093 	ctx->glTexParameteri(ctx, target, pname, param);
1094 }
1095 
glTexParameteriv(GLenum target,GLenum pname,const GLint * params)1096 void glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
1097 {
1098 	GET_CONTEXT;
1099 	ctx->glTexParameteriv(ctx, target, pname, params);
1100 }
1101 
glTexSubImage2D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const GLvoid * pixels)1102 void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
1103 {
1104 	GET_CONTEXT;
1105 	ctx->glTexSubImage2D(ctx, target, level, xoffset, yoffset, width, height, format, type, pixels);
1106 }
1107 
glUniform1f(GLint location,GLfloat x)1108 void glUniform1f(GLint location, GLfloat x)
1109 {
1110 	GET_CONTEXT;
1111 	ctx->glUniform1f(ctx, location, x);
1112 }
1113 
glUniform1fv(GLint location,GLsizei count,const GLfloat * v)1114 void glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
1115 {
1116 	GET_CONTEXT;
1117 	ctx->glUniform1fv(ctx, location, count, v);
1118 }
1119 
glUniform1i(GLint location,GLint x)1120 void glUniform1i(GLint location, GLint x)
1121 {
1122 	GET_CONTEXT;
1123 	ctx->glUniform1i(ctx, location, x);
1124 }
1125 
glUniform1iv(GLint location,GLsizei count,const GLint * v)1126 void glUniform1iv(GLint location, GLsizei count, const GLint* v)
1127 {
1128 	GET_CONTEXT;
1129 	ctx->glUniform1iv(ctx, location, count, v);
1130 }
1131 
glUniform2f(GLint location,GLfloat x,GLfloat y)1132 void glUniform2f(GLint location, GLfloat x, GLfloat y)
1133 {
1134 	GET_CONTEXT;
1135 	ctx->glUniform2f(ctx, location, x, y);
1136 }
1137 
glUniform2fv(GLint location,GLsizei count,const GLfloat * v)1138 void glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
1139 {
1140 	GET_CONTEXT;
1141 	ctx->glUniform2fv(ctx, location, count, v);
1142 }
1143 
glUniform2i(GLint location,GLint x,GLint y)1144 void glUniform2i(GLint location, GLint x, GLint y)
1145 {
1146 	GET_CONTEXT;
1147 	ctx->glUniform2i(ctx, location, x, y);
1148 }
1149 
glUniform2iv(GLint location,GLsizei count,const GLint * v)1150 void glUniform2iv(GLint location, GLsizei count, const GLint* v)
1151 {
1152 	GET_CONTEXT;
1153 	ctx->glUniform2iv(ctx, location, count, v);
1154 }
1155 
glUniform3f(GLint location,GLfloat x,GLfloat y,GLfloat z)1156 void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
1157 {
1158 	GET_CONTEXT;
1159 	ctx->glUniform3f(ctx, location, x, y, z);
1160 }
1161 
glUniform3fv(GLint location,GLsizei count,const GLfloat * v)1162 void glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
1163 {
1164 	GET_CONTEXT;
1165 	ctx->glUniform3fv(ctx, location, count, v);
1166 }
1167 
glUniform3i(GLint location,GLint x,GLint y,GLint z)1168 void glUniform3i(GLint location, GLint x, GLint y, GLint z)
1169 {
1170 	GET_CONTEXT;
1171 	ctx->glUniform3i(ctx, location, x, y, z);
1172 }
1173 
glUniform3iv(GLint location,GLsizei count,const GLint * v)1174 void glUniform3iv(GLint location, GLsizei count, const GLint* v)
1175 {
1176 	GET_CONTEXT;
1177 	ctx->glUniform3iv(ctx, location, count, v);
1178 }
1179 
glUniform4f(GLint location,GLfloat x,GLfloat y,GLfloat z,GLfloat w)1180 void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1181 {
1182 	GET_CONTEXT;
1183 	ctx->glUniform4f(ctx, location, x, y, z, w);
1184 }
1185 
glUniform4fv(GLint location,GLsizei count,const GLfloat * v)1186 void glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
1187 {
1188 	GET_CONTEXT;
1189 	ctx->glUniform4fv(ctx, location, count, v);
1190 }
1191 
glUniform4i(GLint location,GLint x,GLint y,GLint z,GLint w)1192 void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
1193 {
1194 	GET_CONTEXT;
1195 	ctx->glUniform4i(ctx, location, x, y, z, w);
1196 }
1197 
glUniform4iv(GLint location,GLsizei count,const GLint * v)1198 void glUniform4iv(GLint location, GLsizei count, const GLint* v)
1199 {
1200 	GET_CONTEXT;
1201 	ctx->glUniform4iv(ctx, location, count, v);
1202 }
1203 
glUniformMatrix2fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1204 void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1205 {
1206 	GET_CONTEXT;
1207 	ctx->glUniformMatrix2fv(ctx, location, count, transpose, value);
1208 }
1209 
glUniformMatrix3fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1210 void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1211 {
1212 	GET_CONTEXT;
1213 	ctx->glUniformMatrix3fv(ctx, location, count, transpose, value);
1214 }
1215 
glUniformMatrix4fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1216 void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1217 {
1218 	GET_CONTEXT;
1219 	ctx->glUniformMatrix4fv(ctx, location, count, transpose, value);
1220 }
1221 
glUseProgram(GLuint program)1222 void glUseProgram(GLuint program)
1223 {
1224 	GET_CONTEXT;
1225 	ctx->glUseProgram(ctx, program);
1226 }
1227 
glValidateProgram(GLuint program)1228 void glValidateProgram(GLuint program)
1229 {
1230 	GET_CONTEXT;
1231 	ctx->glValidateProgram(ctx, program);
1232 }
1233 
glVertexAttrib1f(GLuint indx,GLfloat x)1234 void glVertexAttrib1f(GLuint indx, GLfloat x)
1235 {
1236 	GET_CONTEXT;
1237 	ctx->glVertexAttrib1f(ctx, indx, x);
1238 }
1239 
glVertexAttrib1fv(GLuint indx,const GLfloat * values)1240 void glVertexAttrib1fv(GLuint indx, const GLfloat* values)
1241 {
1242 	GET_CONTEXT;
1243 	ctx->glVertexAttrib1fv(ctx, indx, values);
1244 }
1245 
glVertexAttrib2f(GLuint indx,GLfloat x,GLfloat y)1246 void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
1247 {
1248 	GET_CONTEXT;
1249 	ctx->glVertexAttrib2f(ctx, indx, x, y);
1250 }
1251 
glVertexAttrib2fv(GLuint indx,const GLfloat * values)1252 void glVertexAttrib2fv(GLuint indx, const GLfloat* values)
1253 {
1254 	GET_CONTEXT;
1255 	ctx->glVertexAttrib2fv(ctx, indx, values);
1256 }
1257 
glVertexAttrib3f(GLuint indx,GLfloat x,GLfloat y,GLfloat z)1258 void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
1259 {
1260 	GET_CONTEXT;
1261 	ctx->glVertexAttrib3f(ctx, indx, x, y, z);
1262 }
1263 
glVertexAttrib3fv(GLuint indx,const GLfloat * values)1264 void glVertexAttrib3fv(GLuint indx, const GLfloat* values)
1265 {
1266 	GET_CONTEXT;
1267 	ctx->glVertexAttrib3fv(ctx, indx, values);
1268 }
1269 
glVertexAttrib4f(GLuint indx,GLfloat x,GLfloat y,GLfloat z,GLfloat w)1270 void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1271 {
1272 	GET_CONTEXT;
1273 	ctx->glVertexAttrib4f(ctx, indx, x, y, z, w);
1274 }
1275 
glVertexAttrib4fv(GLuint indx,const GLfloat * values)1276 void glVertexAttrib4fv(GLuint indx, const GLfloat* values)
1277 {
1278 	GET_CONTEXT;
1279 	ctx->glVertexAttrib4fv(ctx, indx, values);
1280 }
1281 
glVertexAttribPointer(GLuint indx,GLint size,GLenum type,GLboolean normalized,GLsizei stride,const GLvoid * ptr)1282 void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
1283 {
1284 	GET_CONTEXT;
1285 	ctx->glVertexAttribPointer(ctx, indx, size, type, normalized, stride, ptr);
1286 }
1287 
glViewport(GLint x,GLint y,GLsizei width,GLsizei height)1288 void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
1289 {
1290 	GET_CONTEXT;
1291 	ctx->glViewport(ctx, x, y, width, height);
1292 }
1293 
glEGLImageTargetTexture2DOES(GLenum target,GLeglImageOES image)1294 void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
1295 {
1296 	GET_CONTEXT;
1297 	ctx->glEGLImageTargetTexture2DOES(ctx, target, image);
1298 }
1299 
glEGLImageTargetRenderbufferStorageOES(GLenum target,GLeglImageOES image)1300 void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
1301 {
1302 	GET_CONTEXT;
1303 	ctx->glEGLImageTargetRenderbufferStorageOES(ctx, target, image);
1304 }
1305 
glGetProgramBinaryOES(GLuint program,GLsizei bufSize,GLsizei * length,GLenum * binaryFormat,GLvoid * binary)1306 void glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary)
1307 {
1308 	GET_CONTEXT;
1309 	ctx->glGetProgramBinaryOES(ctx, program, bufSize, length, binaryFormat, binary);
1310 }
1311 
glProgramBinaryOES(GLuint program,GLenum binaryFormat,const GLvoid * binary,GLint length)1312 void glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLint length)
1313 {
1314 	GET_CONTEXT;
1315 	ctx->glProgramBinaryOES(ctx, program, binaryFormat, binary, length);
1316 }
1317 
glMapBufferOES(GLenum target,GLenum access)1318 void* glMapBufferOES(GLenum target, GLenum access)
1319 {
1320 	GET_CONTEXT;
1321 	return ctx->glMapBufferOES(ctx, target, access);
1322 }
1323 
glUnmapBufferOES(GLenum target)1324 GLboolean glUnmapBufferOES(GLenum target)
1325 {
1326 	GET_CONTEXT;
1327 	return ctx->glUnmapBufferOES(ctx, target);
1328 }
1329 
glTexImage3DOES(GLenum target,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLenum format,GLenum type,const GLvoid * pixels)1330 void glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
1331 {
1332 	GET_CONTEXT;
1333 	ctx->glTexImage3DOES(ctx, target, level, internalformat, width, height, depth, border, format, type, pixels);
1334 }
1335 
glTexSubImage3DOES(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,const GLvoid * pixels)1336 void glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
1337 {
1338 	GET_CONTEXT;
1339 	ctx->glTexSubImage3DOES(ctx, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
1340 }
1341 
glCopyTexSubImage3DOES(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLint x,GLint y,GLsizei width,GLsizei height)1342 void glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
1343 {
1344 	GET_CONTEXT;
1345 	ctx->glCopyTexSubImage3DOES(ctx, target, level, xoffset, yoffset, zoffset, x, y, width, height);
1346 }
1347 
glCompressedTexImage3DOES(GLenum target,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLsizei imageSize,const GLvoid * data)1348 void glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
1349 {
1350 	GET_CONTEXT;
1351 	 if(imageSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
1352 	ctx->glCompressedTexImage3DOES(ctx, target, level, internalformat, width, height, depth, border, imageSize, data);
1353 }
1354 
glCompressedTexSubImage3DOES(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLsizei imageSize,const GLvoid * data)1355 void glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
1356 {
1357 	GET_CONTEXT;
1358 	 if(imageSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
1359 	ctx->glCompressedTexSubImage3DOES(ctx, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
1360 }
1361 
glFramebufferTexture3DOES(GLenum target,GLenum attachment,GLenum textarget,GLuint texture,GLint level,GLint zoffset)1362 void glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
1363 {
1364 	GET_CONTEXT;
1365 	ctx->glFramebufferTexture3DOES(ctx, target, attachment, textarget, texture, level, zoffset);
1366 }
1367 
glBindVertexArrayOES(GLuint array)1368 void glBindVertexArrayOES(GLuint array)
1369 {
1370 	GET_CONTEXT;
1371 	ctx->glBindVertexArrayOES(ctx, array);
1372 }
1373 
glDeleteVertexArraysOES(GLsizei n,const GLuint * arrays)1374 void glDeleteVertexArraysOES(GLsizei n, const GLuint* arrays)
1375 {
1376 	GET_CONTEXT;
1377 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
1378 	ctx->glDeleteVertexArraysOES(ctx, n, arrays);
1379 }
1380 
glGenVertexArraysOES(GLsizei n,GLuint * arrays)1381 void glGenVertexArraysOES(GLsizei n, GLuint* arrays)
1382 {
1383 	GET_CONTEXT;
1384 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
1385 	ctx->glGenVertexArraysOES(ctx, n, arrays);
1386 }
1387 
glIsVertexArrayOES(GLuint array)1388 GLboolean glIsVertexArrayOES(GLuint array)
1389 {
1390 	GET_CONTEXT;
1391 	return ctx->glIsVertexArrayOES(ctx, array);
1392 }
1393 
glDiscardFramebufferEXT(GLenum target,GLsizei numAttachments,const GLenum * attachments)1394 void glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum* attachments)
1395 {
1396 	GET_CONTEXT;
1397 	ctx->glDiscardFramebufferEXT(ctx, target, numAttachments, attachments);
1398 }
1399 
glMultiDrawArraysEXT(GLenum mode,const GLint * first,const GLsizei * count,GLsizei primcount)1400 void glMultiDrawArraysEXT(GLenum mode, const GLint* first, const GLsizei* count, GLsizei primcount)
1401 {
1402 	GET_CONTEXT;
1403 	ctx->glMultiDrawArraysEXT(ctx, mode, first, count, primcount);
1404 }
1405 
glMultiDrawElementsEXT(GLenum mode,const GLsizei * count,GLenum type,const GLvoid * const * indices,GLsizei primcount)1406 void glMultiDrawElementsEXT(GLenum mode, const GLsizei* count, GLenum type, const GLvoid* const* indices, GLsizei primcount)
1407 {
1408 	GET_CONTEXT;
1409 	ctx->glMultiDrawElementsEXT(ctx, mode, count, type, indices, primcount);
1410 }
1411 
glGetPerfMonitorGroupsAMD(GLint * numGroups,GLsizei groupsSize,GLuint * groups)1412 void glGetPerfMonitorGroupsAMD(GLint* numGroups, GLsizei groupsSize, GLuint* groups)
1413 {
1414 	GET_CONTEXT;
1415 	ctx->glGetPerfMonitorGroupsAMD(ctx, numGroups, groupsSize, groups);
1416 }
1417 
glGetPerfMonitorCountersAMD(GLuint group,GLint * numCounters,GLint * maxActiveCounters,GLsizei counterSize,GLuint * counters)1418 void glGetPerfMonitorCountersAMD(GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters)
1419 {
1420 	GET_CONTEXT;
1421 	ctx->glGetPerfMonitorCountersAMD(ctx, group, numCounters, maxActiveCounters, counterSize, counters);
1422 }
1423 
glGetPerfMonitorGroupStringAMD(GLuint group,GLsizei bufSize,GLsizei * length,GLchar * groupString)1424 void glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei* length, GLchar* groupString)
1425 {
1426 	GET_CONTEXT;
1427 	ctx->glGetPerfMonitorGroupStringAMD(ctx, group, bufSize, length, groupString);
1428 }
1429 
glGetPerfMonitorCounterStringAMD(GLuint group,GLuint counter,GLsizei bufSize,GLsizei * length,GLchar * counterString)1430 void glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, GLchar* counterString)
1431 {
1432 	GET_CONTEXT;
1433 	ctx->glGetPerfMonitorCounterStringAMD(ctx, group, counter, bufSize, length, counterString);
1434 }
1435 
glGetPerfMonitorCounterInfoAMD(GLuint group,GLuint counter,GLenum pname,GLvoid * data)1436 void glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid* data)
1437 {
1438 	GET_CONTEXT;
1439 	ctx->glGetPerfMonitorCounterInfoAMD(ctx, group, counter, pname, data);
1440 }
1441 
glGenPerfMonitorsAMD(GLsizei n,GLuint * monitors)1442 void glGenPerfMonitorsAMD(GLsizei n, GLuint* monitors)
1443 {
1444 	GET_CONTEXT;
1445 	ctx->glGenPerfMonitorsAMD(ctx, n, monitors);
1446 }
1447 
glDeletePerfMonitorsAMD(GLsizei n,GLuint * monitors)1448 void glDeletePerfMonitorsAMD(GLsizei n, GLuint* monitors)
1449 {
1450 	GET_CONTEXT;
1451 	ctx->glDeletePerfMonitorsAMD(ctx, n, monitors);
1452 }
1453 
glSelectPerfMonitorCountersAMD(GLuint monitor,GLboolean enable,GLuint group,GLint numCounters,GLuint * countersList)1454 void glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList)
1455 {
1456 	GET_CONTEXT;
1457 	ctx->glSelectPerfMonitorCountersAMD(ctx, monitor, enable, group, numCounters, countersList);
1458 }
1459 
glBeginPerfMonitorAMD(GLuint monitor)1460 void glBeginPerfMonitorAMD(GLuint monitor)
1461 {
1462 	GET_CONTEXT;
1463 	ctx->glBeginPerfMonitorAMD(ctx, monitor);
1464 }
1465 
glEndPerfMonitorAMD(GLuint monitor)1466 void glEndPerfMonitorAMD(GLuint monitor)
1467 {
1468 	GET_CONTEXT;
1469 	ctx->glEndPerfMonitorAMD(ctx, monitor);
1470 }
1471 
glGetPerfMonitorCounterDataAMD(GLuint monitor,GLenum pname,GLsizei dataSize,GLuint * data,GLint * bytesWritten)1472 void glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten)
1473 {
1474 	GET_CONTEXT;
1475 	ctx->glGetPerfMonitorCounterDataAMD(ctx, monitor, pname, dataSize, data, bytesWritten);
1476 }
1477 
glRenderbufferStorageMultisampleIMG(GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height)1478 void glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
1479 {
1480 	GET_CONTEXT;
1481 	ctx->glRenderbufferStorageMultisampleIMG(ctx, target, samples, internalformat, width, height);
1482 }
1483 
glFramebufferTexture2DMultisampleIMG(GLenum target,GLenum attachment,GLenum textarget,GLuint texture,GLint level,GLsizei samples)1484 void glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
1485 {
1486 	GET_CONTEXT;
1487 	ctx->glFramebufferTexture2DMultisampleIMG(ctx, target, attachment, textarget, texture, level, samples);
1488 }
1489 
glDeleteFencesNV(GLsizei n,const GLuint * fences)1490 void glDeleteFencesNV(GLsizei n, const GLuint* fences)
1491 {
1492 	GET_CONTEXT;
1493 	ctx->glDeleteFencesNV(ctx, n, fences);
1494 }
1495 
glGenFencesNV(GLsizei n,GLuint * fences)1496 void glGenFencesNV(GLsizei n, GLuint* fences)
1497 {
1498 	GET_CONTEXT;
1499 	ctx->glGenFencesNV(ctx, n, fences);
1500 }
1501 
glIsFenceNV(GLuint fence)1502 GLboolean glIsFenceNV(GLuint fence)
1503 {
1504 	GET_CONTEXT;
1505 	return ctx->glIsFenceNV(ctx, fence);
1506 }
1507 
glTestFenceNV(GLuint fence)1508 GLboolean glTestFenceNV(GLuint fence)
1509 {
1510 	GET_CONTEXT;
1511 	return ctx->glTestFenceNV(ctx, fence);
1512 }
1513 
glGetFenceivNV(GLuint fence,GLenum pname,GLint * params)1514 void glGetFenceivNV(GLuint fence, GLenum pname, GLint* params)
1515 {
1516 	GET_CONTEXT;
1517 	ctx->glGetFenceivNV(ctx, fence, pname, params);
1518 }
1519 
glFinishFenceNV(GLuint fence)1520 void glFinishFenceNV(GLuint fence)
1521 {
1522 	GET_CONTEXT;
1523 	ctx->glFinishFenceNV(ctx, fence);
1524 }
1525 
glSetFenceNV(GLuint fence,GLenum condition)1526 void glSetFenceNV(GLuint fence, GLenum condition)
1527 {
1528 	GET_CONTEXT;
1529 	ctx->glSetFenceNV(ctx, fence, condition);
1530 }
1531 
glCoverageMaskNV(GLboolean mask)1532 void glCoverageMaskNV(GLboolean mask)
1533 {
1534 	GET_CONTEXT;
1535 	ctx->glCoverageMaskNV(ctx, mask);
1536 }
1537 
glCoverageOperationNV(GLenum operation)1538 void glCoverageOperationNV(GLenum operation)
1539 {
1540 	GET_CONTEXT;
1541 	ctx->glCoverageOperationNV(ctx, operation);
1542 }
1543 
glGetDriverControlsQCOM(GLint * num,GLsizei size,GLuint * driverControls)1544 void glGetDriverControlsQCOM(GLint* num, GLsizei size, GLuint* driverControls)
1545 {
1546 	GET_CONTEXT;
1547 	ctx->glGetDriverControlsQCOM(ctx, num, size, driverControls);
1548 }
1549 
glGetDriverControlStringQCOM(GLuint driverControl,GLsizei bufSize,GLsizei * length,GLchar * driverControlString)1550 void glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei* length, GLchar* driverControlString)
1551 {
1552 	GET_CONTEXT;
1553 	ctx->glGetDriverControlStringQCOM(ctx, driverControl, bufSize, length, driverControlString);
1554 }
1555 
glEnableDriverControlQCOM(GLuint driverControl)1556 void glEnableDriverControlQCOM(GLuint driverControl)
1557 {
1558 	GET_CONTEXT;
1559 	ctx->glEnableDriverControlQCOM(ctx, driverControl);
1560 }
1561 
glDisableDriverControlQCOM(GLuint driverControl)1562 void glDisableDriverControlQCOM(GLuint driverControl)
1563 {
1564 	GET_CONTEXT;
1565 	ctx->glDisableDriverControlQCOM(ctx, driverControl);
1566 }
1567 
glExtGetTexturesQCOM(GLuint * textures,GLint maxTextures,GLint * numTextures)1568 void glExtGetTexturesQCOM(GLuint* textures, GLint maxTextures, GLint* numTextures)
1569 {
1570 	GET_CONTEXT;
1571 	ctx->glExtGetTexturesQCOM(ctx, textures, maxTextures, numTextures);
1572 }
1573 
glExtGetBuffersQCOM(GLuint * buffers,GLint maxBuffers,GLint * numBuffers)1574 void glExtGetBuffersQCOM(GLuint* buffers, GLint maxBuffers, GLint* numBuffers)
1575 {
1576 	GET_CONTEXT;
1577 	ctx->glExtGetBuffersQCOM(ctx, buffers, maxBuffers, numBuffers);
1578 }
1579 
glExtGetRenderbuffersQCOM(GLuint * renderbuffers,GLint maxRenderbuffers,GLint * numRenderbuffers)1580 void glExtGetRenderbuffersQCOM(GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers)
1581 {
1582 	GET_CONTEXT;
1583 	ctx->glExtGetRenderbuffersQCOM(ctx, renderbuffers, maxRenderbuffers, numRenderbuffers);
1584 }
1585 
glExtGetFramebuffersQCOM(GLuint * framebuffers,GLint maxFramebuffers,GLint * numFramebuffers)1586 void glExtGetFramebuffersQCOM(GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers)
1587 {
1588 	GET_CONTEXT;
1589 	ctx->glExtGetFramebuffersQCOM(ctx, framebuffers, maxFramebuffers, numFramebuffers);
1590 }
1591 
glExtGetTexLevelParameterivQCOM(GLuint texture,GLenum face,GLint level,GLenum pname,GLint * params)1592 void glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params)
1593 {
1594 	GET_CONTEXT;
1595 	ctx->glExtGetTexLevelParameterivQCOM(ctx, texture, face, level, pname, params);
1596 }
1597 
glExtTexObjectStateOverrideiQCOM(GLenum target,GLenum pname,GLint param)1598 void glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param)
1599 {
1600 	GET_CONTEXT;
1601 	ctx->glExtTexObjectStateOverrideiQCOM(ctx, target, pname, param);
1602 }
1603 
glExtGetTexSubImageQCOM(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,GLvoid * texels)1604 void glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid* texels)
1605 {
1606 	GET_CONTEXT;
1607 	ctx->glExtGetTexSubImageQCOM(ctx, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
1608 }
1609 
glExtGetBufferPointervQCOM(GLenum target,GLvoidptr * params)1610 void glExtGetBufferPointervQCOM(GLenum target, GLvoidptr* params)
1611 {
1612 	GET_CONTEXT;
1613 	ctx->glExtGetBufferPointervQCOM(ctx, target, params);
1614 }
1615 
glExtGetShadersQCOM(GLuint * shaders,GLint maxShaders,GLint * numShaders)1616 void glExtGetShadersQCOM(GLuint* shaders, GLint maxShaders, GLint* numShaders)
1617 {
1618 	GET_CONTEXT;
1619 	ctx->glExtGetShadersQCOM(ctx, shaders, maxShaders, numShaders);
1620 }
1621 
glExtGetProgramsQCOM(GLuint * programs,GLint maxPrograms,GLint * numPrograms)1622 void glExtGetProgramsQCOM(GLuint* programs, GLint maxPrograms, GLint* numPrograms)
1623 {
1624 	GET_CONTEXT;
1625 	ctx->glExtGetProgramsQCOM(ctx, programs, maxPrograms, numPrograms);
1626 }
1627 
glExtIsProgramBinaryQCOM(GLuint program)1628 GLboolean glExtIsProgramBinaryQCOM(GLuint program)
1629 {
1630 	GET_CONTEXT;
1631 	return ctx->glExtIsProgramBinaryQCOM(ctx, program);
1632 }
1633 
glExtGetProgramBinarySourceQCOM(GLuint program,GLenum shadertype,GLchar * source,GLint * length)1634 void glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar* source, GLint* length)
1635 {
1636 	GET_CONTEXT;
1637 	ctx->glExtGetProgramBinarySourceQCOM(ctx, program, shadertype, source, length);
1638 }
1639 
glStartTilingQCOM(GLuint x,GLuint y,GLuint width,GLuint height,GLbitfield preserveMask)1640 void glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask)
1641 {
1642 	GET_CONTEXT;
1643 	ctx->glStartTilingQCOM(ctx, x, y, width, height, preserveMask);
1644 }
1645 
glEndTilingQCOM(GLbitfield preserveMask)1646 void glEndTilingQCOM(GLbitfield preserveMask)
1647 {
1648 	GET_CONTEXT;
1649 	ctx->glEndTilingQCOM(ctx, preserveMask);
1650 }
1651 
glVertexAttribPointerData(GLuint indx,GLint size,GLenum type,GLboolean normalized,GLsizei stride,void * data,GLuint datalen)1652 void glVertexAttribPointerData(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, void* data, GLuint datalen)
1653 {
1654 	GET_CONTEXT;
1655 	ctx->glVertexAttribPointerData(ctx, indx, size, type, normalized, stride, data, datalen);
1656 }
1657 
glVertexAttribPointerOffset(GLuint indx,GLint size,GLenum type,GLboolean normalized,GLsizei stride,GLuint offset)1658 void glVertexAttribPointerOffset(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint offset)
1659 {
1660 	GET_CONTEXT;
1661 	ctx->glVertexAttribPointerOffset(ctx, indx, size, type, normalized, stride, offset);
1662 }
1663 
glDrawElementsOffset(GLenum mode,GLsizei count,GLenum type,GLuint offset)1664 void glDrawElementsOffset(GLenum mode, GLsizei count, GLenum type, GLuint offset)
1665 {
1666 	GET_CONTEXT;
1667 	ctx->glDrawElementsOffset(ctx, mode, count, type, offset);
1668 }
1669 
glDrawElementsData(GLenum mode,GLsizei count,GLenum type,void * data,GLuint datalen)1670 void glDrawElementsData(GLenum mode, GLsizei count, GLenum type, void* data, GLuint datalen)
1671 {
1672 	GET_CONTEXT;
1673 	ctx->glDrawElementsData(ctx, mode, count, type, data, datalen);
1674 }
1675 
glGetCompressedTextureFormats(int count,GLint * formats)1676 void glGetCompressedTextureFormats(int count, GLint* formats)
1677 {
1678 	GET_CONTEXT;
1679 	ctx->glGetCompressedTextureFormats(ctx, count, formats);
1680 }
1681 
glShaderString(GLuint shader,const GLchar * string,GLsizei len)1682 void glShaderString(GLuint shader, const GLchar* string, GLsizei len)
1683 {
1684 	GET_CONTEXT;
1685 	ctx->glShaderString(ctx, shader, string, len);
1686 }
1687 
glFinishRoundTrip()1688 int glFinishRoundTrip()
1689 {
1690 	GET_CONTEXT;
1691 	return ctx->glFinishRoundTrip(ctx);
1692 }
1693 
glGenVertexArrays(GLsizei n,GLuint * arrays)1694 void glGenVertexArrays(GLsizei n, GLuint* arrays)
1695 {
1696 	GET_CONTEXT;
1697 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
1698 	ctx->glGenVertexArrays(ctx, n, arrays);
1699 }
1700 
glBindVertexArray(GLuint array)1701 void glBindVertexArray(GLuint array)
1702 {
1703 	GET_CONTEXT;
1704 	ctx->glBindVertexArray(ctx, array);
1705 }
1706 
glDeleteVertexArrays(GLsizei n,const GLuint * arrays)1707 void glDeleteVertexArrays(GLsizei n, const GLuint* arrays)
1708 {
1709 	GET_CONTEXT;
1710 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
1711 	ctx->glDeleteVertexArrays(ctx, n, arrays);
1712 }
1713 
glIsVertexArray(GLuint array)1714 GLboolean glIsVertexArray(GLuint array)
1715 {
1716 	GET_CONTEXT;
1717 	return ctx->glIsVertexArray(ctx, array);
1718 }
1719 
glMapBufferRange(GLenum target,GLintptr offset,GLsizeiptr length,GLbitfield access)1720 void* glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
1721 {
1722 	GET_CONTEXT;
1723 	return ctx->glMapBufferRange(ctx, target, offset, length, access);
1724 }
1725 
glUnmapBuffer(GLenum target)1726 GLboolean glUnmapBuffer(GLenum target)
1727 {
1728 	GET_CONTEXT;
1729 	return ctx->glUnmapBuffer(ctx, target);
1730 }
1731 
glFlushMappedBufferRange(GLenum target,GLintptr offset,GLsizeiptr length)1732 void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
1733 {
1734 	GET_CONTEXT;
1735 	ctx->glFlushMappedBufferRange(ctx, target, offset, length);
1736 }
1737 
glMapBufferRangeAEMU(GLenum target,GLintptr offset,GLsizeiptr length,GLbitfield access,void * mapped)1738 void glMapBufferRangeAEMU(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void* mapped)
1739 {
1740 	GET_CONTEXT;
1741 	ctx->glMapBufferRangeAEMU(ctx, target, offset, length, access, mapped);
1742 }
1743 
glUnmapBufferAEMU(GLenum target,GLintptr offset,GLsizeiptr length,GLbitfield access,void * guest_buffer,GLboolean * out_res)1744 void glUnmapBufferAEMU(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void* guest_buffer, GLboolean* out_res)
1745 {
1746 	GET_CONTEXT;
1747 	ctx->glUnmapBufferAEMU(ctx, target, offset, length, access, guest_buffer, out_res);
1748 }
1749 
glFlushMappedBufferRangeAEMU(GLenum target,GLintptr offset,GLsizeiptr length,GLbitfield access,void * guest_buffer)1750 void glFlushMappedBufferRangeAEMU(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access, void* guest_buffer)
1751 {
1752 	GET_CONTEXT;
1753 	ctx->glFlushMappedBufferRangeAEMU(ctx, target, offset, length, access, guest_buffer);
1754 }
1755 
glReadPixelsOffsetAEMU(GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLuint offset)1756 void glReadPixelsOffsetAEMU(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLuint offset)
1757 {
1758 	GET_CONTEXT;
1759 	ctx->glReadPixelsOffsetAEMU(ctx, x, y, width, height, format, type, offset);
1760 }
1761 
glCompressedTexImage2DOffsetAEMU(GLenum target,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLint border,GLsizei imageSize,GLuint offset)1762 void glCompressedTexImage2DOffsetAEMU(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLuint offset)
1763 {
1764 	GET_CONTEXT;
1765 	ctx->glCompressedTexImage2DOffsetAEMU(ctx, target, level, internalformat, width, height, border, imageSize, offset);
1766 }
1767 
glCompressedTexSubImage2DOffsetAEMU(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLsizei imageSize,GLuint offset)1768 void glCompressedTexSubImage2DOffsetAEMU(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLuint offset)
1769 {
1770 	GET_CONTEXT;
1771 	ctx->glCompressedTexSubImage2DOffsetAEMU(ctx, target, level, xoffset, yoffset, width, height, format, imageSize, offset);
1772 }
1773 
glTexImage2DOffsetAEMU(GLenum target,GLint level,GLint internalformat,GLsizei width,GLsizei height,GLint border,GLenum format,GLenum type,GLuint offset)1774 void glTexImage2DOffsetAEMU(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLuint offset)
1775 {
1776 	GET_CONTEXT;
1777 	ctx->glTexImage2DOffsetAEMU(ctx, target, level, internalformat, width, height, border, format, type, offset);
1778 }
1779 
glTexSubImage2DOffsetAEMU(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,GLuint offset)1780 void glTexSubImage2DOffsetAEMU(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLuint offset)
1781 {
1782 	GET_CONTEXT;
1783 	ctx->glTexSubImage2DOffsetAEMU(ctx, target, level, xoffset, yoffset, width, height, format, type, offset);
1784 }
1785 
glBindBufferRange(GLenum target,GLuint index,GLuint buffer,GLintptr offset,GLsizeiptr size)1786 void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
1787 {
1788 	GET_CONTEXT;
1789 	ctx->glBindBufferRange(ctx, target, index, buffer, offset, size);
1790 }
1791 
glBindBufferBase(GLenum target,GLuint index,GLuint buffer)1792 void glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
1793 {
1794 	GET_CONTEXT;
1795 	ctx->glBindBufferBase(ctx, target, index, buffer);
1796 }
1797 
glCopyBufferSubData(GLenum readtarget,GLenum writetarget,GLintptr readoffset,GLintptr writeoffset,GLsizeiptr size)1798 void glCopyBufferSubData(GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size)
1799 {
1800 	GET_CONTEXT;
1801 	ctx->glCopyBufferSubData(ctx, readtarget, writetarget, readoffset, writeoffset, size);
1802 }
1803 
glClearBufferiv(GLenum buffer,GLint drawBuffer,const GLint * value)1804 void glClearBufferiv(GLenum buffer, GLint drawBuffer, const GLint* value)
1805 {
1806 	GET_CONTEXT;
1807 	ctx->glClearBufferiv(ctx, buffer, drawBuffer, value);
1808 }
1809 
glClearBufferuiv(GLenum buffer,GLint drawBuffer,const GLuint * value)1810 void glClearBufferuiv(GLenum buffer, GLint drawBuffer, const GLuint* value)
1811 {
1812 	GET_CONTEXT;
1813 	ctx->glClearBufferuiv(ctx, buffer, drawBuffer, value);
1814 }
1815 
glClearBufferfv(GLenum buffer,GLint drawBuffer,const GLfloat * value)1816 void glClearBufferfv(GLenum buffer, GLint drawBuffer, const GLfloat* value)
1817 {
1818 	GET_CONTEXT;
1819 	ctx->glClearBufferfv(ctx, buffer, drawBuffer, value);
1820 }
1821 
glClearBufferfi(GLenum buffer,GLint drawBuffer,GLfloat depth,GLint stencil)1822 void glClearBufferfi(GLenum buffer, GLint drawBuffer, GLfloat depth, GLint stencil)
1823 {
1824 	GET_CONTEXT;
1825 	ctx->glClearBufferfi(ctx, buffer, drawBuffer, depth, stencil);
1826 }
1827 
glGetBufferParameteri64v(GLenum target,GLenum value,GLint64 * data)1828 void glGetBufferParameteri64v(GLenum target, GLenum value, GLint64* data)
1829 {
1830 	GET_CONTEXT;
1831 	ctx->glGetBufferParameteri64v(ctx, target, value, data);
1832 }
1833 
glGetBufferPointerv(GLenum target,GLenum pname,GLvoid ** params)1834 void glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params)
1835 {
1836 	GET_CONTEXT;
1837 	ctx->glGetBufferPointerv(ctx, target, pname, params);
1838 }
1839 
glUniformBlockBinding(GLuint program,GLuint uniformBlockIndex,GLuint uniformBlockBinding)1840 void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)
1841 {
1842 	GET_CONTEXT;
1843 	ctx->glUniformBlockBinding(ctx, program, uniformBlockIndex, uniformBlockBinding);
1844 }
1845 
glGetUniformBlockIndex(GLuint program,const GLchar * uniformBlockName)1846 GLuint glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName)
1847 {
1848 	GET_CONTEXT;
1849 	return ctx->glGetUniformBlockIndex(ctx, program, uniformBlockName);
1850 }
1851 
glGetUniformIndices(GLuint program,GLsizei uniformCount,const GLchar ** uniformNames,GLuint * uniformIndices)1852 void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar** uniformNames, GLuint* uniformIndices)
1853 {
1854 	GET_CONTEXT;
1855 	ctx->glGetUniformIndices(ctx, program, uniformCount, uniformNames, uniformIndices);
1856 }
1857 
glGetUniformIndicesAEMU(GLuint program,GLsizei uniformCount,const GLchar * packedUniformNames,GLsizei packedLen,GLuint * uniformIndices)1858 void glGetUniformIndicesAEMU(GLuint program, GLsizei uniformCount, const GLchar* packedUniformNames, GLsizei packedLen, GLuint* uniformIndices)
1859 {
1860 	GET_CONTEXT;
1861 	ctx->glGetUniformIndicesAEMU(ctx, program, uniformCount, packedUniformNames, packedLen, uniformIndices);
1862 }
1863 
glGetActiveUniformBlockiv(GLuint program,GLuint uniformBlockIndex,GLenum pname,GLint * params)1864 void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
1865 {
1866 	GET_CONTEXT;
1867 	ctx->glGetActiveUniformBlockiv(ctx, program, uniformBlockIndex, pname, params);
1868 }
1869 
glGetActiveUniformBlockName(GLuint program,GLuint uniformBlockIndex,GLsizei bufSize,GLsizei * length,GLchar * uniformBlockName)1870 void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
1871 {
1872 	GET_CONTEXT;
1873 	 if(bufSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
1874 	ctx->glGetActiveUniformBlockName(ctx, program, uniformBlockIndex, bufSize, length, uniformBlockName);
1875 }
1876 
glUniform1ui(GLint location,GLuint v0)1877 void glUniform1ui(GLint location, GLuint v0)
1878 {
1879 	GET_CONTEXT;
1880 	ctx->glUniform1ui(ctx, location, v0);
1881 }
1882 
glUniform2ui(GLint location,GLuint v0,GLuint v1)1883 void glUniform2ui(GLint location, GLuint v0, GLuint v1)
1884 {
1885 	GET_CONTEXT;
1886 	ctx->glUniform2ui(ctx, location, v0, v1);
1887 }
1888 
glUniform3ui(GLint location,GLuint v0,GLuint v1,GLuint v2)1889 void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
1890 {
1891 	GET_CONTEXT;
1892 	ctx->glUniform3ui(ctx, location, v0, v1, v2);
1893 }
1894 
glUniform4ui(GLint location,GLint v0,GLuint v1,GLuint v2,GLuint v3)1895 void glUniform4ui(GLint location, GLint v0, GLuint v1, GLuint v2, GLuint v3)
1896 {
1897 	GET_CONTEXT;
1898 	ctx->glUniform4ui(ctx, location, v0, v1, v2, v3);
1899 }
1900 
glUniform1uiv(GLint location,GLsizei count,const GLuint * value)1901 void glUniform1uiv(GLint location, GLsizei count, const GLuint* value)
1902 {
1903 	GET_CONTEXT;
1904 	ctx->glUniform1uiv(ctx, location, count, value);
1905 }
1906 
glUniform2uiv(GLint location,GLsizei count,const GLuint * value)1907 void glUniform2uiv(GLint location, GLsizei count, const GLuint* value)
1908 {
1909 	GET_CONTEXT;
1910 	ctx->glUniform2uiv(ctx, location, count, value);
1911 }
1912 
glUniform3uiv(GLint location,GLsizei count,const GLuint * value)1913 void glUniform3uiv(GLint location, GLsizei count, const GLuint* value)
1914 {
1915 	GET_CONTEXT;
1916 	ctx->glUniform3uiv(ctx, location, count, value);
1917 }
1918 
glUniform4uiv(GLint location,GLsizei count,const GLuint * value)1919 void glUniform4uiv(GLint location, GLsizei count, const GLuint* value)
1920 {
1921 	GET_CONTEXT;
1922 	ctx->glUniform4uiv(ctx, location, count, value);
1923 }
1924 
glUniformMatrix2x3fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1925 void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1926 {
1927 	GET_CONTEXT;
1928 	ctx->glUniformMatrix2x3fv(ctx, location, count, transpose, value);
1929 }
1930 
glUniformMatrix3x2fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1931 void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1932 {
1933 	GET_CONTEXT;
1934 	ctx->glUniformMatrix3x2fv(ctx, location, count, transpose, value);
1935 }
1936 
glUniformMatrix2x4fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1937 void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1938 {
1939 	GET_CONTEXT;
1940 	ctx->glUniformMatrix2x4fv(ctx, location, count, transpose, value);
1941 }
1942 
glUniformMatrix4x2fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1943 void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1944 {
1945 	GET_CONTEXT;
1946 	ctx->glUniformMatrix4x2fv(ctx, location, count, transpose, value);
1947 }
1948 
glUniformMatrix3x4fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1949 void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1950 {
1951 	GET_CONTEXT;
1952 	ctx->glUniformMatrix3x4fv(ctx, location, count, transpose, value);
1953 }
1954 
glUniformMatrix4x3fv(GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1955 void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1956 {
1957 	GET_CONTEXT;
1958 	ctx->glUniformMatrix4x3fv(ctx, location, count, transpose, value);
1959 }
1960 
glGetUniformuiv(GLuint program,GLint location,GLuint * params)1961 void glGetUniformuiv(GLuint program, GLint location, GLuint* params)
1962 {
1963 	GET_CONTEXT;
1964 	ctx->glGetUniformuiv(ctx, program, location, params);
1965 }
1966 
glGetActiveUniformsiv(GLuint program,GLsizei uniformCount,const GLuint * uniformIndices,GLenum pname,GLint * params)1967 void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params)
1968 {
1969 	GET_CONTEXT;
1970 	ctx->glGetActiveUniformsiv(ctx, program, uniformCount, uniformIndices, pname, params);
1971 }
1972 
glVertexAttribI4i(GLuint index,GLint v0,GLint v1,GLint v2,GLint v3)1973 void glVertexAttribI4i(GLuint index, GLint v0, GLint v1, GLint v2, GLint v3)
1974 {
1975 	GET_CONTEXT;
1976 	ctx->glVertexAttribI4i(ctx, index, v0, v1, v2, v3);
1977 }
1978 
glVertexAttribI4ui(GLuint index,GLuint v0,GLuint v1,GLuint v2,GLuint v3)1979 void glVertexAttribI4ui(GLuint index, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
1980 {
1981 	GET_CONTEXT;
1982 	ctx->glVertexAttribI4ui(ctx, index, v0, v1, v2, v3);
1983 }
1984 
glVertexAttribI4iv(GLuint index,const GLint * v)1985 void glVertexAttribI4iv(GLuint index, const GLint* v)
1986 {
1987 	GET_CONTEXT;
1988 	ctx->glVertexAttribI4iv(ctx, index, v);
1989 }
1990 
glVertexAttribI4uiv(GLuint index,const GLuint * v)1991 void glVertexAttribI4uiv(GLuint index, const GLuint* v)
1992 {
1993 	GET_CONTEXT;
1994 	ctx->glVertexAttribI4uiv(ctx, index, v);
1995 }
1996 
glVertexAttribIPointer(GLuint index,GLint size,GLenum type,GLsizei stride,const GLvoid * pointer)1997 void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer)
1998 {
1999 	GET_CONTEXT;
2000 	ctx->glVertexAttribIPointer(ctx, index, size, type, stride, pointer);
2001 }
2002 
glVertexAttribIPointerOffsetAEMU(GLuint index,GLint size,GLenum type,GLsizei stride,GLuint offset)2003 void glVertexAttribIPointerOffsetAEMU(GLuint index, GLint size, GLenum type, GLsizei stride, GLuint offset)
2004 {
2005 	GET_CONTEXT;
2006 	ctx->glVertexAttribIPointerOffsetAEMU(ctx, index, size, type, stride, offset);
2007 }
2008 
glVertexAttribIPointerDataAEMU(GLuint index,GLint size,GLenum type,GLsizei stride,void * data,GLuint datalen)2009 void glVertexAttribIPointerDataAEMU(GLuint index, GLint size, GLenum type, GLsizei stride, void* data, GLuint datalen)
2010 {
2011 	GET_CONTEXT;
2012 	ctx->glVertexAttribIPointerDataAEMU(ctx, index, size, type, stride, data, datalen);
2013 }
2014 
glGetVertexAttribIiv(GLuint index,GLenum pname,GLint * params)2015 void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
2016 {
2017 	GET_CONTEXT;
2018 	ctx->glGetVertexAttribIiv(ctx, index, pname, params);
2019 }
2020 
glGetVertexAttribIuiv(GLuint index,GLenum pname,GLuint * params)2021 void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
2022 {
2023 	GET_CONTEXT;
2024 	ctx->glGetVertexAttribIuiv(ctx, index, pname, params);
2025 }
2026 
glVertexAttribDivisor(GLuint index,GLuint divisor)2027 void glVertexAttribDivisor(GLuint index, GLuint divisor)
2028 {
2029 	GET_CONTEXT;
2030 	ctx->glVertexAttribDivisor(ctx, index, divisor);
2031 }
2032 
glDrawArraysInstanced(GLenum mode,GLint first,GLsizei count,GLsizei primcount)2033 void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
2034 {
2035 	GET_CONTEXT;
2036 	ctx->glDrawArraysInstanced(ctx, mode, first, count, primcount);
2037 }
2038 
glDrawElementsInstanced(GLenum mode,GLsizei count,GLenum type,const void * indices,GLsizei primcount)2039 void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount)
2040 {
2041 	GET_CONTEXT;
2042 	ctx->glDrawElementsInstanced(ctx, mode, count, type, indices, primcount);
2043 }
2044 
glDrawElementsInstancedDataAEMU(GLenum mode,GLsizei count,GLenum type,const void * indices,GLsizei primcount,GLsizei datalen)2045 void glDrawElementsInstancedDataAEMU(GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount, GLsizei datalen)
2046 {
2047 	GET_CONTEXT;
2048 	ctx->glDrawElementsInstancedDataAEMU(ctx, mode, count, type, indices, primcount, datalen);
2049 }
2050 
glDrawElementsInstancedOffsetAEMU(GLenum mode,GLsizei count,GLenum type,GLuint offset,GLsizei primcount)2051 void glDrawElementsInstancedOffsetAEMU(GLenum mode, GLsizei count, GLenum type, GLuint offset, GLsizei primcount)
2052 {
2053 	GET_CONTEXT;
2054 	ctx->glDrawElementsInstancedOffsetAEMU(ctx, mode, count, type, offset, primcount);
2055 }
2056 
glDrawRangeElements(GLenum mode,GLuint start,GLuint end,GLsizei count,GLenum type,const GLvoid * indices)2057 void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices)
2058 {
2059 	GET_CONTEXT;
2060 	ctx->glDrawRangeElements(ctx, mode, start, end, count, type, indices);
2061 }
2062 
glDrawRangeElementsDataAEMU(GLenum mode,GLuint start,GLuint end,GLsizei count,GLenum type,const GLvoid * indices,GLsizei datalen)2063 void glDrawRangeElementsDataAEMU(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices, GLsizei datalen)
2064 {
2065 	GET_CONTEXT;
2066 	ctx->glDrawRangeElementsDataAEMU(ctx, mode, start, end, count, type, indices, datalen);
2067 }
2068 
glDrawRangeElementsOffsetAEMU(GLenum mode,GLuint start,GLuint end,GLsizei count,GLenum type,GLuint offset)2069 void glDrawRangeElementsOffsetAEMU(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLuint offset)
2070 {
2071 	GET_CONTEXT;
2072 	ctx->glDrawRangeElementsOffsetAEMU(ctx, mode, start, end, count, type, offset);
2073 }
2074 
glFenceSync(GLenum condition,GLbitfield flags)2075 GLsync glFenceSync(GLenum condition, GLbitfield flags)
2076 {
2077 	GET_CONTEXT;
2078 	return ctx->glFenceSync(ctx, condition, flags);
2079 }
2080 
glClientWaitSync(GLsync wait_on,GLbitfield flags,GLuint64 timeout)2081 GLenum glClientWaitSync(GLsync wait_on, GLbitfield flags, GLuint64 timeout)
2082 {
2083 	GET_CONTEXT;
2084 	return ctx->glClientWaitSync(ctx, wait_on, flags, timeout);
2085 }
2086 
glWaitSync(GLsync wait_on,GLbitfield flags,GLuint64 timeout)2087 void glWaitSync(GLsync wait_on, GLbitfield flags, GLuint64 timeout)
2088 {
2089 	GET_CONTEXT;
2090 	ctx->glWaitSync(ctx, wait_on, flags, timeout);
2091 }
2092 
glDeleteSync(GLsync to_delete)2093 void glDeleteSync(GLsync to_delete)
2094 {
2095 	GET_CONTEXT;
2096 	ctx->glDeleteSync(ctx, to_delete);
2097 }
2098 
glIsSync(GLsync sync)2099 GLboolean glIsSync(GLsync sync)
2100 {
2101 	GET_CONTEXT;
2102 	return ctx->glIsSync(ctx, sync);
2103 }
2104 
glGetSynciv(GLsync sync,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * values)2105 void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
2106 {
2107 	GET_CONTEXT;
2108 	ctx->glGetSynciv(ctx, sync, pname, bufSize, length, values);
2109 }
2110 
glFenceSyncAEMU(GLenum condition,GLbitfield flags)2111 uint64_t glFenceSyncAEMU(GLenum condition, GLbitfield flags)
2112 {
2113 	GET_CONTEXT;
2114 	return ctx->glFenceSyncAEMU(ctx, condition, flags);
2115 }
2116 
glClientWaitSyncAEMU(uint64_t wait_on,GLbitfield flags,GLuint64 timeout)2117 GLenum glClientWaitSyncAEMU(uint64_t wait_on, GLbitfield flags, GLuint64 timeout)
2118 {
2119 	GET_CONTEXT;
2120 	return ctx->glClientWaitSyncAEMU(ctx, wait_on, flags, timeout);
2121 }
2122 
glWaitSyncAEMU(uint64_t wait_on,GLbitfield flags,GLuint64 timeout)2123 void glWaitSyncAEMU(uint64_t wait_on, GLbitfield flags, GLuint64 timeout)
2124 {
2125 	GET_CONTEXT;
2126 	ctx->glWaitSyncAEMU(ctx, wait_on, flags, timeout);
2127 }
2128 
glDeleteSyncAEMU(uint64_t to_delete)2129 void glDeleteSyncAEMU(uint64_t to_delete)
2130 {
2131 	GET_CONTEXT;
2132 	ctx->glDeleteSyncAEMU(ctx, to_delete);
2133 }
2134 
glIsSyncAEMU(uint64_t sync)2135 GLboolean glIsSyncAEMU(uint64_t sync)
2136 {
2137 	GET_CONTEXT;
2138 	return ctx->glIsSyncAEMU(ctx, sync);
2139 }
2140 
glGetSyncivAEMU(uint64_t sync,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * values)2141 void glGetSyncivAEMU(uint64_t sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
2142 {
2143 	GET_CONTEXT;
2144 	 if(bufSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
2145 	ctx->glGetSyncivAEMU(ctx, sync, pname, bufSize, length, values);
2146 }
2147 
glDrawBuffers(GLsizei n,const GLenum * bufs)2148 void glDrawBuffers(GLsizei n, const GLenum* bufs)
2149 {
2150 	GET_CONTEXT;
2151 	ctx->glDrawBuffers(ctx, n, bufs);
2152 }
2153 
glReadBuffer(GLenum src)2154 void glReadBuffer(GLenum src)
2155 {
2156 	GET_CONTEXT;
2157 	ctx->glReadBuffer(ctx, src);
2158 }
2159 
glBlitFramebuffer(GLint srcX0,GLint srcY0,GLint srcX1,GLint srcY1,GLint dstX0,GLint dstY0,GLint dstX1,GLint dstY1,GLbitfield mask,GLenum filter)2160 void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
2161 {
2162 	GET_CONTEXT;
2163 	ctx->glBlitFramebuffer(ctx, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
2164 }
2165 
glInvalidateFramebuffer(GLenum target,GLsizei numAttachments,const GLenum * attachments)2166 void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments)
2167 {
2168 	GET_CONTEXT;
2169 	ctx->glInvalidateFramebuffer(ctx, target, numAttachments, attachments);
2170 }
2171 
glInvalidateSubFramebuffer(GLenum target,GLsizei numAttachments,const GLenum * attachments,GLint x,GLint y,GLsizei width,GLsizei height)2172 void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height)
2173 {
2174 	GET_CONTEXT;
2175 	ctx->glInvalidateSubFramebuffer(ctx, target, numAttachments, attachments, x, y, width, height);
2176 }
2177 
glFramebufferTextureLayer(GLenum target,GLenum attachment,GLuint texture,GLint level,GLint layer)2178 void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
2179 {
2180 	GET_CONTEXT;
2181 	ctx->glFramebufferTextureLayer(ctx, target, attachment, texture, level, layer);
2182 }
2183 
glRenderbufferStorageMultisample(GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height)2184 void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
2185 {
2186 	GET_CONTEXT;
2187 	ctx->glRenderbufferStorageMultisample(ctx, target, samples, internalformat, width, height);
2188 }
2189 
glTexStorage2D(GLenum target,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height)2190 void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
2191 {
2192 	GET_CONTEXT;
2193 	ctx->glTexStorage2D(ctx, target, levels, internalformat, width, height);
2194 }
2195 
glGetInternalformativ(GLenum target,GLenum internalformat,GLenum pname,GLsizei bufSize,GLint * params)2196 void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
2197 {
2198 	GET_CONTEXT;
2199 	ctx->glGetInternalformativ(ctx, target, internalformat, pname, bufSize, params);
2200 }
2201 
glBeginTransformFeedback(GLenum primitiveMode)2202 void glBeginTransformFeedback(GLenum primitiveMode)
2203 {
2204 	GET_CONTEXT;
2205 	ctx->glBeginTransformFeedback(ctx, primitiveMode);
2206 }
2207 
glEndTransformFeedback()2208 void glEndTransformFeedback()
2209 {
2210 	GET_CONTEXT;
2211 	ctx->glEndTransformFeedback(ctx);
2212 }
2213 
glGenTransformFeedbacks(GLsizei n,GLuint * ids)2214 void glGenTransformFeedbacks(GLsizei n, GLuint* ids)
2215 {
2216 	GET_CONTEXT;
2217 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
2218 	ctx->glGenTransformFeedbacks(ctx, n, ids);
2219 }
2220 
glDeleteTransformFeedbacks(GLsizei n,const GLuint * ids)2221 void glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids)
2222 {
2223 	GET_CONTEXT;
2224 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
2225 	ctx->glDeleteTransformFeedbacks(ctx, n, ids);
2226 }
2227 
glBindTransformFeedback(GLenum target,GLuint id)2228 void glBindTransformFeedback(GLenum target, GLuint id)
2229 {
2230 	GET_CONTEXT;
2231 	ctx->glBindTransformFeedback(ctx, target, id);
2232 }
2233 
glPauseTransformFeedback()2234 void glPauseTransformFeedback()
2235 {
2236 	GET_CONTEXT;
2237 	ctx->glPauseTransformFeedback(ctx);
2238 }
2239 
glResumeTransformFeedback()2240 void glResumeTransformFeedback()
2241 {
2242 	GET_CONTEXT;
2243 	ctx->glResumeTransformFeedback(ctx);
2244 }
2245 
glIsTransformFeedback(GLuint id)2246 GLboolean glIsTransformFeedback(GLuint id)
2247 {
2248 	GET_CONTEXT;
2249 	return ctx->glIsTransformFeedback(ctx, id);
2250 }
2251 
glTransformFeedbackVaryings(GLuint program,GLsizei count,const char ** varyings,GLenum bufferMode)2252 void glTransformFeedbackVaryings(GLuint program, GLsizei count, const char** varyings, GLenum bufferMode)
2253 {
2254 	GET_CONTEXT;
2255 	ctx->glTransformFeedbackVaryings(ctx, program, count, varyings, bufferMode);
2256 }
2257 
glTransformFeedbackVaryingsAEMU(GLuint program,GLsizei count,const char * packedVaryings,GLuint packedVaryingsLen,GLenum bufferMode)2258 void glTransformFeedbackVaryingsAEMU(GLuint program, GLsizei count, const char* packedVaryings, GLuint packedVaryingsLen, GLenum bufferMode)
2259 {
2260 	GET_CONTEXT;
2261 	ctx->glTransformFeedbackVaryingsAEMU(ctx, program, count, packedVaryings, packedVaryingsLen, bufferMode);
2262 }
2263 
glGetTransformFeedbackVarying(GLuint program,GLuint index,GLsizei bufSize,GLsizei * length,GLsizei * size,GLenum * type,char * name)2264 void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, char* name)
2265 {
2266 	GET_CONTEXT;
2267 	 if(bufSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
2268 	ctx->glGetTransformFeedbackVarying(ctx, program, index, bufSize, length, size, type, name);
2269 }
2270 
glGenSamplers(GLsizei n,GLuint * samplers)2271 void glGenSamplers(GLsizei n, GLuint* samplers)
2272 {
2273 	GET_CONTEXT;
2274 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
2275 	ctx->glGenSamplers(ctx, n, samplers);
2276 }
2277 
glDeleteSamplers(GLsizei n,const GLuint * samplers)2278 void glDeleteSamplers(GLsizei n, const GLuint* samplers)
2279 {
2280 	GET_CONTEXT;
2281 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
2282 	ctx->glDeleteSamplers(ctx, n, samplers);
2283 }
2284 
glBindSampler(GLuint unit,GLuint sampler)2285 void glBindSampler(GLuint unit, GLuint sampler)
2286 {
2287 	GET_CONTEXT;
2288 	ctx->glBindSampler(ctx, unit, sampler);
2289 }
2290 
glSamplerParameterf(GLuint sampler,GLenum pname,GLfloat param)2291 void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
2292 {
2293 	GET_CONTEXT;
2294 	ctx->glSamplerParameterf(ctx, sampler, pname, param);
2295 }
2296 
glSamplerParameteri(GLuint sampler,GLenum pname,GLint param)2297 void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
2298 {
2299 	GET_CONTEXT;
2300 	ctx->glSamplerParameteri(ctx, sampler, pname, param);
2301 }
2302 
glSamplerParameterfv(GLuint sampler,GLenum pname,const GLfloat * params)2303 void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* params)
2304 {
2305 	GET_CONTEXT;
2306 	ctx->glSamplerParameterfv(ctx, sampler, pname, params);
2307 }
2308 
glSamplerParameteriv(GLuint sampler,GLenum pname,const GLint * params)2309 void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* params)
2310 {
2311 	GET_CONTEXT;
2312 	ctx->glSamplerParameteriv(ctx, sampler, pname, params);
2313 }
2314 
glGetSamplerParameterfv(GLuint sampler,GLenum pname,GLfloat * params)2315 void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
2316 {
2317 	GET_CONTEXT;
2318 	ctx->glGetSamplerParameterfv(ctx, sampler, pname, params);
2319 }
2320 
glGetSamplerParameteriv(GLuint sampler,GLenum pname,GLint * params)2321 void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
2322 {
2323 	GET_CONTEXT;
2324 	ctx->glGetSamplerParameteriv(ctx, sampler, pname, params);
2325 }
2326 
glIsSampler(GLuint sampler)2327 GLboolean glIsSampler(GLuint sampler)
2328 {
2329 	GET_CONTEXT;
2330 	return ctx->glIsSampler(ctx, sampler);
2331 }
2332 
glGenQueries(GLsizei n,GLuint * queries)2333 void glGenQueries(GLsizei n, GLuint* queries)
2334 {
2335 	GET_CONTEXT;
2336 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
2337 	ctx->glGenQueries(ctx, n, queries);
2338 }
2339 
glDeleteQueries(GLsizei n,const GLuint * queries)2340 void glDeleteQueries(GLsizei n, const GLuint* queries)
2341 {
2342 	GET_CONTEXT;
2343 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
2344 	ctx->glDeleteQueries(ctx, n, queries);
2345 }
2346 
glBeginQuery(GLenum target,GLuint query)2347 void glBeginQuery(GLenum target, GLuint query)
2348 {
2349 	GET_CONTEXT;
2350 	ctx->glBeginQuery(ctx, target, query);
2351 }
2352 
glEndQuery(GLenum target)2353 void glEndQuery(GLenum target)
2354 {
2355 	GET_CONTEXT;
2356 	ctx->glEndQuery(ctx, target);
2357 }
2358 
glGetQueryiv(GLenum target,GLenum pname,GLint * params)2359 void glGetQueryiv(GLenum target, GLenum pname, GLint* params)
2360 {
2361 	GET_CONTEXT;
2362 	ctx->glGetQueryiv(ctx, target, pname, params);
2363 }
2364 
glGetQueryObjectuiv(GLuint query,GLenum pname,GLuint * params)2365 void glGetQueryObjectuiv(GLuint query, GLenum pname, GLuint* params)
2366 {
2367 	GET_CONTEXT;
2368 	ctx->glGetQueryObjectuiv(ctx, query, pname, params);
2369 }
2370 
glIsQuery(GLuint query)2371 GLboolean glIsQuery(GLuint query)
2372 {
2373 	GET_CONTEXT;
2374 	return ctx->glIsQuery(ctx, query);
2375 }
2376 
glProgramParameteri(GLuint program,GLenum pname,GLint value)2377 void glProgramParameteri(GLuint program, GLenum pname, GLint value)
2378 {
2379 	GET_CONTEXT;
2380 	ctx->glProgramParameteri(ctx, program, pname, value);
2381 }
2382 
glProgramBinary(GLuint program,GLenum binaryFormat,const void * binary,GLsizei length)2383 void glProgramBinary(GLuint program, GLenum binaryFormat, const void* binary, GLsizei length)
2384 {
2385 	GET_CONTEXT;
2386 	ctx->glProgramBinary(ctx, program, binaryFormat, binary, length);
2387 }
2388 
glGetProgramBinary(GLuint program,GLsizei bufSize,GLsizei * length,GLenum * binaryFormat,void * binary)2389 void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void* binary)
2390 {
2391 	GET_CONTEXT;
2392 	 if(bufSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
2393 	ctx->glGetProgramBinary(ctx, program, bufSize, length, binaryFormat, binary);
2394 }
2395 
glGetFragDataLocation(GLuint program,const char * name)2396 GLint glGetFragDataLocation(GLuint program, const char* name)
2397 {
2398 	GET_CONTEXT;
2399 	return ctx->glGetFragDataLocation(ctx, program, name);
2400 }
2401 
glGetInteger64v(GLenum pname,GLint64 * data)2402 void glGetInteger64v(GLenum pname, GLint64* data)
2403 {
2404 	GET_CONTEXT;
2405 	ctx->glGetInteger64v(ctx, pname, data);
2406 }
2407 
glGetIntegeri_v(GLenum target,GLuint index,GLint * data)2408 void glGetIntegeri_v(GLenum target, GLuint index, GLint* data)
2409 {
2410 	GET_CONTEXT;
2411 	ctx->glGetIntegeri_v(ctx, target, index, data);
2412 }
2413 
glGetInteger64i_v(GLenum target,GLuint index,GLint64 * data)2414 void glGetInteger64i_v(GLenum target, GLuint index, GLint64* data)
2415 {
2416 	GET_CONTEXT;
2417 	ctx->glGetInteger64i_v(ctx, target, index, data);
2418 }
2419 
glTexImage3D(GLenum target,GLint level,GLint internalFormat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLenum format,GLenum type,const GLvoid * data)2420 void glTexImage3D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* data)
2421 {
2422 	GET_CONTEXT;
2423 	ctx->glTexImage3D(ctx, target, level, internalFormat, width, height, depth, border, format, type, data);
2424 }
2425 
glTexImage3DOffsetAEMU(GLenum target,GLint level,GLint internalFormat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLenum format,GLenum type,GLuint offset)2426 void glTexImage3DOffsetAEMU(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLuint offset)
2427 {
2428 	GET_CONTEXT;
2429 	ctx->glTexImage3DOffsetAEMU(ctx, target, level, internalFormat, width, height, depth, border, format, type, offset);
2430 }
2431 
glTexStorage3D(GLenum target,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth)2432 void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
2433 {
2434 	GET_CONTEXT;
2435 	ctx->glTexStorage3D(ctx, target, levels, internalformat, width, height, depth);
2436 }
2437 
glTexSubImage3D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,const GLvoid * data)2438 void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* data)
2439 {
2440 	GET_CONTEXT;
2441 	ctx->glTexSubImage3D(ctx, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
2442 }
2443 
glTexSubImage3DOffsetAEMU(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,GLuint offset)2444 void glTexSubImage3DOffsetAEMU(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLuint offset)
2445 {
2446 	GET_CONTEXT;
2447 	ctx->glTexSubImage3DOffsetAEMU(ctx, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, offset);
2448 }
2449 
glCompressedTexImage3D(GLenum target,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLsizei imageSize,const GLvoid * data)2450 void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data)
2451 {
2452 	GET_CONTEXT;
2453 	 if(imageSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
2454 	ctx->glCompressedTexImage3D(ctx, target, level, internalformat, width, height, depth, border, imageSize, data);
2455 }
2456 
glCompressedTexImage3DOffsetAEMU(GLenum target,GLint level,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLint border,GLsizei imageSize,GLuint offset)2457 void glCompressedTexImage3DOffsetAEMU(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLuint offset)
2458 {
2459 	GET_CONTEXT;
2460 	ctx->glCompressedTexImage3DOffsetAEMU(ctx, target, level, internalformat, width, height, depth, border, imageSize, offset);
2461 }
2462 
glCompressedTexSubImage3D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLsizei imageSize,const GLvoid * data)2463 void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data)
2464 {
2465 	GET_CONTEXT;
2466 	 if(imageSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
2467 	ctx->glCompressedTexSubImage3D(ctx, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
2468 }
2469 
glCompressedTexSubImage3DOffsetAEMU(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLsizei imageSize,GLuint data)2470 void glCompressedTexSubImage3DOffsetAEMU(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLuint data)
2471 {
2472 	GET_CONTEXT;
2473 	ctx->glCompressedTexSubImage3DOffsetAEMU(ctx, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
2474 }
2475 
glCopyTexSubImage3D(GLenum target,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLint x,GLint y,GLsizei width,GLsizei height)2476 void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
2477 {
2478 	GET_CONTEXT;
2479 	ctx->glCopyTexSubImage3D(ctx, target, level, xoffset, yoffset, zoffset, x, y, width, height);
2480 }
2481 
glGetStringi(GLenum name,GLuint index)2482 const GLubyte* glGetStringi(GLenum name, GLuint index)
2483 {
2484 	GET_CONTEXT;
2485 	return ctx->glGetStringi(ctx, name, index);
2486 }
2487 
glGetBooleani_v(GLenum target,GLuint index,GLboolean * data)2488 void glGetBooleani_v(GLenum target, GLuint index, GLboolean* data)
2489 {
2490 	GET_CONTEXT;
2491 	ctx->glGetBooleani_v(ctx, target, index, data);
2492 }
2493 
glMemoryBarrier(GLbitfield barriers)2494 void glMemoryBarrier(GLbitfield barriers)
2495 {
2496 	GET_CONTEXT;
2497 	ctx->glMemoryBarrier(ctx, barriers);
2498 }
2499 
glMemoryBarrierByRegion(GLbitfield barriers)2500 void glMemoryBarrierByRegion(GLbitfield barriers)
2501 {
2502 	GET_CONTEXT;
2503 	ctx->glMemoryBarrierByRegion(ctx, barriers);
2504 }
2505 
glGenProgramPipelines(GLsizei n,GLuint * pipelines)2506 void glGenProgramPipelines(GLsizei n, GLuint* pipelines)
2507 {
2508 	GET_CONTEXT;
2509 	ctx->glGenProgramPipelines(ctx, n, pipelines);
2510 }
2511 
glDeleteProgramPipelines(GLsizei n,const GLuint * pipelines)2512 void glDeleteProgramPipelines(GLsizei n, const GLuint* pipelines)
2513 {
2514 	GET_CONTEXT;
2515 	 if(n<0){ ctx->setError(GL_INVALID_VALUE); return; }
2516 	ctx->glDeleteProgramPipelines(ctx, n, pipelines);
2517 }
2518 
glBindProgramPipeline(GLuint pipeline)2519 void glBindProgramPipeline(GLuint pipeline)
2520 {
2521 	GET_CONTEXT;
2522 	ctx->glBindProgramPipeline(ctx, pipeline);
2523 }
2524 
glGetProgramPipelineiv(GLuint pipeline,GLenum pname,GLint * params)2525 void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint* params)
2526 {
2527 	GET_CONTEXT;
2528 	ctx->glGetProgramPipelineiv(ctx, pipeline, pname, params);
2529 }
2530 
glGetProgramPipelineInfoLog(GLuint pipeline,GLsizei bufSize,GLsizei * length,GLchar * infoLog)2531 void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog)
2532 {
2533 	GET_CONTEXT;
2534 	 if(bufSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
2535 	ctx->glGetProgramPipelineInfoLog(ctx, pipeline, bufSize, length, infoLog);
2536 }
2537 
glValidateProgramPipeline(GLuint pipeline)2538 void glValidateProgramPipeline(GLuint pipeline)
2539 {
2540 	GET_CONTEXT;
2541 	ctx->glValidateProgramPipeline(ctx, pipeline);
2542 }
2543 
glIsProgramPipeline(GLuint pipeline)2544 GLboolean glIsProgramPipeline(GLuint pipeline)
2545 {
2546 	GET_CONTEXT;
2547 	return ctx->glIsProgramPipeline(ctx, pipeline);
2548 }
2549 
glUseProgramStages(GLuint pipeline,GLbitfield stages,GLuint program)2550 void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
2551 {
2552 	GET_CONTEXT;
2553 	ctx->glUseProgramStages(ctx, pipeline, stages, program);
2554 }
2555 
glActiveShaderProgram(GLuint pipeline,GLuint program)2556 void glActiveShaderProgram(GLuint pipeline, GLuint program)
2557 {
2558 	GET_CONTEXT;
2559 	ctx->glActiveShaderProgram(ctx, pipeline, program);
2560 }
2561 
glCreateShaderProgramv(GLenum type,GLsizei count,const char ** strings)2562 GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const char** strings)
2563 {
2564 	GET_CONTEXT;
2565 	return ctx->glCreateShaderProgramv(ctx, type, count, strings);
2566 }
2567 
glCreateShaderProgramvAEMU(GLenum type,GLsizei count,const char * packedStrings,GLuint packedLen)2568 GLuint glCreateShaderProgramvAEMU(GLenum type, GLsizei count, const char* packedStrings, GLuint packedLen)
2569 {
2570 	GET_CONTEXT;
2571 	return ctx->glCreateShaderProgramvAEMU(ctx, type, count, packedStrings, packedLen);
2572 }
2573 
glProgramUniform1f(GLuint program,GLint location,GLfloat v0)2574 void glProgramUniform1f(GLuint program, GLint location, GLfloat v0)
2575 {
2576 	GET_CONTEXT;
2577 	ctx->glProgramUniform1f(ctx, program, location, v0);
2578 }
2579 
glProgramUniform2f(GLuint program,GLint location,GLfloat v0,GLfloat v1)2580 void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
2581 {
2582 	GET_CONTEXT;
2583 	ctx->glProgramUniform2f(ctx, program, location, v0, v1);
2584 }
2585 
glProgramUniform3f(GLuint program,GLint location,GLfloat v0,GLfloat v1,GLfloat v2)2586 void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
2587 {
2588 	GET_CONTEXT;
2589 	ctx->glProgramUniform3f(ctx, program, location, v0, v1, v2);
2590 }
2591 
glProgramUniform4f(GLuint program,GLint location,GLfloat v0,GLfloat v1,GLfloat v2,GLfloat v3)2592 void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
2593 {
2594 	GET_CONTEXT;
2595 	ctx->glProgramUniform4f(ctx, program, location, v0, v1, v2, v3);
2596 }
2597 
glProgramUniform1i(GLuint program,GLint location,GLint v0)2598 void glProgramUniform1i(GLuint program, GLint location, GLint v0)
2599 {
2600 	GET_CONTEXT;
2601 	ctx->glProgramUniform1i(ctx, program, location, v0);
2602 }
2603 
glProgramUniform2i(GLuint program,GLint location,GLint v0,GLint v1)2604 void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
2605 {
2606 	GET_CONTEXT;
2607 	ctx->glProgramUniform2i(ctx, program, location, v0, v1);
2608 }
2609 
glProgramUniform3i(GLuint program,GLint location,GLint v0,GLint v1,GLint v2)2610 void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
2611 {
2612 	GET_CONTEXT;
2613 	ctx->glProgramUniform3i(ctx, program, location, v0, v1, v2);
2614 }
2615 
glProgramUniform4i(GLuint program,GLint location,GLint v0,GLint v1,GLint v2,GLint v3)2616 void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
2617 {
2618 	GET_CONTEXT;
2619 	ctx->glProgramUniform4i(ctx, program, location, v0, v1, v2, v3);
2620 }
2621 
glProgramUniform1ui(GLuint program,GLint location,GLuint v0)2622 void glProgramUniform1ui(GLuint program, GLint location, GLuint v0)
2623 {
2624 	GET_CONTEXT;
2625 	ctx->glProgramUniform1ui(ctx, program, location, v0);
2626 }
2627 
glProgramUniform2ui(GLuint program,GLint location,GLint v0,GLuint v1)2628 void glProgramUniform2ui(GLuint program, GLint location, GLint v0, GLuint v1)
2629 {
2630 	GET_CONTEXT;
2631 	ctx->glProgramUniform2ui(ctx, program, location, v0, v1);
2632 }
2633 
glProgramUniform3ui(GLuint program,GLint location,GLint v0,GLint v1,GLuint v2)2634 void glProgramUniform3ui(GLuint program, GLint location, GLint v0, GLint v1, GLuint v2)
2635 {
2636 	GET_CONTEXT;
2637 	ctx->glProgramUniform3ui(ctx, program, location, v0, v1, v2);
2638 }
2639 
glProgramUniform4ui(GLuint program,GLint location,GLint v0,GLint v1,GLint v2,GLuint v3)2640 void glProgramUniform4ui(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLuint v3)
2641 {
2642 	GET_CONTEXT;
2643 	ctx->glProgramUniform4ui(ctx, program, location, v0, v1, v2, v3);
2644 }
2645 
glProgramUniform1fv(GLuint program,GLint location,GLsizei count,const GLfloat * value)2646 void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat* value)
2647 {
2648 	GET_CONTEXT;
2649 	ctx->glProgramUniform1fv(ctx, program, location, count, value);
2650 }
2651 
glProgramUniform2fv(GLuint program,GLint location,GLsizei count,const GLfloat * value)2652 void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat* value)
2653 {
2654 	GET_CONTEXT;
2655 	ctx->glProgramUniform2fv(ctx, program, location, count, value);
2656 }
2657 
glProgramUniform3fv(GLuint program,GLint location,GLsizei count,const GLfloat * value)2658 void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat* value)
2659 {
2660 	GET_CONTEXT;
2661 	ctx->glProgramUniform3fv(ctx, program, location, count, value);
2662 }
2663 
glProgramUniform4fv(GLuint program,GLint location,GLsizei count,const GLfloat * value)2664 void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat* value)
2665 {
2666 	GET_CONTEXT;
2667 	ctx->glProgramUniform4fv(ctx, program, location, count, value);
2668 }
2669 
glProgramUniform1iv(GLuint program,GLint location,GLsizei count,const GLint * value)2670 void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint* value)
2671 {
2672 	GET_CONTEXT;
2673 	ctx->glProgramUniform1iv(ctx, program, location, count, value);
2674 }
2675 
glProgramUniform2iv(GLuint program,GLint location,GLsizei count,const GLint * value)2676 void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint* value)
2677 {
2678 	GET_CONTEXT;
2679 	ctx->glProgramUniform2iv(ctx, program, location, count, value);
2680 }
2681 
glProgramUniform3iv(GLuint program,GLint location,GLsizei count,const GLint * value)2682 void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint* value)
2683 {
2684 	GET_CONTEXT;
2685 	ctx->glProgramUniform3iv(ctx, program, location, count, value);
2686 }
2687 
glProgramUniform4iv(GLuint program,GLint location,GLsizei count,const GLint * value)2688 void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint* value)
2689 {
2690 	GET_CONTEXT;
2691 	ctx->glProgramUniform4iv(ctx, program, location, count, value);
2692 }
2693 
glProgramUniform1uiv(GLuint program,GLint location,GLsizei count,const GLuint * value)2694 void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint* value)
2695 {
2696 	GET_CONTEXT;
2697 	ctx->glProgramUniform1uiv(ctx, program, location, count, value);
2698 }
2699 
glProgramUniform2uiv(GLuint program,GLint location,GLsizei count,const GLuint * value)2700 void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint* value)
2701 {
2702 	GET_CONTEXT;
2703 	ctx->glProgramUniform2uiv(ctx, program, location, count, value);
2704 }
2705 
glProgramUniform3uiv(GLuint program,GLint location,GLsizei count,const GLuint * value)2706 void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint* value)
2707 {
2708 	GET_CONTEXT;
2709 	ctx->glProgramUniform3uiv(ctx, program, location, count, value);
2710 }
2711 
glProgramUniform4uiv(GLuint program,GLint location,GLsizei count,const GLuint * value)2712 void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint* value)
2713 {
2714 	GET_CONTEXT;
2715 	ctx->glProgramUniform4uiv(ctx, program, location, count, value);
2716 }
2717 
glProgramUniformMatrix2fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2718 void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2719 {
2720 	GET_CONTEXT;
2721 	ctx->glProgramUniformMatrix2fv(ctx, program, location, count, transpose, value);
2722 }
2723 
glProgramUniformMatrix3fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2724 void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2725 {
2726 	GET_CONTEXT;
2727 	ctx->glProgramUniformMatrix3fv(ctx, program, location, count, transpose, value);
2728 }
2729 
glProgramUniformMatrix4fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2730 void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2731 {
2732 	GET_CONTEXT;
2733 	ctx->glProgramUniformMatrix4fv(ctx, program, location, count, transpose, value);
2734 }
2735 
glProgramUniformMatrix2x3fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2736 void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2737 {
2738 	GET_CONTEXT;
2739 	ctx->glProgramUniformMatrix2x3fv(ctx, program, location, count, transpose, value);
2740 }
2741 
glProgramUniformMatrix3x2fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2742 void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2743 {
2744 	GET_CONTEXT;
2745 	ctx->glProgramUniformMatrix3x2fv(ctx, program, location, count, transpose, value);
2746 }
2747 
glProgramUniformMatrix2x4fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2748 void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2749 {
2750 	GET_CONTEXT;
2751 	ctx->glProgramUniformMatrix2x4fv(ctx, program, location, count, transpose, value);
2752 }
2753 
glProgramUniformMatrix4x2fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2754 void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2755 {
2756 	GET_CONTEXT;
2757 	ctx->glProgramUniformMatrix4x2fv(ctx, program, location, count, transpose, value);
2758 }
2759 
glProgramUniformMatrix3x4fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2760 void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2761 {
2762 	GET_CONTEXT;
2763 	ctx->glProgramUniformMatrix3x4fv(ctx, program, location, count, transpose, value);
2764 }
2765 
glProgramUniformMatrix4x3fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)2766 void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
2767 {
2768 	GET_CONTEXT;
2769 	ctx->glProgramUniformMatrix4x3fv(ctx, program, location, count, transpose, value);
2770 }
2771 
glGetProgramInterfaceiv(GLuint program,GLenum programInterface,GLenum pname,GLint * params)2772 void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint* params)
2773 {
2774 	GET_CONTEXT;
2775 	ctx->glGetProgramInterfaceiv(ctx, program, programInterface, pname, params);
2776 }
2777 
glGetProgramResourceiv(GLuint program,GLenum programInterface,GLuint index,GLsizei propCount,const GLenum * props,GLsizei bufSize,GLsizei * length,GLint * params)2778 void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum* props, GLsizei bufSize, GLsizei* length, GLint* params)
2779 {
2780 	GET_CONTEXT;
2781 	 if(bufSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
2782 	ctx->glGetProgramResourceiv(ctx, program, programInterface, index, propCount, props, bufSize, length, params);
2783 }
2784 
glGetProgramResourceIndex(GLuint program,GLenum programInterface,const char * name)2785 GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const char* name)
2786 {
2787 	GET_CONTEXT;
2788 	return ctx->glGetProgramResourceIndex(ctx, program, programInterface, name);
2789 }
2790 
glGetProgramResourceLocation(GLuint program,GLenum programInterface,const char * name)2791 GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const char* name)
2792 {
2793 	GET_CONTEXT;
2794 	return ctx->glGetProgramResourceLocation(ctx, program, programInterface, name);
2795 }
2796 
glGetProgramResourceName(GLuint program,GLenum programInterface,GLuint index,GLsizei bufSize,GLsizei * length,char * name)2797 void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, char* name)
2798 {
2799 	GET_CONTEXT;
2800 	 if(bufSize<0){ ctx->setError(GL_INVALID_VALUE); return; }
2801 	ctx->glGetProgramResourceName(ctx, program, programInterface, index, bufSize, length, name);
2802 }
2803 
glBindImageTexture(GLuint unit,GLuint texture,GLint level,GLboolean layered,GLint layer,GLenum access,GLenum format)2804 void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)
2805 {
2806 	GET_CONTEXT;
2807 	ctx->glBindImageTexture(ctx, unit, texture, level, layered, layer, access, format);
2808 }
2809 
glDispatchCompute(GLuint num_groups_x,GLuint num_groups_y,GLuint num_groups_z)2810 void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
2811 {
2812 	GET_CONTEXT;
2813 	ctx->glDispatchCompute(ctx, num_groups_x, num_groups_y, num_groups_z);
2814 }
2815 
glDispatchComputeIndirect(GLintptr indirect)2816 void glDispatchComputeIndirect(GLintptr indirect)
2817 {
2818 	GET_CONTEXT;
2819 	ctx->glDispatchComputeIndirect(ctx, indirect);
2820 }
2821 
glBindVertexBuffer(GLuint bindingindex,GLuint buffer,GLintptr offset,GLintptr stride)2822 void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLintptr stride)
2823 {
2824 	GET_CONTEXT;
2825 	ctx->glBindVertexBuffer(ctx, bindingindex, buffer, offset, stride);
2826 }
2827 
glVertexAttribBinding(GLuint attribindex,GLuint bindingindex)2828 void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex)
2829 {
2830 	GET_CONTEXT;
2831 	ctx->glVertexAttribBinding(ctx, attribindex, bindingindex);
2832 }
2833 
glVertexAttribFormat(GLuint attribindex,GLint size,GLenum type,GLboolean normalized,GLuint relativeoffset)2834 void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)
2835 {
2836 	GET_CONTEXT;
2837 	ctx->glVertexAttribFormat(ctx, attribindex, size, type, normalized, relativeoffset);
2838 }
2839 
glVertexAttribIFormat(GLuint attribindex,GLint size,GLenum type,GLuint relativeoffset)2840 void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)
2841 {
2842 	GET_CONTEXT;
2843 	ctx->glVertexAttribIFormat(ctx, attribindex, size, type, relativeoffset);
2844 }
2845 
glVertexBindingDivisor(GLuint bindingindex,GLuint divisor)2846 void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor)
2847 {
2848 	GET_CONTEXT;
2849 	ctx->glVertexBindingDivisor(ctx, bindingindex, divisor);
2850 }
2851 
glDrawArraysIndirect(GLenum mode,const void * indirect)2852 void glDrawArraysIndirect(GLenum mode, const void* indirect)
2853 {
2854 	GET_CONTEXT;
2855 	ctx->glDrawArraysIndirect(ctx, mode, indirect);
2856 }
2857 
glDrawArraysIndirectDataAEMU(GLenum mode,const void * indirect,GLuint datalen)2858 void glDrawArraysIndirectDataAEMU(GLenum mode, const void* indirect, GLuint datalen)
2859 {
2860 	GET_CONTEXT;
2861 	ctx->glDrawArraysIndirectDataAEMU(ctx, mode, indirect, datalen);
2862 }
2863 
glDrawArraysIndirectOffsetAEMU(GLenum mode,GLuint offset)2864 void glDrawArraysIndirectOffsetAEMU(GLenum mode, GLuint offset)
2865 {
2866 	GET_CONTEXT;
2867 	ctx->glDrawArraysIndirectOffsetAEMU(ctx, mode, offset);
2868 }
2869 
glDrawElementsIndirect(GLenum mode,GLenum type,const void * indirect)2870 void glDrawElementsIndirect(GLenum mode, GLenum type, const void* indirect)
2871 {
2872 	GET_CONTEXT;
2873 	ctx->glDrawElementsIndirect(ctx, mode, type, indirect);
2874 }
2875 
glDrawElementsIndirectDataAEMU(GLenum mode,GLenum type,const void * indirect,GLuint datalen)2876 void glDrawElementsIndirectDataAEMU(GLenum mode, GLenum type, const void* indirect, GLuint datalen)
2877 {
2878 	GET_CONTEXT;
2879 	ctx->glDrawElementsIndirectDataAEMU(ctx, mode, type, indirect, datalen);
2880 }
2881 
glDrawElementsIndirectOffsetAEMU(GLenum mode,GLenum type,GLuint offset)2882 void glDrawElementsIndirectOffsetAEMU(GLenum mode, GLenum type, GLuint offset)
2883 {
2884 	GET_CONTEXT;
2885 	ctx->glDrawElementsIndirectOffsetAEMU(ctx, mode, type, offset);
2886 }
2887 
glTexStorage2DMultisample(GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLboolean fixedsamplelocations)2888 void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
2889 {
2890 	GET_CONTEXT;
2891 	ctx->glTexStorage2DMultisample(ctx, target, samples, internalformat, width, height, fixedsamplelocations);
2892 }
2893 
glSampleMaski(GLuint maskNumber,GLbitfield mask)2894 void glSampleMaski(GLuint maskNumber, GLbitfield mask)
2895 {
2896 	GET_CONTEXT;
2897 	ctx->glSampleMaski(ctx, maskNumber, mask);
2898 }
2899 
glGetMultisamplefv(GLenum pname,GLuint index,GLfloat * val)2900 void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat* val)
2901 {
2902 	GET_CONTEXT;
2903 	ctx->glGetMultisamplefv(ctx, pname, index, val);
2904 }
2905 
glFramebufferParameteri(GLenum target,GLenum pname,GLint param)2906 void glFramebufferParameteri(GLenum target, GLenum pname, GLint param)
2907 {
2908 	GET_CONTEXT;
2909 	ctx->glFramebufferParameteri(ctx, target, pname, param);
2910 }
2911 
glGetFramebufferParameteriv(GLenum target,GLenum pname,GLint * params)2912 void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint* params)
2913 {
2914 	GET_CONTEXT;
2915 	ctx->glGetFramebufferParameteriv(ctx, target, pname, params);
2916 }
2917 
glGetTexLevelParameterfv(GLenum target,GLint level,GLenum pname,GLfloat * params)2918 void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params)
2919 {
2920 	GET_CONTEXT;
2921 	ctx->glGetTexLevelParameterfv(ctx, target, level, pname, params);
2922 }
2923 
glGetTexLevelParameteriv(GLenum target,GLint level,GLenum pname,GLint * params)2924 void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params)
2925 {
2926 	GET_CONTEXT;
2927 	ctx->glGetTexLevelParameteriv(ctx, target, level, pname, params);
2928 }
2929 
2930