1 module glad.gl.loader; 2 3 4 private import glad.gl.funcs; 5 private import glad.gl.ext; 6 private import glad.gl.enums; 7 private import glad.gl.types; 8 alias Loader = void* delegate(const(char)*); 9 10 static struct GLVersion { static int major = 0; static int minor = 0; } 11 private extern(C) char* strstr(const(char)*, const(char)*) @nogc; 12 private extern(C) int strcmp(const(char)*, const(char)*) @nogc; 13 private extern(C) int strncmp(const(char)*, const(char)*, size_t) @nogc; 14 private extern(C) size_t strlen(const(char)*) @nogc; 15 private bool has_ext(const(char)* ext) @nogc { 16 if(GLVersion.major < 3) { 17 const(char)* extensions = cast(const(char)*)glGetString(GL_EXTENSIONS); 18 const(char)* loc; 19 const(char)* terminator; 20 21 if(extensions is null || ext is null) { 22 return false; 23 } 24 25 while(1) { 26 loc = strstr(extensions, ext); 27 if(loc is null) { 28 return false; 29 } 30 31 terminator = loc + strlen(ext); 32 if((loc is extensions || *(loc - 1) == ' ') && 33 (*terminator == ' ' || *terminator == '\0')) { 34 return true; 35 } 36 extensions = terminator; 37 } 38 } else { 39 int num; 40 glGetIntegerv(GL_NUM_EXTENSIONS, &num); 41 42 for(uint i=0; i < cast(uint)num; i++) { 43 if(strcmp(cast(const(char)*)glGetStringi(GL_EXTENSIONS, i), ext) == 0) { 44 return true; 45 } 46 } 47 } 48 49 return false; 50 } 51 bool gladLoadGLES2(Loader load) { 52 glGetString = cast(typeof(glGetString))load("glGetString"); 53 if(glGetString is null) { return false; } 54 if(glGetString(GL_VERSION) is null) { return false; } 55 56 find_coreGLES2(); 57 load_GL_ES_VERSION_2_0(load); 58 load_GL_ES_VERSION_3_0(load); 59 60 find_extensionsGLES2(); 61 return GLVersion.major != 0 || GLVersion.minor != 0; 62 } 63 64 private { 65 66 void find_coreGLES2() { 67 68 // Thank you @elmindreda 69 // https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176 70 // https://github.com/glfw/glfw/blob/master/src/context.c#L36 71 int i; 72 const(char)* glversion; 73 const(char)*[] prefixes = [ 74 "OpenGL ES-CM ".ptr, 75 "OpenGL ES-CL ".ptr, 76 "OpenGL ES ".ptr, 77 ]; 78 79 glversion = cast(const(char)*)glGetString(GL_VERSION); 80 if (glversion is null) return; 81 82 foreach(prefix; prefixes) { 83 size_t length = strlen(prefix); 84 if (strncmp(glversion, prefix, length) == 0) { 85 glversion += length; 86 break; 87 } 88 } 89 90 int major = glversion[0] - '0'; 91 int minor = glversion[2] - '0'; 92 GLVersion.major = major; GLVersion.minor = minor; 93 GL_ES_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; 94 GL_ES_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; 95 return; 96 } 97 98 void find_extensionsGLES2() { 99 GL_AMD_program_binary_Z400 = has_ext("GL_AMD_program_binary_Z400"); 100 return; 101 } 102 103 void load_GL_ES_VERSION_2_0(Loader load) { 104 if(!GL_ES_VERSION_2_0) return; 105 glActiveTexture = cast(typeof(glActiveTexture))load("glActiveTexture"); 106 glAttachShader = cast(typeof(glAttachShader))load("glAttachShader"); 107 glBindAttribLocation = cast(typeof(glBindAttribLocation))load("glBindAttribLocation"); 108 glBindBuffer = cast(typeof(glBindBuffer))load("glBindBuffer"); 109 glBindFramebuffer = cast(typeof(glBindFramebuffer))load("glBindFramebuffer"); 110 glBindRenderbuffer = cast(typeof(glBindRenderbuffer))load("glBindRenderbuffer"); 111 glBindTexture = cast(typeof(glBindTexture))load("glBindTexture"); 112 glBlendColor = cast(typeof(glBlendColor))load("glBlendColor"); 113 glBlendEquation = cast(typeof(glBlendEquation))load("glBlendEquation"); 114 glBlendEquationSeparate = cast(typeof(glBlendEquationSeparate))load("glBlendEquationSeparate"); 115 glBlendFunc = cast(typeof(glBlendFunc))load("glBlendFunc"); 116 glBlendFuncSeparate = cast(typeof(glBlendFuncSeparate))load("glBlendFuncSeparate"); 117 glBufferData = cast(typeof(glBufferData))load("glBufferData"); 118 glBufferSubData = cast(typeof(glBufferSubData))load("glBufferSubData"); 119 glCheckFramebufferStatus = cast(typeof(glCheckFramebufferStatus))load("glCheckFramebufferStatus"); 120 glClear = cast(typeof(glClear))load("glClear"); 121 glClearColor = cast(typeof(glClearColor))load("glClearColor"); 122 glClearDepthf = cast(typeof(glClearDepthf))load("glClearDepthf"); 123 glClearStencil = cast(typeof(glClearStencil))load("glClearStencil"); 124 glColorMask = cast(typeof(glColorMask))load("glColorMask"); 125 glCompileShader = cast(typeof(glCompileShader))load("glCompileShader"); 126 glCompressedTexImage2D = cast(typeof(glCompressedTexImage2D))load("glCompressedTexImage2D"); 127 glCompressedTexSubImage2D = cast(typeof(glCompressedTexSubImage2D))load("glCompressedTexSubImage2D"); 128 glCopyTexImage2D = cast(typeof(glCopyTexImage2D))load("glCopyTexImage2D"); 129 glCopyTexSubImage2D = cast(typeof(glCopyTexSubImage2D))load("glCopyTexSubImage2D"); 130 glCreateProgram = cast(typeof(glCreateProgram))load("glCreateProgram"); 131 glCreateShader = cast(typeof(glCreateShader))load("glCreateShader"); 132 glCullFace = cast(typeof(glCullFace))load("glCullFace"); 133 glDeleteBuffers = cast(typeof(glDeleteBuffers))load("glDeleteBuffers"); 134 glDeleteFramebuffers = cast(typeof(glDeleteFramebuffers))load("glDeleteFramebuffers"); 135 glDeleteProgram = cast(typeof(glDeleteProgram))load("glDeleteProgram"); 136 glDeleteRenderbuffers = cast(typeof(glDeleteRenderbuffers))load("glDeleteRenderbuffers"); 137 glDeleteShader = cast(typeof(glDeleteShader))load("glDeleteShader"); 138 glDeleteTextures = cast(typeof(glDeleteTextures))load("glDeleteTextures"); 139 glDepthFunc = cast(typeof(glDepthFunc))load("glDepthFunc"); 140 glDepthMask = cast(typeof(glDepthMask))load("glDepthMask"); 141 glDepthRangef = cast(typeof(glDepthRangef))load("glDepthRangef"); 142 glDetachShader = cast(typeof(glDetachShader))load("glDetachShader"); 143 glDisable = cast(typeof(glDisable))load("glDisable"); 144 glDisableVertexAttribArray = cast(typeof(glDisableVertexAttribArray))load("glDisableVertexAttribArray"); 145 glDrawArrays = cast(typeof(glDrawArrays))load("glDrawArrays"); 146 glDrawElements = cast(typeof(glDrawElements))load("glDrawElements"); 147 glEnable = cast(typeof(glEnable))load("glEnable"); 148 glEnableVertexAttribArray = cast(typeof(glEnableVertexAttribArray))load("glEnableVertexAttribArray"); 149 glFinish = cast(typeof(glFinish))load("glFinish"); 150 glFlush = cast(typeof(glFlush))load("glFlush"); 151 glFramebufferRenderbuffer = cast(typeof(glFramebufferRenderbuffer))load("glFramebufferRenderbuffer"); 152 glFramebufferTexture2D = cast(typeof(glFramebufferTexture2D))load("glFramebufferTexture2D"); 153 glFrontFace = cast(typeof(glFrontFace))load("glFrontFace"); 154 glGenBuffers = cast(typeof(glGenBuffers))load("glGenBuffers"); 155 glGenerateMipmap = cast(typeof(glGenerateMipmap))load("glGenerateMipmap"); 156 glGenFramebuffers = cast(typeof(glGenFramebuffers))load("glGenFramebuffers"); 157 glGenRenderbuffers = cast(typeof(glGenRenderbuffers))load("glGenRenderbuffers"); 158 glGenTextures = cast(typeof(glGenTextures))load("glGenTextures"); 159 glGetActiveAttrib = cast(typeof(glGetActiveAttrib))load("glGetActiveAttrib"); 160 glGetActiveUniform = cast(typeof(glGetActiveUniform))load("glGetActiveUniform"); 161 glGetAttachedShaders = cast(typeof(glGetAttachedShaders))load("glGetAttachedShaders"); 162 glGetAttribLocation = cast(typeof(glGetAttribLocation))load("glGetAttribLocation"); 163 glGetBooleanv = cast(typeof(glGetBooleanv))load("glGetBooleanv"); 164 glGetBufferParameteriv = cast(typeof(glGetBufferParameteriv))load("glGetBufferParameteriv"); 165 glGetError = cast(typeof(glGetError))load("glGetError"); 166 glGetFloatv = cast(typeof(glGetFloatv))load("glGetFloatv"); 167 glGetFramebufferAttachmentParameteriv = cast(typeof(glGetFramebufferAttachmentParameteriv))load("glGetFramebufferAttachmentParameteriv"); 168 glGetIntegerv = cast(typeof(glGetIntegerv))load("glGetIntegerv"); 169 glGetProgramiv = cast(typeof(glGetProgramiv))load("glGetProgramiv"); 170 glGetProgramInfoLog = cast(typeof(glGetProgramInfoLog))load("glGetProgramInfoLog"); 171 glGetRenderbufferParameteriv = cast(typeof(glGetRenderbufferParameteriv))load("glGetRenderbufferParameteriv"); 172 glGetShaderiv = cast(typeof(glGetShaderiv))load("glGetShaderiv"); 173 glGetShaderInfoLog = cast(typeof(glGetShaderInfoLog))load("glGetShaderInfoLog"); 174 glGetShaderPrecisionFormat = cast(typeof(glGetShaderPrecisionFormat))load("glGetShaderPrecisionFormat"); 175 glGetShaderSource = cast(typeof(glGetShaderSource))load("glGetShaderSource"); 176 glGetString = cast(typeof(glGetString))load("glGetString"); 177 glGetTexParameterfv = cast(typeof(glGetTexParameterfv))load("glGetTexParameterfv"); 178 glGetTexParameteriv = cast(typeof(glGetTexParameteriv))load("glGetTexParameteriv"); 179 glGetUniformfv = cast(typeof(glGetUniformfv))load("glGetUniformfv"); 180 glGetUniformiv = cast(typeof(glGetUniformiv))load("glGetUniformiv"); 181 glGetUniformLocation = cast(typeof(glGetUniformLocation))load("glGetUniformLocation"); 182 glGetVertexAttribfv = cast(typeof(glGetVertexAttribfv))load("glGetVertexAttribfv"); 183 glGetVertexAttribiv = cast(typeof(glGetVertexAttribiv))load("glGetVertexAttribiv"); 184 glGetVertexAttribPointerv = cast(typeof(glGetVertexAttribPointerv))load("glGetVertexAttribPointerv"); 185 glHint = cast(typeof(glHint))load("glHint"); 186 glIsBuffer = cast(typeof(glIsBuffer))load("glIsBuffer"); 187 glIsEnabled = cast(typeof(glIsEnabled))load("glIsEnabled"); 188 glIsFramebuffer = cast(typeof(glIsFramebuffer))load("glIsFramebuffer"); 189 glIsProgram = cast(typeof(glIsProgram))load("glIsProgram"); 190 glIsRenderbuffer = cast(typeof(glIsRenderbuffer))load("glIsRenderbuffer"); 191 glIsShader = cast(typeof(glIsShader))load("glIsShader"); 192 glIsTexture = cast(typeof(glIsTexture))load("glIsTexture"); 193 glLineWidth = cast(typeof(glLineWidth))load("glLineWidth"); 194 glLinkProgram = cast(typeof(glLinkProgram))load("glLinkProgram"); 195 glPixelStorei = cast(typeof(glPixelStorei))load("glPixelStorei"); 196 glPolygonOffset = cast(typeof(glPolygonOffset))load("glPolygonOffset"); 197 glReadPixels = cast(typeof(glReadPixels))load("glReadPixels"); 198 glReleaseShaderCompiler = cast(typeof(glReleaseShaderCompiler))load("glReleaseShaderCompiler"); 199 glRenderbufferStorage = cast(typeof(glRenderbufferStorage))load("glRenderbufferStorage"); 200 glSampleCoverage = cast(typeof(glSampleCoverage))load("glSampleCoverage"); 201 glScissor = cast(typeof(glScissor))load("glScissor"); 202 glShaderBinary = cast(typeof(glShaderBinary))load("glShaderBinary"); 203 glShaderSource = cast(typeof(glShaderSource))load("glShaderSource"); 204 glStencilFunc = cast(typeof(glStencilFunc))load("glStencilFunc"); 205 glStencilFuncSeparate = cast(typeof(glStencilFuncSeparate))load("glStencilFuncSeparate"); 206 glStencilMask = cast(typeof(glStencilMask))load("glStencilMask"); 207 glStencilMaskSeparate = cast(typeof(glStencilMaskSeparate))load("glStencilMaskSeparate"); 208 glStencilOp = cast(typeof(glStencilOp))load("glStencilOp"); 209 glStencilOpSeparate = cast(typeof(glStencilOpSeparate))load("glStencilOpSeparate"); 210 glTexImage2D = cast(typeof(glTexImage2D))load("glTexImage2D"); 211 glTexParameterf = cast(typeof(glTexParameterf))load("glTexParameterf"); 212 glTexParameterfv = cast(typeof(glTexParameterfv))load("glTexParameterfv"); 213 glTexParameteri = cast(typeof(glTexParameteri))load("glTexParameteri"); 214 glTexParameteriv = cast(typeof(glTexParameteriv))load("glTexParameteriv"); 215 glTexSubImage2D = cast(typeof(glTexSubImage2D))load("glTexSubImage2D"); 216 glUniform1f = cast(typeof(glUniform1f))load("glUniform1f"); 217 glUniform1fv = cast(typeof(glUniform1fv))load("glUniform1fv"); 218 glUniform1i = cast(typeof(glUniform1i))load("glUniform1i"); 219 glUniform1iv = cast(typeof(glUniform1iv))load("glUniform1iv"); 220 glUniform2f = cast(typeof(glUniform2f))load("glUniform2f"); 221 glUniform2fv = cast(typeof(glUniform2fv))load("glUniform2fv"); 222 glUniform2i = cast(typeof(glUniform2i))load("glUniform2i"); 223 glUniform2iv = cast(typeof(glUniform2iv))load("glUniform2iv"); 224 glUniform3f = cast(typeof(glUniform3f))load("glUniform3f"); 225 glUniform3fv = cast(typeof(glUniform3fv))load("glUniform3fv"); 226 glUniform3i = cast(typeof(glUniform3i))load("glUniform3i"); 227 glUniform3iv = cast(typeof(glUniform3iv))load("glUniform3iv"); 228 glUniform4f = cast(typeof(glUniform4f))load("glUniform4f"); 229 glUniform4fv = cast(typeof(glUniform4fv))load("glUniform4fv"); 230 glUniform4i = cast(typeof(glUniform4i))load("glUniform4i"); 231 glUniform4iv = cast(typeof(glUniform4iv))load("glUniform4iv"); 232 glUniformMatrix2fv = cast(typeof(glUniformMatrix2fv))load("glUniformMatrix2fv"); 233 glUniformMatrix3fv = cast(typeof(glUniformMatrix3fv))load("glUniformMatrix3fv"); 234 glUniformMatrix4fv = cast(typeof(glUniformMatrix4fv))load("glUniformMatrix4fv"); 235 glUseProgram = cast(typeof(glUseProgram))load("glUseProgram"); 236 glValidateProgram = cast(typeof(glValidateProgram))load("glValidateProgram"); 237 glVertexAttrib1f = cast(typeof(glVertexAttrib1f))load("glVertexAttrib1f"); 238 glVertexAttrib1fv = cast(typeof(glVertexAttrib1fv))load("glVertexAttrib1fv"); 239 glVertexAttrib2f = cast(typeof(glVertexAttrib2f))load("glVertexAttrib2f"); 240 glVertexAttrib2fv = cast(typeof(glVertexAttrib2fv))load("glVertexAttrib2fv"); 241 glVertexAttrib3f = cast(typeof(glVertexAttrib3f))load("glVertexAttrib3f"); 242 glVertexAttrib3fv = cast(typeof(glVertexAttrib3fv))load("glVertexAttrib3fv"); 243 glVertexAttrib4f = cast(typeof(glVertexAttrib4f))load("glVertexAttrib4f"); 244 glVertexAttrib4fv = cast(typeof(glVertexAttrib4fv))load("glVertexAttrib4fv"); 245 glVertexAttribPointer = cast(typeof(glVertexAttribPointer))load("glVertexAttribPointer"); 246 glViewport = cast(typeof(glViewport))load("glViewport"); 247 return; 248 } 249 250 void load_GL_ES_VERSION_3_0(Loader load) { 251 if(!GL_ES_VERSION_3_0) return; 252 glReadBuffer = cast(typeof(glReadBuffer))load("glReadBuffer"); 253 glDrawRangeElements = cast(typeof(glDrawRangeElements))load("glDrawRangeElements"); 254 glTexImage3D = cast(typeof(glTexImage3D))load("glTexImage3D"); 255 glTexSubImage3D = cast(typeof(glTexSubImage3D))load("glTexSubImage3D"); 256 glCopyTexSubImage3D = cast(typeof(glCopyTexSubImage3D))load("glCopyTexSubImage3D"); 257 glCompressedTexImage3D = cast(typeof(glCompressedTexImage3D))load("glCompressedTexImage3D"); 258 glCompressedTexSubImage3D = cast(typeof(glCompressedTexSubImage3D))load("glCompressedTexSubImage3D"); 259 glGenQueries = cast(typeof(glGenQueries))load("glGenQueries"); 260 glDeleteQueries = cast(typeof(glDeleteQueries))load("glDeleteQueries"); 261 glIsQuery = cast(typeof(glIsQuery))load("glIsQuery"); 262 glBeginQuery = cast(typeof(glBeginQuery))load("glBeginQuery"); 263 glEndQuery = cast(typeof(glEndQuery))load("glEndQuery"); 264 glGetQueryiv = cast(typeof(glGetQueryiv))load("glGetQueryiv"); 265 glGetQueryObjectuiv = cast(typeof(glGetQueryObjectuiv))load("glGetQueryObjectuiv"); 266 glUnmapBuffer = cast(typeof(glUnmapBuffer))load("glUnmapBuffer"); 267 glGetBufferPointerv = cast(typeof(glGetBufferPointerv))load("glGetBufferPointerv"); 268 glDrawBuffers = cast(typeof(glDrawBuffers))load("glDrawBuffers"); 269 glUniformMatrix2x3fv = cast(typeof(glUniformMatrix2x3fv))load("glUniformMatrix2x3fv"); 270 glUniformMatrix3x2fv = cast(typeof(glUniformMatrix3x2fv))load("glUniformMatrix3x2fv"); 271 glUniformMatrix2x4fv = cast(typeof(glUniformMatrix2x4fv))load("glUniformMatrix2x4fv"); 272 glUniformMatrix4x2fv = cast(typeof(glUniformMatrix4x2fv))load("glUniformMatrix4x2fv"); 273 glUniformMatrix3x4fv = cast(typeof(glUniformMatrix3x4fv))load("glUniformMatrix3x4fv"); 274 glUniformMatrix4x3fv = cast(typeof(glUniformMatrix4x3fv))load("glUniformMatrix4x3fv"); 275 glBlitFramebuffer = cast(typeof(glBlitFramebuffer))load("glBlitFramebuffer"); 276 glRenderbufferStorageMultisample = cast(typeof(glRenderbufferStorageMultisample))load("glRenderbufferStorageMultisample"); 277 glFramebufferTextureLayer = cast(typeof(glFramebufferTextureLayer))load("glFramebufferTextureLayer"); 278 glMapBufferRange = cast(typeof(glMapBufferRange))load("glMapBufferRange"); 279 glFlushMappedBufferRange = cast(typeof(glFlushMappedBufferRange))load("glFlushMappedBufferRange"); 280 glBindVertexArray = cast(typeof(glBindVertexArray))load("glBindVertexArray"); 281 glDeleteVertexArrays = cast(typeof(glDeleteVertexArrays))load("glDeleteVertexArrays"); 282 glGenVertexArrays = cast(typeof(glGenVertexArrays))load("glGenVertexArrays"); 283 glIsVertexArray = cast(typeof(glIsVertexArray))load("glIsVertexArray"); 284 glGetIntegeri_v = cast(typeof(glGetIntegeri_v))load("glGetIntegeri_v"); 285 glBeginTransformFeedback = cast(typeof(glBeginTransformFeedback))load("glBeginTransformFeedback"); 286 glEndTransformFeedback = cast(typeof(glEndTransformFeedback))load("glEndTransformFeedback"); 287 glBindBufferRange = cast(typeof(glBindBufferRange))load("glBindBufferRange"); 288 glBindBufferBase = cast(typeof(glBindBufferBase))load("glBindBufferBase"); 289 glTransformFeedbackVaryings = cast(typeof(glTransformFeedbackVaryings))load("glTransformFeedbackVaryings"); 290 glGetTransformFeedbackVarying = cast(typeof(glGetTransformFeedbackVarying))load("glGetTransformFeedbackVarying"); 291 glVertexAttribIPointer = cast(typeof(glVertexAttribIPointer))load("glVertexAttribIPointer"); 292 glGetVertexAttribIiv = cast(typeof(glGetVertexAttribIiv))load("glGetVertexAttribIiv"); 293 glGetVertexAttribIuiv = cast(typeof(glGetVertexAttribIuiv))load("glGetVertexAttribIuiv"); 294 glVertexAttribI4i = cast(typeof(glVertexAttribI4i))load("glVertexAttribI4i"); 295 glVertexAttribI4ui = cast(typeof(glVertexAttribI4ui))load("glVertexAttribI4ui"); 296 glVertexAttribI4iv = cast(typeof(glVertexAttribI4iv))load("glVertexAttribI4iv"); 297 glVertexAttribI4uiv = cast(typeof(glVertexAttribI4uiv))load("glVertexAttribI4uiv"); 298 glGetUniformuiv = cast(typeof(glGetUniformuiv))load("glGetUniformuiv"); 299 glGetFragDataLocation = cast(typeof(glGetFragDataLocation))load("glGetFragDataLocation"); 300 glUniform1ui = cast(typeof(glUniform1ui))load("glUniform1ui"); 301 glUniform2ui = cast(typeof(glUniform2ui))load("glUniform2ui"); 302 glUniform3ui = cast(typeof(glUniform3ui))load("glUniform3ui"); 303 glUniform4ui = cast(typeof(glUniform4ui))load("glUniform4ui"); 304 glUniform1uiv = cast(typeof(glUniform1uiv))load("glUniform1uiv"); 305 glUniform2uiv = cast(typeof(glUniform2uiv))load("glUniform2uiv"); 306 glUniform3uiv = cast(typeof(glUniform3uiv))load("glUniform3uiv"); 307 glUniform4uiv = cast(typeof(glUniform4uiv))load("glUniform4uiv"); 308 glClearBufferiv = cast(typeof(glClearBufferiv))load("glClearBufferiv"); 309 glClearBufferuiv = cast(typeof(glClearBufferuiv))load("glClearBufferuiv"); 310 glClearBufferfv = cast(typeof(glClearBufferfv))load("glClearBufferfv"); 311 glClearBufferfi = cast(typeof(glClearBufferfi))load("glClearBufferfi"); 312 glGetStringi = cast(typeof(glGetStringi))load("glGetStringi"); 313 glCopyBufferSubData = cast(typeof(glCopyBufferSubData))load("glCopyBufferSubData"); 314 glGetUniformIndices = cast(typeof(glGetUniformIndices))load("glGetUniformIndices"); 315 glGetActiveUniformsiv = cast(typeof(glGetActiveUniformsiv))load("glGetActiveUniformsiv"); 316 glGetUniformBlockIndex = cast(typeof(glGetUniformBlockIndex))load("glGetUniformBlockIndex"); 317 glGetActiveUniformBlockiv = cast(typeof(glGetActiveUniformBlockiv))load("glGetActiveUniformBlockiv"); 318 glGetActiveUniformBlockName = cast(typeof(glGetActiveUniformBlockName))load("glGetActiveUniformBlockName"); 319 glUniformBlockBinding = cast(typeof(glUniformBlockBinding))load("glUniformBlockBinding"); 320 glDrawArraysInstanced = cast(typeof(glDrawArraysInstanced))load("glDrawArraysInstanced"); 321 glDrawElementsInstanced = cast(typeof(glDrawElementsInstanced))load("glDrawElementsInstanced"); 322 glFenceSync = cast(typeof(glFenceSync))load("glFenceSync"); 323 glIsSync = cast(typeof(glIsSync))load("glIsSync"); 324 glDeleteSync = cast(typeof(glDeleteSync))load("glDeleteSync"); 325 glClientWaitSync = cast(typeof(glClientWaitSync))load("glClientWaitSync"); 326 glWaitSync = cast(typeof(glWaitSync))load("glWaitSync"); 327 glGetInteger64v = cast(typeof(glGetInteger64v))load("glGetInteger64v"); 328 glGetSynciv = cast(typeof(glGetSynciv))load("glGetSynciv"); 329 glGetInteger64i_v = cast(typeof(glGetInteger64i_v))load("glGetInteger64i_v"); 330 glGetBufferParameteri64v = cast(typeof(glGetBufferParameteri64v))load("glGetBufferParameteri64v"); 331 glGenSamplers = cast(typeof(glGenSamplers))load("glGenSamplers"); 332 glDeleteSamplers = cast(typeof(glDeleteSamplers))load("glDeleteSamplers"); 333 glIsSampler = cast(typeof(glIsSampler))load("glIsSampler"); 334 glBindSampler = cast(typeof(glBindSampler))load("glBindSampler"); 335 glSamplerParameteri = cast(typeof(glSamplerParameteri))load("glSamplerParameteri"); 336 glSamplerParameteriv = cast(typeof(glSamplerParameteriv))load("glSamplerParameteriv"); 337 glSamplerParameterf = cast(typeof(glSamplerParameterf))load("glSamplerParameterf"); 338 glSamplerParameterfv = cast(typeof(glSamplerParameterfv))load("glSamplerParameterfv"); 339 glGetSamplerParameteriv = cast(typeof(glGetSamplerParameteriv))load("glGetSamplerParameteriv"); 340 glGetSamplerParameterfv = cast(typeof(glGetSamplerParameterfv))load("glGetSamplerParameterfv"); 341 glVertexAttribDivisor = cast(typeof(glVertexAttribDivisor))load("glVertexAttribDivisor"); 342 glBindTransformFeedback = cast(typeof(glBindTransformFeedback))load("glBindTransformFeedback"); 343 glDeleteTransformFeedbacks = cast(typeof(glDeleteTransformFeedbacks))load("glDeleteTransformFeedbacks"); 344 glGenTransformFeedbacks = cast(typeof(glGenTransformFeedbacks))load("glGenTransformFeedbacks"); 345 glIsTransformFeedback = cast(typeof(glIsTransformFeedback))load("glIsTransformFeedback"); 346 glPauseTransformFeedback = cast(typeof(glPauseTransformFeedback))load("glPauseTransformFeedback"); 347 glResumeTransformFeedback = cast(typeof(glResumeTransformFeedback))load("glResumeTransformFeedback"); 348 glGetProgramBinary = cast(typeof(glGetProgramBinary))load("glGetProgramBinary"); 349 glProgramBinary = cast(typeof(glProgramBinary))load("glProgramBinary"); 350 glProgramParameteri = cast(typeof(glProgramParameteri))load("glProgramParameteri"); 351 glInvalidateFramebuffer = cast(typeof(glInvalidateFramebuffer))load("glInvalidateFramebuffer"); 352 glInvalidateSubFramebuffer = cast(typeof(glInvalidateSubFramebuffer))load("glInvalidateSubFramebuffer"); 353 glTexStorage2D = cast(typeof(glTexStorage2D))load("glTexStorage2D"); 354 glTexStorage3D = cast(typeof(glTexStorage3D))load("glTexStorage3D"); 355 glGetInternalformativ = cast(typeof(glGetInternalformativ))load("glGetInternalformativ"); 356 return; 357 } 358 359 360 } /* private */ 361