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