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