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 version(Windows) { 11 private import core.sys.windows.windows; 12 } else { 13 private import core.sys.posix.dlfcn; 14 } 15 16 version(Windows) { 17 private __gshared HMODULE libGL; 18 } else { 19 private __gshared void* libGL; 20 } 21 extern(System) private @nogc alias gladGetProcAddressPtrType = void* function(const(char)*); 22 private __gshared gladGetProcAddressPtrType gladGetProcAddressPtr; 23 24 private 25 bool open_gl() @nogc { 26 version(WebAssembly)return false; 27 else version(Windows) { 28 libGL = LoadLibraryA("opengl32.dll"); 29 if(libGL !is null) { 30 gladGetProcAddressPtr = cast(typeof(gladGetProcAddressPtr))GetProcAddress( 31 libGL, "wglGetProcAddress"); 32 return gladGetProcAddressPtr !is null; 33 } 34 35 return false; 36 } else { 37 version(OSX) { 38 enum const(char)*[4] NAMES = [ 39 "../Frameworks/OpenGL.framework/OpenGL", 40 "/Library/Frameworks/OpenGL.framework/OpenGL", 41 "/System/Library/Frameworks/OpenGL.framework/OpenGL", 42 "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL" 43 ]; 44 } else { 45 enum const(char)*[2] NAMES = ["libGL.so.1", "libGL.so"]; 46 } 47 48 foreach(name; NAMES) { 49 libGL = dlopen(name, RTLD_NOW | RTLD_GLOBAL); 50 if(libGL !is null) { 51 version(OSX) { 52 return true; 53 } else { 54 gladGetProcAddressPtr = cast(typeof(gladGetProcAddressPtr))dlsym(libGL, 55 "glXGetProcAddressARB"); 56 return gladGetProcAddressPtr !is null; 57 } 58 } 59 } 60 61 return false; 62 } 63 } 64 65 private 66 void* get_proc(const(char)* namez) @nogc { 67 if(libGL is null) return null; 68 void* result; 69 70 if(gladGetProcAddressPtr !is null) { 71 result = gladGetProcAddressPtr(namez); 72 } 73 if(result is null) { 74 version(WebAssembly)return result; 75 else version(Windows) { 76 result = GetProcAddress(libGL, namez); 77 } else { 78 result = dlsym(libGL, namez); 79 } 80 } 81 82 return result; 83 } 84 85 private 86 void close_gl() @nogc { 87 version(WebAssembly){} 88 else version(Windows) { 89 if(libGL !is null) { 90 FreeLibrary(libGL); 91 libGL = null; 92 } 93 } else { 94 if(libGL !is null) { 95 dlclose(libGL); 96 libGL = null; 97 } 98 } 99 } 100 101 bool gladLoadGL() { 102 bool status = false; 103 104 if(open_gl()) { 105 status = gladLoadGL(x => get_proc(x)); 106 close_gl(); 107 } 108 109 return status; 110 } 111 112 __gshared struct GLVersion { __gshared int major = 0; __gshared int minor = 0; } 113 private extern(C) char* strstr(const(char)*, const(char)*) @nogc; 114 private extern(C) int strcmp(const(char)*, const(char)*) @nogc; 115 private extern(C) int strncmp(const(char)*, const(char)*, size_t) @nogc; 116 private extern(C) size_t strlen(const(char)*) @nogc; 117 private bool has_ext(const(char)* ext) @nogc { 118 if(GLVersion.major < 3) { 119 const(char)* extensions = cast(const(char)*)glGetString(GL_EXTENSIONS); 120 const(char)* loc; 121 const(char)* terminator; 122 123 if(extensions is null || ext is null) { 124 return false; 125 } 126 127 while(1) { 128 loc = strstr(extensions, ext); 129 if(loc is null) { 130 return false; 131 } 132 133 terminator = loc + strlen(ext); 134 if((loc is extensions || *(loc - 1) == ' ') && 135 (*terminator == ' ' || *terminator == '\0')) { 136 return true; 137 } 138 extensions = terminator; 139 } 140 } else { 141 int num; 142 glGetIntegerv(GL_NUM_EXTENSIONS, &num); 143 144 for(uint i=0; i < cast(uint)num; i++) { 145 if(strcmp(cast(const(char)*)glGetStringi(GL_EXTENSIONS, i), ext) == 0) { 146 return true; 147 } 148 } 149 } 150 151 return false; 152 } 153 bool gladLoadGL(Loader load) { 154 glGetString = cast(typeof(glGetString))load("glGetString"); 155 if(glGetString is null) { return false; } 156 if(glGetString(GL_VERSION) is null) { return false; } 157 158 find_coreGL(); 159 load_GL_VERSION_1_0(load); 160 load_GL_VERSION_1_1(load); 161 load_GL_VERSION_1_2(load); 162 load_GL_VERSION_1_3(load); 163 load_GL_VERSION_1_4(load); 164 load_GL_VERSION_1_5(load); 165 load_GL_VERSION_2_0(load); 166 load_GL_VERSION_2_1(load); 167 load_GL_VERSION_3_0(load); 168 load_GL_VERSION_3_1(load); 169 load_GL_VERSION_3_2(load); 170 load_GL_VERSION_3_3(load); 171 172 find_extensionsGL(); 173 return GLVersion.major != 0 || GLVersion.minor != 0; 174 } 175 176 private { 177 178 void find_coreGL() { 179 180 // Thank you @elmindreda 181 // https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176 182 // https://github.com/glfw/glfw/blob/master/src/context.c#L36 183 int i; 184 const(char)* glversion; 185 const(char)*[3] prefixes = [ 186 "OpenGL ES-CM ".ptr, 187 "OpenGL ES-CL ".ptr, 188 "OpenGL ES ".ptr, 189 ]; 190 191 glversion = cast(const(char)*)glGetString(GL_VERSION); 192 if (glversion is null) return; 193 194 foreach(prefix; prefixes) { 195 size_t length = strlen(prefix); 196 if (strncmp(glversion, prefix, length) == 0) { 197 glversion += length; 198 break; 199 } 200 } 201 202 int major = glversion[0] - '0'; 203 int minor = glversion[2] - '0'; 204 GLVersion.major = major; GLVersion.minor = minor; 205 GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; 206 GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; 207 GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; 208 GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1; 209 GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1; 210 GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1; 211 GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; 212 GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2; 213 GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; 214 GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3; 215 GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3; 216 GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3; 217 return; 218 } 219 220 void find_extensionsGL() { 221 return; 222 } 223 224 void load_GL_VERSION_1_0(Loader load) { 225 if(!GL_VERSION_1_0) return; 226 glCullFace = cast(typeof(glCullFace))load("glCullFace"); 227 glFrontFace = cast(typeof(glFrontFace))load("glFrontFace"); 228 glHint = cast(typeof(glHint))load("glHint"); 229 glLineWidth = cast(typeof(glLineWidth))load("glLineWidth"); 230 glPointSize = cast(typeof(glPointSize))load("glPointSize"); 231 glPolygonMode = cast(typeof(glPolygonMode))load("glPolygonMode"); 232 glScissor = cast(typeof(glScissor))load("glScissor"); 233 glTexParameterf = cast(typeof(glTexParameterf))load("glTexParameterf"); 234 glTexParameterfv = cast(typeof(glTexParameterfv))load("glTexParameterfv"); 235 glTexParameteri = cast(typeof(glTexParameteri))load("glTexParameteri"); 236 glTexParameteriv = cast(typeof(glTexParameteriv))load("glTexParameteriv"); 237 glTexImage1D = cast(typeof(glTexImage1D))load("glTexImage1D"); 238 glTexImage2D = cast(typeof(glTexImage2D))load("glTexImage2D"); 239 glDrawBuffer = cast(typeof(glDrawBuffer))load("glDrawBuffer"); 240 glClear = cast(typeof(glClear))load("glClear"); 241 glClearColor = cast(typeof(glClearColor))load("glClearColor"); 242 glClearStencil = cast(typeof(glClearStencil))load("glClearStencil"); 243 glClearDepth = cast(typeof(glClearDepth))load("glClearDepth"); 244 glStencilMask = cast(typeof(glStencilMask))load("glStencilMask"); 245 glColorMask = cast(typeof(glColorMask))load("glColorMask"); 246 glDepthMask = cast(typeof(glDepthMask))load("glDepthMask"); 247 glDisable = cast(typeof(glDisable))load("glDisable"); 248 glEnable = cast(typeof(glEnable))load("glEnable"); 249 glFinish = cast(typeof(glFinish))load("glFinish"); 250 glFlush = cast(typeof(glFlush))load("glFlush"); 251 glBlendFunc = cast(typeof(glBlendFunc))load("glBlendFunc"); 252 glLogicOp = cast(typeof(glLogicOp))load("glLogicOp"); 253 glStencilFunc = cast(typeof(glStencilFunc))load("glStencilFunc"); 254 glStencilOp = cast(typeof(glStencilOp))load("glStencilOp"); 255 glDepthFunc = cast(typeof(glDepthFunc))load("glDepthFunc"); 256 glPixelStoref = cast(typeof(glPixelStoref))load("glPixelStoref"); 257 glPixelStorei = cast(typeof(glPixelStorei))load("glPixelStorei"); 258 glReadBuffer = cast(typeof(glReadBuffer))load("glReadBuffer"); 259 glReadPixels = cast(typeof(glReadPixels))load("glReadPixels"); 260 glGetBooleanv = cast(typeof(glGetBooleanv))load("glGetBooleanv"); 261 glGetDoublev = cast(typeof(glGetDoublev))load("glGetDoublev"); 262 glGetError = cast(typeof(glGetError))load("glGetError"); 263 glGetFloatv = cast(typeof(glGetFloatv))load("glGetFloatv"); 264 glGetIntegerv = cast(typeof(glGetIntegerv))load("glGetIntegerv"); 265 glGetString = cast(typeof(glGetString))load("glGetString"); 266 glGetTexImage = cast(typeof(glGetTexImage))load("glGetTexImage"); 267 glGetTexParameterfv = cast(typeof(glGetTexParameterfv))load("glGetTexParameterfv"); 268 glGetTexParameteriv = cast(typeof(glGetTexParameteriv))load("glGetTexParameteriv"); 269 glGetTexLevelParameterfv = cast(typeof(glGetTexLevelParameterfv))load("glGetTexLevelParameterfv"); 270 glGetTexLevelParameteriv = cast(typeof(glGetTexLevelParameteriv))load("glGetTexLevelParameteriv"); 271 glIsEnabled = cast(typeof(glIsEnabled))load("glIsEnabled"); 272 glDepthRange = cast(typeof(glDepthRange))load("glDepthRange"); 273 glViewport = cast(typeof(glViewport))load("glViewport"); 274 glNewList = cast(typeof(glNewList))load("glNewList"); 275 glEndList = cast(typeof(glEndList))load("glEndList"); 276 glCallList = cast(typeof(glCallList))load("glCallList"); 277 glCallLists = cast(typeof(glCallLists))load("glCallLists"); 278 glDeleteLists = cast(typeof(glDeleteLists))load("glDeleteLists"); 279 glGenLists = cast(typeof(glGenLists))load("glGenLists"); 280 glListBase = cast(typeof(glListBase))load("glListBase"); 281 glBegin = cast(typeof(glBegin))load("glBegin"); 282 glBitmap = cast(typeof(glBitmap))load("glBitmap"); 283 glColor3b = cast(typeof(glColor3b))load("glColor3b"); 284 glColor3bv = cast(typeof(glColor3bv))load("glColor3bv"); 285 glColor3d = cast(typeof(glColor3d))load("glColor3d"); 286 glColor3dv = cast(typeof(glColor3dv))load("glColor3dv"); 287 glColor3f = cast(typeof(glColor3f))load("glColor3f"); 288 glColor3fv = cast(typeof(glColor3fv))load("glColor3fv"); 289 glColor3i = cast(typeof(glColor3i))load("glColor3i"); 290 glColor3iv = cast(typeof(glColor3iv))load("glColor3iv"); 291 glColor3s = cast(typeof(glColor3s))load("glColor3s"); 292 glColor3sv = cast(typeof(glColor3sv))load("glColor3sv"); 293 glColor3ub = cast(typeof(glColor3ub))load("glColor3ub"); 294 glColor3ubv = cast(typeof(glColor3ubv))load("glColor3ubv"); 295 glColor3ui = cast(typeof(glColor3ui))load("glColor3ui"); 296 glColor3uiv = cast(typeof(glColor3uiv))load("glColor3uiv"); 297 glColor3us = cast(typeof(glColor3us))load("glColor3us"); 298 glColor3usv = cast(typeof(glColor3usv))load("glColor3usv"); 299 glColor4b = cast(typeof(glColor4b))load("glColor4b"); 300 glColor4bv = cast(typeof(glColor4bv))load("glColor4bv"); 301 glColor4d = cast(typeof(glColor4d))load("glColor4d"); 302 glColor4dv = cast(typeof(glColor4dv))load("glColor4dv"); 303 glColor4f = cast(typeof(glColor4f))load("glColor4f"); 304 glColor4fv = cast(typeof(glColor4fv))load("glColor4fv"); 305 glColor4i = cast(typeof(glColor4i))load("glColor4i"); 306 glColor4iv = cast(typeof(glColor4iv))load("glColor4iv"); 307 glColor4s = cast(typeof(glColor4s))load("glColor4s"); 308 glColor4sv = cast(typeof(glColor4sv))load("glColor4sv"); 309 glColor4ub = cast(typeof(glColor4ub))load("glColor4ub"); 310 glColor4ubv = cast(typeof(glColor4ubv))load("glColor4ubv"); 311 glColor4ui = cast(typeof(glColor4ui))load("glColor4ui"); 312 glColor4uiv = cast(typeof(glColor4uiv))load("glColor4uiv"); 313 glColor4us = cast(typeof(glColor4us))load("glColor4us"); 314 glColor4usv = cast(typeof(glColor4usv))load("glColor4usv"); 315 glEdgeFlag = cast(typeof(glEdgeFlag))load("glEdgeFlag"); 316 glEdgeFlagv = cast(typeof(glEdgeFlagv))load("glEdgeFlagv"); 317 glEnd = cast(typeof(glEnd))load("glEnd"); 318 glIndexd = cast(typeof(glIndexd))load("glIndexd"); 319 glIndexdv = cast(typeof(glIndexdv))load("glIndexdv"); 320 glIndexf = cast(typeof(glIndexf))load("glIndexf"); 321 glIndexfv = cast(typeof(glIndexfv))load("glIndexfv"); 322 glIndexi = cast(typeof(glIndexi))load("glIndexi"); 323 glIndexiv = cast(typeof(glIndexiv))load("glIndexiv"); 324 glIndexs = cast(typeof(glIndexs))load("glIndexs"); 325 glIndexsv = cast(typeof(glIndexsv))load("glIndexsv"); 326 glNormal3b = cast(typeof(glNormal3b))load("glNormal3b"); 327 glNormal3bv = cast(typeof(glNormal3bv))load("glNormal3bv"); 328 glNormal3d = cast(typeof(glNormal3d))load("glNormal3d"); 329 glNormal3dv = cast(typeof(glNormal3dv))load("glNormal3dv"); 330 glNormal3f = cast(typeof(glNormal3f))load("glNormal3f"); 331 glNormal3fv = cast(typeof(glNormal3fv))load("glNormal3fv"); 332 glNormal3i = cast(typeof(glNormal3i))load("glNormal3i"); 333 glNormal3iv = cast(typeof(glNormal3iv))load("glNormal3iv"); 334 glNormal3s = cast(typeof(glNormal3s))load("glNormal3s"); 335 glNormal3sv = cast(typeof(glNormal3sv))load("glNormal3sv"); 336 glRasterPos2d = cast(typeof(glRasterPos2d))load("glRasterPos2d"); 337 glRasterPos2dv = cast(typeof(glRasterPos2dv))load("glRasterPos2dv"); 338 glRasterPos2f = cast(typeof(glRasterPos2f))load("glRasterPos2f"); 339 glRasterPos2fv = cast(typeof(glRasterPos2fv))load("glRasterPos2fv"); 340 glRasterPos2i = cast(typeof(glRasterPos2i))load("glRasterPos2i"); 341 glRasterPos2iv = cast(typeof(glRasterPos2iv))load("glRasterPos2iv"); 342 glRasterPos2s = cast(typeof(glRasterPos2s))load("glRasterPos2s"); 343 glRasterPos2sv = cast(typeof(glRasterPos2sv))load("glRasterPos2sv"); 344 glRasterPos3d = cast(typeof(glRasterPos3d))load("glRasterPos3d"); 345 glRasterPos3dv = cast(typeof(glRasterPos3dv))load("glRasterPos3dv"); 346 glRasterPos3f = cast(typeof(glRasterPos3f))load("glRasterPos3f"); 347 glRasterPos3fv = cast(typeof(glRasterPos3fv))load("glRasterPos3fv"); 348 glRasterPos3i = cast(typeof(glRasterPos3i))load("glRasterPos3i"); 349 glRasterPos3iv = cast(typeof(glRasterPos3iv))load("glRasterPos3iv"); 350 glRasterPos3s = cast(typeof(glRasterPos3s))load("glRasterPos3s"); 351 glRasterPos3sv = cast(typeof(glRasterPos3sv))load("glRasterPos3sv"); 352 glRasterPos4d = cast(typeof(glRasterPos4d))load("glRasterPos4d"); 353 glRasterPos4dv = cast(typeof(glRasterPos4dv))load("glRasterPos4dv"); 354 glRasterPos4f = cast(typeof(glRasterPos4f))load("glRasterPos4f"); 355 glRasterPos4fv = cast(typeof(glRasterPos4fv))load("glRasterPos4fv"); 356 glRasterPos4i = cast(typeof(glRasterPos4i))load("glRasterPos4i"); 357 glRasterPos4iv = cast(typeof(glRasterPos4iv))load("glRasterPos4iv"); 358 glRasterPos4s = cast(typeof(glRasterPos4s))load("glRasterPos4s"); 359 glRasterPos4sv = cast(typeof(glRasterPos4sv))load("glRasterPos4sv"); 360 glRectd = cast(typeof(glRectd))load("glRectd"); 361 glRectdv = cast(typeof(glRectdv))load("glRectdv"); 362 glRectf = cast(typeof(glRectf))load("glRectf"); 363 glRectfv = cast(typeof(glRectfv))load("glRectfv"); 364 glRecti = cast(typeof(glRecti))load("glRecti"); 365 glRectiv = cast(typeof(glRectiv))load("glRectiv"); 366 glRects = cast(typeof(glRects))load("glRects"); 367 glRectsv = cast(typeof(glRectsv))load("glRectsv"); 368 glTexCoord1d = cast(typeof(glTexCoord1d))load("glTexCoord1d"); 369 glTexCoord1dv = cast(typeof(glTexCoord1dv))load("glTexCoord1dv"); 370 glTexCoord1f = cast(typeof(glTexCoord1f))load("glTexCoord1f"); 371 glTexCoord1fv = cast(typeof(glTexCoord1fv))load("glTexCoord1fv"); 372 glTexCoord1i = cast(typeof(glTexCoord1i))load("glTexCoord1i"); 373 glTexCoord1iv = cast(typeof(glTexCoord1iv))load("glTexCoord1iv"); 374 glTexCoord1s = cast(typeof(glTexCoord1s))load("glTexCoord1s"); 375 glTexCoord1sv = cast(typeof(glTexCoord1sv))load("glTexCoord1sv"); 376 glTexCoord2d = cast(typeof(glTexCoord2d))load("glTexCoord2d"); 377 glTexCoord2dv = cast(typeof(glTexCoord2dv))load("glTexCoord2dv"); 378 glTexCoord2f = cast(typeof(glTexCoord2f))load("glTexCoord2f"); 379 glTexCoord2fv = cast(typeof(glTexCoord2fv))load("glTexCoord2fv"); 380 glTexCoord2i = cast(typeof(glTexCoord2i))load("glTexCoord2i"); 381 glTexCoord2iv = cast(typeof(glTexCoord2iv))load("glTexCoord2iv"); 382 glTexCoord2s = cast(typeof(glTexCoord2s))load("glTexCoord2s"); 383 glTexCoord2sv = cast(typeof(glTexCoord2sv))load("glTexCoord2sv"); 384 glTexCoord3d = cast(typeof(glTexCoord3d))load("glTexCoord3d"); 385 glTexCoord3dv = cast(typeof(glTexCoord3dv))load("glTexCoord3dv"); 386 glTexCoord3f = cast(typeof(glTexCoord3f))load("glTexCoord3f"); 387 glTexCoord3fv = cast(typeof(glTexCoord3fv))load("glTexCoord3fv"); 388 glTexCoord3i = cast(typeof(glTexCoord3i))load("glTexCoord3i"); 389 glTexCoord3iv = cast(typeof(glTexCoord3iv))load("glTexCoord3iv"); 390 glTexCoord3s = cast(typeof(glTexCoord3s))load("glTexCoord3s"); 391 glTexCoord3sv = cast(typeof(glTexCoord3sv))load("glTexCoord3sv"); 392 glTexCoord4d = cast(typeof(glTexCoord4d))load("glTexCoord4d"); 393 glTexCoord4dv = cast(typeof(glTexCoord4dv))load("glTexCoord4dv"); 394 glTexCoord4f = cast(typeof(glTexCoord4f))load("glTexCoord4f"); 395 glTexCoord4fv = cast(typeof(glTexCoord4fv))load("glTexCoord4fv"); 396 glTexCoord4i = cast(typeof(glTexCoord4i))load("glTexCoord4i"); 397 glTexCoord4iv = cast(typeof(glTexCoord4iv))load("glTexCoord4iv"); 398 glTexCoord4s = cast(typeof(glTexCoord4s))load("glTexCoord4s"); 399 glTexCoord4sv = cast(typeof(glTexCoord4sv))load("glTexCoord4sv"); 400 glVertex2d = cast(typeof(glVertex2d))load("glVertex2d"); 401 glVertex2dv = cast(typeof(glVertex2dv))load("glVertex2dv"); 402 glVertex2f = cast(typeof(glVertex2f))load("glVertex2f"); 403 glVertex2fv = cast(typeof(glVertex2fv))load("glVertex2fv"); 404 glVertex2i = cast(typeof(glVertex2i))load("glVertex2i"); 405 glVertex2iv = cast(typeof(glVertex2iv))load("glVertex2iv"); 406 glVertex2s = cast(typeof(glVertex2s))load("glVertex2s"); 407 glVertex2sv = cast(typeof(glVertex2sv))load("glVertex2sv"); 408 glVertex3d = cast(typeof(glVertex3d))load("glVertex3d"); 409 glVertex3dv = cast(typeof(glVertex3dv))load("glVertex3dv"); 410 glVertex3f = cast(typeof(glVertex3f))load("glVertex3f"); 411 glVertex3fv = cast(typeof(glVertex3fv))load("glVertex3fv"); 412 glVertex3i = cast(typeof(glVertex3i))load("glVertex3i"); 413 glVertex3iv = cast(typeof(glVertex3iv))load("glVertex3iv"); 414 glVertex3s = cast(typeof(glVertex3s))load("glVertex3s"); 415 glVertex3sv = cast(typeof(glVertex3sv))load("glVertex3sv"); 416 glVertex4d = cast(typeof(glVertex4d))load("glVertex4d"); 417 glVertex4dv = cast(typeof(glVertex4dv))load("glVertex4dv"); 418 glVertex4f = cast(typeof(glVertex4f))load("glVertex4f"); 419 glVertex4fv = cast(typeof(glVertex4fv))load("glVertex4fv"); 420 glVertex4i = cast(typeof(glVertex4i))load("glVertex4i"); 421 glVertex4iv = cast(typeof(glVertex4iv))load("glVertex4iv"); 422 glVertex4s = cast(typeof(glVertex4s))load("glVertex4s"); 423 glVertex4sv = cast(typeof(glVertex4sv))load("glVertex4sv"); 424 glClipPlane = cast(typeof(glClipPlane))load("glClipPlane"); 425 glColorMaterial = cast(typeof(glColorMaterial))load("glColorMaterial"); 426 glFogf = cast(typeof(glFogf))load("glFogf"); 427 glFogfv = cast(typeof(glFogfv))load("glFogfv"); 428 glFogi = cast(typeof(glFogi))load("glFogi"); 429 glFogiv = cast(typeof(glFogiv))load("glFogiv"); 430 glLightf = cast(typeof(glLightf))load("glLightf"); 431 glLightfv = cast(typeof(glLightfv))load("glLightfv"); 432 glLighti = cast(typeof(glLighti))load("glLighti"); 433 glLightiv = cast(typeof(glLightiv))load("glLightiv"); 434 glLightModelf = cast(typeof(glLightModelf))load("glLightModelf"); 435 glLightModelfv = cast(typeof(glLightModelfv))load("glLightModelfv"); 436 glLightModeli = cast(typeof(glLightModeli))load("glLightModeli"); 437 glLightModeliv = cast(typeof(glLightModeliv))load("glLightModeliv"); 438 glLineStipple = cast(typeof(glLineStipple))load("glLineStipple"); 439 glMaterialf = cast(typeof(glMaterialf))load("glMaterialf"); 440 glMaterialfv = cast(typeof(glMaterialfv))load("glMaterialfv"); 441 glMateriali = cast(typeof(glMateriali))load("glMateriali"); 442 glMaterialiv = cast(typeof(glMaterialiv))load("glMaterialiv"); 443 glPolygonStipple = cast(typeof(glPolygonStipple))load("glPolygonStipple"); 444 glShadeModel = cast(typeof(glShadeModel))load("glShadeModel"); 445 glTexEnvf = cast(typeof(glTexEnvf))load("glTexEnvf"); 446 glTexEnvfv = cast(typeof(glTexEnvfv))load("glTexEnvfv"); 447 glTexEnvi = cast(typeof(glTexEnvi))load("glTexEnvi"); 448 glTexEnviv = cast(typeof(glTexEnviv))load("glTexEnviv"); 449 glTexGend = cast(typeof(glTexGend))load("glTexGend"); 450 glTexGendv = cast(typeof(glTexGendv))load("glTexGendv"); 451 glTexGenf = cast(typeof(glTexGenf))load("glTexGenf"); 452 glTexGenfv = cast(typeof(glTexGenfv))load("glTexGenfv"); 453 glTexGeni = cast(typeof(glTexGeni))load("glTexGeni"); 454 glTexGeniv = cast(typeof(glTexGeniv))load("glTexGeniv"); 455 glFeedbackBuffer = cast(typeof(glFeedbackBuffer))load("glFeedbackBuffer"); 456 glSelectBuffer = cast(typeof(glSelectBuffer))load("glSelectBuffer"); 457 glRenderMode = cast(typeof(glRenderMode))load("glRenderMode"); 458 glInitNames = cast(typeof(glInitNames))load("glInitNames"); 459 glLoadName = cast(typeof(glLoadName))load("glLoadName"); 460 glPassThrough = cast(typeof(glPassThrough))load("glPassThrough"); 461 glPopName = cast(typeof(glPopName))load("glPopName"); 462 glPushName = cast(typeof(glPushName))load("glPushName"); 463 glClearAccum = cast(typeof(glClearAccum))load("glClearAccum"); 464 glClearIndex = cast(typeof(glClearIndex))load("glClearIndex"); 465 glIndexMask = cast(typeof(glIndexMask))load("glIndexMask"); 466 glAccum = cast(typeof(glAccum))load("glAccum"); 467 glPopAttrib = cast(typeof(glPopAttrib))load("glPopAttrib"); 468 glPushAttrib = cast(typeof(glPushAttrib))load("glPushAttrib"); 469 glMap1d = cast(typeof(glMap1d))load("glMap1d"); 470 glMap1f = cast(typeof(glMap1f))load("glMap1f"); 471 glMap2d = cast(typeof(glMap2d))load("glMap2d"); 472 glMap2f = cast(typeof(glMap2f))load("glMap2f"); 473 glMapGrid1d = cast(typeof(glMapGrid1d))load("glMapGrid1d"); 474 glMapGrid1f = cast(typeof(glMapGrid1f))load("glMapGrid1f"); 475 glMapGrid2d = cast(typeof(glMapGrid2d))load("glMapGrid2d"); 476 glMapGrid2f = cast(typeof(glMapGrid2f))load("glMapGrid2f"); 477 glEvalCoord1d = cast(typeof(glEvalCoord1d))load("glEvalCoord1d"); 478 glEvalCoord1dv = cast(typeof(glEvalCoord1dv))load("glEvalCoord1dv"); 479 glEvalCoord1f = cast(typeof(glEvalCoord1f))load("glEvalCoord1f"); 480 glEvalCoord1fv = cast(typeof(glEvalCoord1fv))load("glEvalCoord1fv"); 481 glEvalCoord2d = cast(typeof(glEvalCoord2d))load("glEvalCoord2d"); 482 glEvalCoord2dv = cast(typeof(glEvalCoord2dv))load("glEvalCoord2dv"); 483 glEvalCoord2f = cast(typeof(glEvalCoord2f))load("glEvalCoord2f"); 484 glEvalCoord2fv = cast(typeof(glEvalCoord2fv))load("glEvalCoord2fv"); 485 glEvalMesh1 = cast(typeof(glEvalMesh1))load("glEvalMesh1"); 486 glEvalPoint1 = cast(typeof(glEvalPoint1))load("glEvalPoint1"); 487 glEvalMesh2 = cast(typeof(glEvalMesh2))load("glEvalMesh2"); 488 glEvalPoint2 = cast(typeof(glEvalPoint2))load("glEvalPoint2"); 489 glAlphaFunc = cast(typeof(glAlphaFunc))load("glAlphaFunc"); 490 glPixelZoom = cast(typeof(glPixelZoom))load("glPixelZoom"); 491 glPixelTransferf = cast(typeof(glPixelTransferf))load("glPixelTransferf"); 492 glPixelTransferi = cast(typeof(glPixelTransferi))load("glPixelTransferi"); 493 glPixelMapfv = cast(typeof(glPixelMapfv))load("glPixelMapfv"); 494 glPixelMapuiv = cast(typeof(glPixelMapuiv))load("glPixelMapuiv"); 495 glPixelMapusv = cast(typeof(glPixelMapusv))load("glPixelMapusv"); 496 glCopyPixels = cast(typeof(glCopyPixels))load("glCopyPixels"); 497 glDrawPixels = cast(typeof(glDrawPixels))load("glDrawPixels"); 498 glGetClipPlane = cast(typeof(glGetClipPlane))load("glGetClipPlane"); 499 glGetLightfv = cast(typeof(glGetLightfv))load("glGetLightfv"); 500 glGetLightiv = cast(typeof(glGetLightiv))load("glGetLightiv"); 501 glGetMapdv = cast(typeof(glGetMapdv))load("glGetMapdv"); 502 glGetMapfv = cast(typeof(glGetMapfv))load("glGetMapfv"); 503 glGetMapiv = cast(typeof(glGetMapiv))load("glGetMapiv"); 504 glGetMaterialfv = cast(typeof(glGetMaterialfv))load("glGetMaterialfv"); 505 glGetMaterialiv = cast(typeof(glGetMaterialiv))load("glGetMaterialiv"); 506 glGetPixelMapfv = cast(typeof(glGetPixelMapfv))load("glGetPixelMapfv"); 507 glGetPixelMapuiv = cast(typeof(glGetPixelMapuiv))load("glGetPixelMapuiv"); 508 glGetPixelMapusv = cast(typeof(glGetPixelMapusv))load("glGetPixelMapusv"); 509 glGetPolygonStipple = cast(typeof(glGetPolygonStipple))load("glGetPolygonStipple"); 510 glGetTexEnvfv = cast(typeof(glGetTexEnvfv))load("glGetTexEnvfv"); 511 glGetTexEnviv = cast(typeof(glGetTexEnviv))load("glGetTexEnviv"); 512 glGetTexGendv = cast(typeof(glGetTexGendv))load("glGetTexGendv"); 513 glGetTexGenfv = cast(typeof(glGetTexGenfv))load("glGetTexGenfv"); 514 glGetTexGeniv = cast(typeof(glGetTexGeniv))load("glGetTexGeniv"); 515 glIsList = cast(typeof(glIsList))load("glIsList"); 516 glFrustum = cast(typeof(glFrustum))load("glFrustum"); 517 glLoadIdentity = cast(typeof(glLoadIdentity))load("glLoadIdentity"); 518 glLoadMatrixf = cast(typeof(glLoadMatrixf))load("glLoadMatrixf"); 519 glLoadMatrixd = cast(typeof(glLoadMatrixd))load("glLoadMatrixd"); 520 glMatrixMode = cast(typeof(glMatrixMode))load("glMatrixMode"); 521 glMultMatrixf = cast(typeof(glMultMatrixf))load("glMultMatrixf"); 522 glMultMatrixd = cast(typeof(glMultMatrixd))load("glMultMatrixd"); 523 glOrtho = cast(typeof(glOrtho))load("glOrtho"); 524 glPopMatrix = cast(typeof(glPopMatrix))load("glPopMatrix"); 525 glPushMatrix = cast(typeof(glPushMatrix))load("glPushMatrix"); 526 glRotated = cast(typeof(glRotated))load("glRotated"); 527 glRotatef = cast(typeof(glRotatef))load("glRotatef"); 528 glScaled = cast(typeof(glScaled))load("glScaled"); 529 glScalef = cast(typeof(glScalef))load("glScalef"); 530 glTranslated = cast(typeof(glTranslated))load("glTranslated"); 531 glTranslatef = cast(typeof(glTranslatef))load("glTranslatef"); 532 return; 533 } 534 535 void load_GL_VERSION_1_1(Loader load) { 536 if(!GL_VERSION_1_1) return; 537 glDrawArrays = cast(typeof(glDrawArrays))load("glDrawArrays"); 538 glDrawElements = cast(typeof(glDrawElements))load("glDrawElements"); 539 glGetPointerv = cast(typeof(glGetPointerv))load("glGetPointerv"); 540 glPolygonOffset = cast(typeof(glPolygonOffset))load("glPolygonOffset"); 541 glCopyTexImage1D = cast(typeof(glCopyTexImage1D))load("glCopyTexImage1D"); 542 glCopyTexImage2D = cast(typeof(glCopyTexImage2D))load("glCopyTexImage2D"); 543 glCopyTexSubImage1D = cast(typeof(glCopyTexSubImage1D))load("glCopyTexSubImage1D"); 544 glCopyTexSubImage2D = cast(typeof(glCopyTexSubImage2D))load("glCopyTexSubImage2D"); 545 glTexSubImage1D = cast(typeof(glTexSubImage1D))load("glTexSubImage1D"); 546 glTexSubImage2D = cast(typeof(glTexSubImage2D))load("glTexSubImage2D"); 547 glBindTexture = cast(typeof(glBindTexture))load("glBindTexture"); 548 glDeleteTextures = cast(typeof(glDeleteTextures))load("glDeleteTextures"); 549 glGenTextures = cast(typeof(glGenTextures))load("glGenTextures"); 550 glIsTexture = cast(typeof(glIsTexture))load("glIsTexture"); 551 glArrayElement = cast(typeof(glArrayElement))load("glArrayElement"); 552 glColorPointer = cast(typeof(glColorPointer))load("glColorPointer"); 553 glDisableClientState = cast(typeof(glDisableClientState))load("glDisableClientState"); 554 glEdgeFlagPointer = cast(typeof(glEdgeFlagPointer))load("glEdgeFlagPointer"); 555 glEnableClientState = cast(typeof(glEnableClientState))load("glEnableClientState"); 556 glIndexPointer = cast(typeof(glIndexPointer))load("glIndexPointer"); 557 glInterleavedArrays = cast(typeof(glInterleavedArrays))load("glInterleavedArrays"); 558 glNormalPointer = cast(typeof(glNormalPointer))load("glNormalPointer"); 559 glTexCoordPointer = cast(typeof(glTexCoordPointer))load("glTexCoordPointer"); 560 glVertexPointer = cast(typeof(glVertexPointer))load("glVertexPointer"); 561 glAreTexturesResident = cast(typeof(glAreTexturesResident))load("glAreTexturesResident"); 562 glPrioritizeTextures = cast(typeof(glPrioritizeTextures))load("glPrioritizeTextures"); 563 glIndexub = cast(typeof(glIndexub))load("glIndexub"); 564 glIndexubv = cast(typeof(glIndexubv))load("glIndexubv"); 565 glPopClientAttrib = cast(typeof(glPopClientAttrib))load("glPopClientAttrib"); 566 glPushClientAttrib = cast(typeof(glPushClientAttrib))load("glPushClientAttrib"); 567 return; 568 } 569 570 void load_GL_VERSION_1_2(Loader load) { 571 if(!GL_VERSION_1_2) return; 572 glDrawRangeElements = cast(typeof(glDrawRangeElements))load("glDrawRangeElements"); 573 glTexImage3D = cast(typeof(glTexImage3D))load("glTexImage3D"); 574 glTexSubImage3D = cast(typeof(glTexSubImage3D))load("glTexSubImage3D"); 575 glCopyTexSubImage3D = cast(typeof(glCopyTexSubImage3D))load("glCopyTexSubImage3D"); 576 return; 577 } 578 579 void load_GL_VERSION_1_3(Loader load) { 580 if(!GL_VERSION_1_3) return; 581 glActiveTexture = cast(typeof(glActiveTexture))load("glActiveTexture"); 582 glSampleCoverage = cast(typeof(glSampleCoverage))load("glSampleCoverage"); 583 glCompressedTexImage3D = cast(typeof(glCompressedTexImage3D))load("glCompressedTexImage3D"); 584 glCompressedTexImage2D = cast(typeof(glCompressedTexImage2D))load("glCompressedTexImage2D"); 585 glCompressedTexImage1D = cast(typeof(glCompressedTexImage1D))load("glCompressedTexImage1D"); 586 glCompressedTexSubImage3D = cast(typeof(glCompressedTexSubImage3D))load("glCompressedTexSubImage3D"); 587 glCompressedTexSubImage2D = cast(typeof(glCompressedTexSubImage2D))load("glCompressedTexSubImage2D"); 588 glCompressedTexSubImage1D = cast(typeof(glCompressedTexSubImage1D))load("glCompressedTexSubImage1D"); 589 glGetCompressedTexImage = cast(typeof(glGetCompressedTexImage))load("glGetCompressedTexImage"); 590 glClientActiveTexture = cast(typeof(glClientActiveTexture))load("glClientActiveTexture"); 591 glMultiTexCoord1d = cast(typeof(glMultiTexCoord1d))load("glMultiTexCoord1d"); 592 glMultiTexCoord1dv = cast(typeof(glMultiTexCoord1dv))load("glMultiTexCoord1dv"); 593 glMultiTexCoord1f = cast(typeof(glMultiTexCoord1f))load("glMultiTexCoord1f"); 594 glMultiTexCoord1fv = cast(typeof(glMultiTexCoord1fv))load("glMultiTexCoord1fv"); 595 glMultiTexCoord1i = cast(typeof(glMultiTexCoord1i))load("glMultiTexCoord1i"); 596 glMultiTexCoord1iv = cast(typeof(glMultiTexCoord1iv))load("glMultiTexCoord1iv"); 597 glMultiTexCoord1s = cast(typeof(glMultiTexCoord1s))load("glMultiTexCoord1s"); 598 glMultiTexCoord1sv = cast(typeof(glMultiTexCoord1sv))load("glMultiTexCoord1sv"); 599 glMultiTexCoord2d = cast(typeof(glMultiTexCoord2d))load("glMultiTexCoord2d"); 600 glMultiTexCoord2dv = cast(typeof(glMultiTexCoord2dv))load("glMultiTexCoord2dv"); 601 glMultiTexCoord2f = cast(typeof(glMultiTexCoord2f))load("glMultiTexCoord2f"); 602 glMultiTexCoord2fv = cast(typeof(glMultiTexCoord2fv))load("glMultiTexCoord2fv"); 603 glMultiTexCoord2i = cast(typeof(glMultiTexCoord2i))load("glMultiTexCoord2i"); 604 glMultiTexCoord2iv = cast(typeof(glMultiTexCoord2iv))load("glMultiTexCoord2iv"); 605 glMultiTexCoord2s = cast(typeof(glMultiTexCoord2s))load("glMultiTexCoord2s"); 606 glMultiTexCoord2sv = cast(typeof(glMultiTexCoord2sv))load("glMultiTexCoord2sv"); 607 glMultiTexCoord3d = cast(typeof(glMultiTexCoord3d))load("glMultiTexCoord3d"); 608 glMultiTexCoord3dv = cast(typeof(glMultiTexCoord3dv))load("glMultiTexCoord3dv"); 609 glMultiTexCoord3f = cast(typeof(glMultiTexCoord3f))load("glMultiTexCoord3f"); 610 glMultiTexCoord3fv = cast(typeof(glMultiTexCoord3fv))load("glMultiTexCoord3fv"); 611 glMultiTexCoord3i = cast(typeof(glMultiTexCoord3i))load("glMultiTexCoord3i"); 612 glMultiTexCoord3iv = cast(typeof(glMultiTexCoord3iv))load("glMultiTexCoord3iv"); 613 glMultiTexCoord3s = cast(typeof(glMultiTexCoord3s))load("glMultiTexCoord3s"); 614 glMultiTexCoord3sv = cast(typeof(glMultiTexCoord3sv))load("glMultiTexCoord3sv"); 615 glMultiTexCoord4d = cast(typeof(glMultiTexCoord4d))load("glMultiTexCoord4d"); 616 glMultiTexCoord4dv = cast(typeof(glMultiTexCoord4dv))load("glMultiTexCoord4dv"); 617 glMultiTexCoord4f = cast(typeof(glMultiTexCoord4f))load("glMultiTexCoord4f"); 618 glMultiTexCoord4fv = cast(typeof(glMultiTexCoord4fv))load("glMultiTexCoord4fv"); 619 glMultiTexCoord4i = cast(typeof(glMultiTexCoord4i))load("glMultiTexCoord4i"); 620 glMultiTexCoord4iv = cast(typeof(glMultiTexCoord4iv))load("glMultiTexCoord4iv"); 621 glMultiTexCoord4s = cast(typeof(glMultiTexCoord4s))load("glMultiTexCoord4s"); 622 glMultiTexCoord4sv = cast(typeof(glMultiTexCoord4sv))load("glMultiTexCoord4sv"); 623 glLoadTransposeMatrixf = cast(typeof(glLoadTransposeMatrixf))load("glLoadTransposeMatrixf"); 624 glLoadTransposeMatrixd = cast(typeof(glLoadTransposeMatrixd))load("glLoadTransposeMatrixd"); 625 glMultTransposeMatrixf = cast(typeof(glMultTransposeMatrixf))load("glMultTransposeMatrixf"); 626 glMultTransposeMatrixd = cast(typeof(glMultTransposeMatrixd))load("glMultTransposeMatrixd"); 627 return; 628 } 629 630 void load_GL_VERSION_1_4(Loader load) { 631 if(!GL_VERSION_1_4) return; 632 glBlendFuncSeparate = cast(typeof(glBlendFuncSeparate))load("glBlendFuncSeparate"); 633 glMultiDrawArrays = cast(typeof(glMultiDrawArrays))load("glMultiDrawArrays"); 634 glMultiDrawElements = cast(typeof(glMultiDrawElements))load("glMultiDrawElements"); 635 glPointParameterf = cast(typeof(glPointParameterf))load("glPointParameterf"); 636 glPointParameterfv = cast(typeof(glPointParameterfv))load("glPointParameterfv"); 637 glPointParameteri = cast(typeof(glPointParameteri))load("glPointParameteri"); 638 glPointParameteriv = cast(typeof(glPointParameteriv))load("glPointParameteriv"); 639 glFogCoordf = cast(typeof(glFogCoordf))load("glFogCoordf"); 640 glFogCoordfv = cast(typeof(glFogCoordfv))load("glFogCoordfv"); 641 glFogCoordd = cast(typeof(glFogCoordd))load("glFogCoordd"); 642 glFogCoorddv = cast(typeof(glFogCoorddv))load("glFogCoorddv"); 643 glFogCoordPointer = cast(typeof(glFogCoordPointer))load("glFogCoordPointer"); 644 glSecondaryColor3b = cast(typeof(glSecondaryColor3b))load("glSecondaryColor3b"); 645 glSecondaryColor3bv = cast(typeof(glSecondaryColor3bv))load("glSecondaryColor3bv"); 646 glSecondaryColor3d = cast(typeof(glSecondaryColor3d))load("glSecondaryColor3d"); 647 glSecondaryColor3dv = cast(typeof(glSecondaryColor3dv))load("glSecondaryColor3dv"); 648 glSecondaryColor3f = cast(typeof(glSecondaryColor3f))load("glSecondaryColor3f"); 649 glSecondaryColor3fv = cast(typeof(glSecondaryColor3fv))load("glSecondaryColor3fv"); 650 glSecondaryColor3i = cast(typeof(glSecondaryColor3i))load("glSecondaryColor3i"); 651 glSecondaryColor3iv = cast(typeof(glSecondaryColor3iv))load("glSecondaryColor3iv"); 652 glSecondaryColor3s = cast(typeof(glSecondaryColor3s))load("glSecondaryColor3s"); 653 glSecondaryColor3sv = cast(typeof(glSecondaryColor3sv))load("glSecondaryColor3sv"); 654 glSecondaryColor3ub = cast(typeof(glSecondaryColor3ub))load("glSecondaryColor3ub"); 655 glSecondaryColor3ubv = cast(typeof(glSecondaryColor3ubv))load("glSecondaryColor3ubv"); 656 glSecondaryColor3ui = cast(typeof(glSecondaryColor3ui))load("glSecondaryColor3ui"); 657 glSecondaryColor3uiv = cast(typeof(glSecondaryColor3uiv))load("glSecondaryColor3uiv"); 658 glSecondaryColor3us = cast(typeof(glSecondaryColor3us))load("glSecondaryColor3us"); 659 glSecondaryColor3usv = cast(typeof(glSecondaryColor3usv))load("glSecondaryColor3usv"); 660 glSecondaryColorPointer = cast(typeof(glSecondaryColorPointer))load("glSecondaryColorPointer"); 661 glWindowPos2d = cast(typeof(glWindowPos2d))load("glWindowPos2d"); 662 glWindowPos2dv = cast(typeof(glWindowPos2dv))load("glWindowPos2dv"); 663 glWindowPos2f = cast(typeof(glWindowPos2f))load("glWindowPos2f"); 664 glWindowPos2fv = cast(typeof(glWindowPos2fv))load("glWindowPos2fv"); 665 glWindowPos2i = cast(typeof(glWindowPos2i))load("glWindowPos2i"); 666 glWindowPos2iv = cast(typeof(glWindowPos2iv))load("glWindowPos2iv"); 667 glWindowPos2s = cast(typeof(glWindowPos2s))load("glWindowPos2s"); 668 glWindowPos2sv = cast(typeof(glWindowPos2sv))load("glWindowPos2sv"); 669 glWindowPos3d = cast(typeof(glWindowPos3d))load("glWindowPos3d"); 670 glWindowPos3dv = cast(typeof(glWindowPos3dv))load("glWindowPos3dv"); 671 glWindowPos3f = cast(typeof(glWindowPos3f))load("glWindowPos3f"); 672 glWindowPos3fv = cast(typeof(glWindowPos3fv))load("glWindowPos3fv"); 673 glWindowPos3i = cast(typeof(glWindowPos3i))load("glWindowPos3i"); 674 glWindowPos3iv = cast(typeof(glWindowPos3iv))load("glWindowPos3iv"); 675 glWindowPos3s = cast(typeof(glWindowPos3s))load("glWindowPos3s"); 676 glWindowPos3sv = cast(typeof(glWindowPos3sv))load("glWindowPos3sv"); 677 glBlendColor = cast(typeof(glBlendColor))load("glBlendColor"); 678 glBlendEquation = cast(typeof(glBlendEquation))load("glBlendEquation"); 679 return; 680 } 681 682 void load_GL_VERSION_1_5(Loader load) { 683 if(!GL_VERSION_1_5) return; 684 glGenQueries = cast(typeof(glGenQueries))load("glGenQueries"); 685 glDeleteQueries = cast(typeof(glDeleteQueries))load("glDeleteQueries"); 686 glIsQuery = cast(typeof(glIsQuery))load("glIsQuery"); 687 glBeginQuery = cast(typeof(glBeginQuery))load("glBeginQuery"); 688 glEndQuery = cast(typeof(glEndQuery))load("glEndQuery"); 689 glGetQueryiv = cast(typeof(glGetQueryiv))load("glGetQueryiv"); 690 glGetQueryObjectiv = cast(typeof(glGetQueryObjectiv))load("glGetQueryObjectiv"); 691 glGetQueryObjectuiv = cast(typeof(glGetQueryObjectuiv))load("glGetQueryObjectuiv"); 692 glBindBuffer = cast(typeof(glBindBuffer))load("glBindBuffer"); 693 glDeleteBuffers = cast(typeof(glDeleteBuffers))load("glDeleteBuffers"); 694 glGenBuffers = cast(typeof(glGenBuffers))load("glGenBuffers"); 695 glIsBuffer = cast(typeof(glIsBuffer))load("glIsBuffer"); 696 glBufferData = cast(typeof(glBufferData))load("glBufferData"); 697 glBufferSubData = cast(typeof(glBufferSubData))load("glBufferSubData"); 698 glGetBufferSubData = cast(typeof(glGetBufferSubData))load("glGetBufferSubData"); 699 glMapBuffer = cast(typeof(glMapBuffer))load("glMapBuffer"); 700 glUnmapBuffer = cast(typeof(glUnmapBuffer))load("glUnmapBuffer"); 701 glGetBufferParameteriv = cast(typeof(glGetBufferParameteriv))load("glGetBufferParameteriv"); 702 glGetBufferPointerv = cast(typeof(glGetBufferPointerv))load("glGetBufferPointerv"); 703 return; 704 } 705 706 void load_GL_VERSION_2_0(Loader load) { 707 if(!GL_VERSION_2_0) return; 708 glBlendEquationSeparate = cast(typeof(glBlendEquationSeparate))load("glBlendEquationSeparate"); 709 glDrawBuffers = cast(typeof(glDrawBuffers))load("glDrawBuffers"); 710 glStencilOpSeparate = cast(typeof(glStencilOpSeparate))load("glStencilOpSeparate"); 711 glStencilFuncSeparate = cast(typeof(glStencilFuncSeparate))load("glStencilFuncSeparate"); 712 glStencilMaskSeparate = cast(typeof(glStencilMaskSeparate))load("glStencilMaskSeparate"); 713 glAttachShader = cast(typeof(glAttachShader))load("glAttachShader"); 714 glBindAttribLocation = cast(typeof(glBindAttribLocation))load("glBindAttribLocation"); 715 glCompileShader = cast(typeof(glCompileShader))load("glCompileShader"); 716 glCreateProgram = cast(typeof(glCreateProgram))load("glCreateProgram"); 717 glCreateShader = cast(typeof(glCreateShader))load("glCreateShader"); 718 glDeleteProgram = cast(typeof(glDeleteProgram))load("glDeleteProgram"); 719 glDeleteShader = cast(typeof(glDeleteShader))load("glDeleteShader"); 720 glDetachShader = cast(typeof(glDetachShader))load("glDetachShader"); 721 glDisableVertexAttribArray = cast(typeof(glDisableVertexAttribArray))load("glDisableVertexAttribArray"); 722 glEnableVertexAttribArray = cast(typeof(glEnableVertexAttribArray))load("glEnableVertexAttribArray"); 723 glGetActiveAttrib = cast(typeof(glGetActiveAttrib))load("glGetActiveAttrib"); 724 glGetActiveUniform = cast(typeof(glGetActiveUniform))load("glGetActiveUniform"); 725 glGetAttachedShaders = cast(typeof(glGetAttachedShaders))load("glGetAttachedShaders"); 726 glGetAttribLocation = cast(typeof(glGetAttribLocation))load("glGetAttribLocation"); 727 glGetProgramiv = cast(typeof(glGetProgramiv))load("glGetProgramiv"); 728 glGetProgramInfoLog = cast(typeof(glGetProgramInfoLog))load("glGetProgramInfoLog"); 729 glGetShaderiv = cast(typeof(glGetShaderiv))load("glGetShaderiv"); 730 glGetShaderInfoLog = cast(typeof(glGetShaderInfoLog))load("glGetShaderInfoLog"); 731 glGetShaderSource = cast(typeof(glGetShaderSource))load("glGetShaderSource"); 732 glGetUniformLocation = cast(typeof(glGetUniformLocation))load("glGetUniformLocation"); 733 glGetUniformfv = cast(typeof(glGetUniformfv))load("glGetUniformfv"); 734 glGetUniformiv = cast(typeof(glGetUniformiv))load("glGetUniformiv"); 735 glGetVertexAttribdv = cast(typeof(glGetVertexAttribdv))load("glGetVertexAttribdv"); 736 glGetVertexAttribfv = cast(typeof(glGetVertexAttribfv))load("glGetVertexAttribfv"); 737 glGetVertexAttribiv = cast(typeof(glGetVertexAttribiv))load("glGetVertexAttribiv"); 738 glGetVertexAttribPointerv = cast(typeof(glGetVertexAttribPointerv))load("glGetVertexAttribPointerv"); 739 glIsProgram = cast(typeof(glIsProgram))load("glIsProgram"); 740 glIsShader = cast(typeof(glIsShader))load("glIsShader"); 741 glLinkProgram = cast(typeof(glLinkProgram))load("glLinkProgram"); 742 glShaderSource = cast(typeof(glShaderSource))load("glShaderSource"); 743 glUseProgram = cast(typeof(glUseProgram))load("glUseProgram"); 744 glUniform1f = cast(typeof(glUniform1f))load("glUniform1f"); 745 glUniform2f = cast(typeof(glUniform2f))load("glUniform2f"); 746 glUniform3f = cast(typeof(glUniform3f))load("glUniform3f"); 747 glUniform4f = cast(typeof(glUniform4f))load("glUniform4f"); 748 glUniform1i = cast(typeof(glUniform1i))load("glUniform1i"); 749 glUniform2i = cast(typeof(glUniform2i))load("glUniform2i"); 750 glUniform3i = cast(typeof(glUniform3i))load("glUniform3i"); 751 glUniform4i = cast(typeof(glUniform4i))load("glUniform4i"); 752 glUniform1fv = cast(typeof(glUniform1fv))load("glUniform1fv"); 753 glUniform2fv = cast(typeof(glUniform2fv))load("glUniform2fv"); 754 glUniform3fv = cast(typeof(glUniform3fv))load("glUniform3fv"); 755 glUniform4fv = cast(typeof(glUniform4fv))load("glUniform4fv"); 756 glUniform1iv = cast(typeof(glUniform1iv))load("glUniform1iv"); 757 glUniform2iv = cast(typeof(glUniform2iv))load("glUniform2iv"); 758 glUniform3iv = cast(typeof(glUniform3iv))load("glUniform3iv"); 759 glUniform4iv = cast(typeof(glUniform4iv))load("glUniform4iv"); 760 glUniformMatrix2fv = cast(typeof(glUniformMatrix2fv))load("glUniformMatrix2fv"); 761 glUniformMatrix3fv = cast(typeof(glUniformMatrix3fv))load("glUniformMatrix3fv"); 762 glUniformMatrix4fv = cast(typeof(glUniformMatrix4fv))load("glUniformMatrix4fv"); 763 glValidateProgram = cast(typeof(glValidateProgram))load("glValidateProgram"); 764 glVertexAttrib1d = cast(typeof(glVertexAttrib1d))load("glVertexAttrib1d"); 765 glVertexAttrib1dv = cast(typeof(glVertexAttrib1dv))load("glVertexAttrib1dv"); 766 glVertexAttrib1f = cast(typeof(glVertexAttrib1f))load("glVertexAttrib1f"); 767 glVertexAttrib1fv = cast(typeof(glVertexAttrib1fv))load("glVertexAttrib1fv"); 768 glVertexAttrib1s = cast(typeof(glVertexAttrib1s))load("glVertexAttrib1s"); 769 glVertexAttrib1sv = cast(typeof(glVertexAttrib1sv))load("glVertexAttrib1sv"); 770 glVertexAttrib2d = cast(typeof(glVertexAttrib2d))load("glVertexAttrib2d"); 771 glVertexAttrib2dv = cast(typeof(glVertexAttrib2dv))load("glVertexAttrib2dv"); 772 glVertexAttrib2f = cast(typeof(glVertexAttrib2f))load("glVertexAttrib2f"); 773 glVertexAttrib2fv = cast(typeof(glVertexAttrib2fv))load("glVertexAttrib2fv"); 774 glVertexAttrib2s = cast(typeof(glVertexAttrib2s))load("glVertexAttrib2s"); 775 glVertexAttrib2sv = cast(typeof(glVertexAttrib2sv))load("glVertexAttrib2sv"); 776 glVertexAttrib3d = cast(typeof(glVertexAttrib3d))load("glVertexAttrib3d"); 777 glVertexAttrib3dv = cast(typeof(glVertexAttrib3dv))load("glVertexAttrib3dv"); 778 glVertexAttrib3f = cast(typeof(glVertexAttrib3f))load("glVertexAttrib3f"); 779 glVertexAttrib3fv = cast(typeof(glVertexAttrib3fv))load("glVertexAttrib3fv"); 780 glVertexAttrib3s = cast(typeof(glVertexAttrib3s))load("glVertexAttrib3s"); 781 glVertexAttrib3sv = cast(typeof(glVertexAttrib3sv))load("glVertexAttrib3sv"); 782 glVertexAttrib4Nbv = cast(typeof(glVertexAttrib4Nbv))load("glVertexAttrib4Nbv"); 783 glVertexAttrib4Niv = cast(typeof(glVertexAttrib4Niv))load("glVertexAttrib4Niv"); 784 glVertexAttrib4Nsv = cast(typeof(glVertexAttrib4Nsv))load("glVertexAttrib4Nsv"); 785 glVertexAttrib4Nub = cast(typeof(glVertexAttrib4Nub))load("glVertexAttrib4Nub"); 786 glVertexAttrib4Nubv = cast(typeof(glVertexAttrib4Nubv))load("glVertexAttrib4Nubv"); 787 glVertexAttrib4Nuiv = cast(typeof(glVertexAttrib4Nuiv))load("glVertexAttrib4Nuiv"); 788 glVertexAttrib4Nusv = cast(typeof(glVertexAttrib4Nusv))load("glVertexAttrib4Nusv"); 789 glVertexAttrib4bv = cast(typeof(glVertexAttrib4bv))load("glVertexAttrib4bv"); 790 glVertexAttrib4d = cast(typeof(glVertexAttrib4d))load("glVertexAttrib4d"); 791 glVertexAttrib4dv = cast(typeof(glVertexAttrib4dv))load("glVertexAttrib4dv"); 792 glVertexAttrib4f = cast(typeof(glVertexAttrib4f))load("glVertexAttrib4f"); 793 glVertexAttrib4fv = cast(typeof(glVertexAttrib4fv))load("glVertexAttrib4fv"); 794 glVertexAttrib4iv = cast(typeof(glVertexAttrib4iv))load("glVertexAttrib4iv"); 795 glVertexAttrib4s = cast(typeof(glVertexAttrib4s))load("glVertexAttrib4s"); 796 glVertexAttrib4sv = cast(typeof(glVertexAttrib4sv))load("glVertexAttrib4sv"); 797 glVertexAttrib4ubv = cast(typeof(glVertexAttrib4ubv))load("glVertexAttrib4ubv"); 798 glVertexAttrib4uiv = cast(typeof(glVertexAttrib4uiv))load("glVertexAttrib4uiv"); 799 glVertexAttrib4usv = cast(typeof(glVertexAttrib4usv))load("glVertexAttrib4usv"); 800 glVertexAttribPointer = cast(typeof(glVertexAttribPointer))load("glVertexAttribPointer"); 801 return; 802 } 803 804 void load_GL_VERSION_2_1(Loader load) { 805 if(!GL_VERSION_2_1) return; 806 glUniformMatrix2x3fv = cast(typeof(glUniformMatrix2x3fv))load("glUniformMatrix2x3fv"); 807 glUniformMatrix3x2fv = cast(typeof(glUniformMatrix3x2fv))load("glUniformMatrix3x2fv"); 808 glUniformMatrix2x4fv = cast(typeof(glUniformMatrix2x4fv))load("glUniformMatrix2x4fv"); 809 glUniformMatrix4x2fv = cast(typeof(glUniformMatrix4x2fv))load("glUniformMatrix4x2fv"); 810 glUniformMatrix3x4fv = cast(typeof(glUniformMatrix3x4fv))load("glUniformMatrix3x4fv"); 811 glUniformMatrix4x3fv = cast(typeof(glUniformMatrix4x3fv))load("glUniformMatrix4x3fv"); 812 return; 813 } 814 815 void load_GL_VERSION_3_0(Loader load) { 816 if(!GL_VERSION_3_0) return; 817 glColorMaski = cast(typeof(glColorMaski))load("glColorMaski"); 818 glGetBooleani_v = cast(typeof(glGetBooleani_v))load("glGetBooleani_v"); 819 glGetIntegeri_v = cast(typeof(glGetIntegeri_v))load("glGetIntegeri_v"); 820 glEnablei = cast(typeof(glEnablei))load("glEnablei"); 821 glDisablei = cast(typeof(glDisablei))load("glDisablei"); 822 glIsEnabledi = cast(typeof(glIsEnabledi))load("glIsEnabledi"); 823 glBeginTransformFeedback = cast(typeof(glBeginTransformFeedback))load("glBeginTransformFeedback"); 824 glEndTransformFeedback = cast(typeof(glEndTransformFeedback))load("glEndTransformFeedback"); 825 glBindBufferRange = cast(typeof(glBindBufferRange))load("glBindBufferRange"); 826 glBindBufferBase = cast(typeof(glBindBufferBase))load("glBindBufferBase"); 827 glTransformFeedbackVaryings = cast(typeof(glTransformFeedbackVaryings))load("glTransformFeedbackVaryings"); 828 glGetTransformFeedbackVarying = cast(typeof(glGetTransformFeedbackVarying))load("glGetTransformFeedbackVarying"); 829 glClampColor = cast(typeof(glClampColor))load("glClampColor"); 830 glBeginConditionalRender = cast(typeof(glBeginConditionalRender))load("glBeginConditionalRender"); 831 glEndConditionalRender = cast(typeof(glEndConditionalRender))load("glEndConditionalRender"); 832 glVertexAttribIPointer = cast(typeof(glVertexAttribIPointer))load("glVertexAttribIPointer"); 833 glGetVertexAttribIiv = cast(typeof(glGetVertexAttribIiv))load("glGetVertexAttribIiv"); 834 glGetVertexAttribIuiv = cast(typeof(glGetVertexAttribIuiv))load("glGetVertexAttribIuiv"); 835 glVertexAttribI1i = cast(typeof(glVertexAttribI1i))load("glVertexAttribI1i"); 836 glVertexAttribI2i = cast(typeof(glVertexAttribI2i))load("glVertexAttribI2i"); 837 glVertexAttribI3i = cast(typeof(glVertexAttribI3i))load("glVertexAttribI3i"); 838 glVertexAttribI4i = cast(typeof(glVertexAttribI4i))load("glVertexAttribI4i"); 839 glVertexAttribI1ui = cast(typeof(glVertexAttribI1ui))load("glVertexAttribI1ui"); 840 glVertexAttribI2ui = cast(typeof(glVertexAttribI2ui))load("glVertexAttribI2ui"); 841 glVertexAttribI3ui = cast(typeof(glVertexAttribI3ui))load("glVertexAttribI3ui"); 842 glVertexAttribI4ui = cast(typeof(glVertexAttribI4ui))load("glVertexAttribI4ui"); 843 glVertexAttribI1iv = cast(typeof(glVertexAttribI1iv))load("glVertexAttribI1iv"); 844 glVertexAttribI2iv = cast(typeof(glVertexAttribI2iv))load("glVertexAttribI2iv"); 845 glVertexAttribI3iv = cast(typeof(glVertexAttribI3iv))load("glVertexAttribI3iv"); 846 glVertexAttribI4iv = cast(typeof(glVertexAttribI4iv))load("glVertexAttribI4iv"); 847 glVertexAttribI1uiv = cast(typeof(glVertexAttribI1uiv))load("glVertexAttribI1uiv"); 848 glVertexAttribI2uiv = cast(typeof(glVertexAttribI2uiv))load("glVertexAttribI2uiv"); 849 glVertexAttribI3uiv = cast(typeof(glVertexAttribI3uiv))load("glVertexAttribI3uiv"); 850 glVertexAttribI4uiv = cast(typeof(glVertexAttribI4uiv))load("glVertexAttribI4uiv"); 851 glVertexAttribI4bv = cast(typeof(glVertexAttribI4bv))load("glVertexAttribI4bv"); 852 glVertexAttribI4sv = cast(typeof(glVertexAttribI4sv))load("glVertexAttribI4sv"); 853 glVertexAttribI4ubv = cast(typeof(glVertexAttribI4ubv))load("glVertexAttribI4ubv"); 854 glVertexAttribI4usv = cast(typeof(glVertexAttribI4usv))load("glVertexAttribI4usv"); 855 glGetUniformuiv = cast(typeof(glGetUniformuiv))load("glGetUniformuiv"); 856 glBindFragDataLocation = cast(typeof(glBindFragDataLocation))load("glBindFragDataLocation"); 857 glGetFragDataLocation = cast(typeof(glGetFragDataLocation))load("glGetFragDataLocation"); 858 glUniform1ui = cast(typeof(glUniform1ui))load("glUniform1ui"); 859 glUniform2ui = cast(typeof(glUniform2ui))load("glUniform2ui"); 860 glUniform3ui = cast(typeof(glUniform3ui))load("glUniform3ui"); 861 glUniform4ui = cast(typeof(glUniform4ui))load("glUniform4ui"); 862 glUniform1uiv = cast(typeof(glUniform1uiv))load("glUniform1uiv"); 863 glUniform2uiv = cast(typeof(glUniform2uiv))load("glUniform2uiv"); 864 glUniform3uiv = cast(typeof(glUniform3uiv))load("glUniform3uiv"); 865 glUniform4uiv = cast(typeof(glUniform4uiv))load("glUniform4uiv"); 866 glTexParameterIiv = cast(typeof(glTexParameterIiv))load("glTexParameterIiv"); 867 glTexParameterIuiv = cast(typeof(glTexParameterIuiv))load("glTexParameterIuiv"); 868 glGetTexParameterIiv = cast(typeof(glGetTexParameterIiv))load("glGetTexParameterIiv"); 869 glGetTexParameterIuiv = cast(typeof(glGetTexParameterIuiv))load("glGetTexParameterIuiv"); 870 glClearBufferiv = cast(typeof(glClearBufferiv))load("glClearBufferiv"); 871 glClearBufferuiv = cast(typeof(glClearBufferuiv))load("glClearBufferuiv"); 872 glClearBufferfv = cast(typeof(glClearBufferfv))load("glClearBufferfv"); 873 glClearBufferfi = cast(typeof(glClearBufferfi))load("glClearBufferfi"); 874 glGetStringi = cast(typeof(glGetStringi))load("glGetStringi"); 875 glIsRenderbuffer = cast(typeof(glIsRenderbuffer))load("glIsRenderbuffer"); 876 glBindRenderbuffer = cast(typeof(glBindRenderbuffer))load("glBindRenderbuffer"); 877 glDeleteRenderbuffers = cast(typeof(glDeleteRenderbuffers))load("glDeleteRenderbuffers"); 878 glGenRenderbuffers = cast(typeof(glGenRenderbuffers))load("glGenRenderbuffers"); 879 glRenderbufferStorage = cast(typeof(glRenderbufferStorage))load("glRenderbufferStorage"); 880 glGetRenderbufferParameteriv = cast(typeof(glGetRenderbufferParameteriv))load("glGetRenderbufferParameteriv"); 881 glIsFramebuffer = cast(typeof(glIsFramebuffer))load("glIsFramebuffer"); 882 glBindFramebuffer = cast(typeof(glBindFramebuffer))load("glBindFramebuffer"); 883 glDeleteFramebuffers = cast(typeof(glDeleteFramebuffers))load("glDeleteFramebuffers"); 884 glGenFramebuffers = cast(typeof(glGenFramebuffers))load("glGenFramebuffers"); 885 glCheckFramebufferStatus = cast(typeof(glCheckFramebufferStatus))load("glCheckFramebufferStatus"); 886 glFramebufferTexture1D = cast(typeof(glFramebufferTexture1D))load("glFramebufferTexture1D"); 887 glFramebufferTexture2D = cast(typeof(glFramebufferTexture2D))load("glFramebufferTexture2D"); 888 glFramebufferTexture3D = cast(typeof(glFramebufferTexture3D))load("glFramebufferTexture3D"); 889 glFramebufferRenderbuffer = cast(typeof(glFramebufferRenderbuffer))load("glFramebufferRenderbuffer"); 890 glGetFramebufferAttachmentParameteriv = cast(typeof(glGetFramebufferAttachmentParameteriv))load("glGetFramebufferAttachmentParameteriv"); 891 glGenerateMipmap = cast(typeof(glGenerateMipmap))load("glGenerateMipmap"); 892 glBlitFramebuffer = cast(typeof(glBlitFramebuffer))load("glBlitFramebuffer"); 893 glRenderbufferStorageMultisample = cast(typeof(glRenderbufferStorageMultisample))load("glRenderbufferStorageMultisample"); 894 glFramebufferTextureLayer = cast(typeof(glFramebufferTextureLayer))load("glFramebufferTextureLayer"); 895 glMapBufferRange = cast(typeof(glMapBufferRange))load("glMapBufferRange"); 896 glFlushMappedBufferRange = cast(typeof(glFlushMappedBufferRange))load("glFlushMappedBufferRange"); 897 glBindVertexArray = cast(typeof(glBindVertexArray))load("glBindVertexArray"); 898 glDeleteVertexArrays = cast(typeof(glDeleteVertexArrays))load("glDeleteVertexArrays"); 899 glGenVertexArrays = cast(typeof(glGenVertexArrays))load("glGenVertexArrays"); 900 glIsVertexArray = cast(typeof(glIsVertexArray))load("glIsVertexArray"); 901 return; 902 } 903 904 void load_GL_VERSION_3_1(Loader load) { 905 if(!GL_VERSION_3_1) return; 906 glDrawArraysInstanced = cast(typeof(glDrawArraysInstanced))load("glDrawArraysInstanced"); 907 glDrawElementsInstanced = cast(typeof(glDrawElementsInstanced))load("glDrawElementsInstanced"); 908 glTexBuffer = cast(typeof(glTexBuffer))load("glTexBuffer"); 909 glPrimitiveRestartIndex = cast(typeof(glPrimitiveRestartIndex))load("glPrimitiveRestartIndex"); 910 glCopyBufferSubData = cast(typeof(glCopyBufferSubData))load("glCopyBufferSubData"); 911 glGetUniformIndices = cast(typeof(glGetUniformIndices))load("glGetUniformIndices"); 912 glGetActiveUniformsiv = cast(typeof(glGetActiveUniformsiv))load("glGetActiveUniformsiv"); 913 glGetActiveUniformName = cast(typeof(glGetActiveUniformName))load("glGetActiveUniformName"); 914 glGetUniformBlockIndex = cast(typeof(glGetUniformBlockIndex))load("glGetUniformBlockIndex"); 915 glGetActiveUniformBlockiv = cast(typeof(glGetActiveUniformBlockiv))load("glGetActiveUniformBlockiv"); 916 glGetActiveUniformBlockName = cast(typeof(glGetActiveUniformBlockName))load("glGetActiveUniformBlockName"); 917 glUniformBlockBinding = cast(typeof(glUniformBlockBinding))load("glUniformBlockBinding"); 918 glBindBufferRange = cast(typeof(glBindBufferRange))load("glBindBufferRange"); 919 glBindBufferBase = cast(typeof(glBindBufferBase))load("glBindBufferBase"); 920 glGetIntegeri_v = cast(typeof(glGetIntegeri_v))load("glGetIntegeri_v"); 921 return; 922 } 923 924 void load_GL_VERSION_3_2(Loader load) { 925 if(!GL_VERSION_3_2) return; 926 glDrawElementsBaseVertex = cast(typeof(glDrawElementsBaseVertex))load("glDrawElementsBaseVertex"); 927 glDrawRangeElementsBaseVertex = cast(typeof(glDrawRangeElementsBaseVertex))load("glDrawRangeElementsBaseVertex"); 928 glDrawElementsInstancedBaseVertex = cast(typeof(glDrawElementsInstancedBaseVertex))load("glDrawElementsInstancedBaseVertex"); 929 glMultiDrawElementsBaseVertex = cast(typeof(glMultiDrawElementsBaseVertex))load("glMultiDrawElementsBaseVertex"); 930 glProvokingVertex = cast(typeof(glProvokingVertex))load("glProvokingVertex"); 931 glFenceSync = cast(typeof(glFenceSync))load("glFenceSync"); 932 glIsSync = cast(typeof(glIsSync))load("glIsSync"); 933 glDeleteSync = cast(typeof(glDeleteSync))load("glDeleteSync"); 934 glClientWaitSync = cast(typeof(glClientWaitSync))load("glClientWaitSync"); 935 glWaitSync = cast(typeof(glWaitSync))load("glWaitSync"); 936 glGetInteger64v = cast(typeof(glGetInteger64v))load("glGetInteger64v"); 937 glGetSynciv = cast(typeof(glGetSynciv))load("glGetSynciv"); 938 glGetInteger64i_v = cast(typeof(glGetInteger64i_v))load("glGetInteger64i_v"); 939 glGetBufferParameteri64v = cast(typeof(glGetBufferParameteri64v))load("glGetBufferParameteri64v"); 940 glFramebufferTexture = cast(typeof(glFramebufferTexture))load("glFramebufferTexture"); 941 glTexImage2DMultisample = cast(typeof(glTexImage2DMultisample))load("glTexImage2DMultisample"); 942 glTexImage3DMultisample = cast(typeof(glTexImage3DMultisample))load("glTexImage3DMultisample"); 943 glGetMultisamplefv = cast(typeof(glGetMultisamplefv))load("glGetMultisamplefv"); 944 glSampleMaski = cast(typeof(glSampleMaski))load("glSampleMaski"); 945 return; 946 } 947 948 void load_GL_VERSION_3_3(Loader load) { 949 if(!GL_VERSION_3_3) return; 950 glBindFragDataLocationIndexed = cast(typeof(glBindFragDataLocationIndexed))load("glBindFragDataLocationIndexed"); 951 glGetFragDataIndex = cast(typeof(glGetFragDataIndex))load("glGetFragDataIndex"); 952 glGenSamplers = cast(typeof(glGenSamplers))load("glGenSamplers"); 953 glDeleteSamplers = cast(typeof(glDeleteSamplers))load("glDeleteSamplers"); 954 glIsSampler = cast(typeof(glIsSampler))load("glIsSampler"); 955 glBindSampler = cast(typeof(glBindSampler))load("glBindSampler"); 956 glSamplerParameteri = cast(typeof(glSamplerParameteri))load("glSamplerParameteri"); 957 glSamplerParameteriv = cast(typeof(glSamplerParameteriv))load("glSamplerParameteriv"); 958 glSamplerParameterf = cast(typeof(glSamplerParameterf))load("glSamplerParameterf"); 959 glSamplerParameterfv = cast(typeof(glSamplerParameterfv))load("glSamplerParameterfv"); 960 glSamplerParameterIiv = cast(typeof(glSamplerParameterIiv))load("glSamplerParameterIiv"); 961 glSamplerParameterIuiv = cast(typeof(glSamplerParameterIuiv))load("glSamplerParameterIuiv"); 962 glGetSamplerParameteriv = cast(typeof(glGetSamplerParameteriv))load("glGetSamplerParameteriv"); 963 glGetSamplerParameterIiv = cast(typeof(glGetSamplerParameterIiv))load("glGetSamplerParameterIiv"); 964 glGetSamplerParameterfv = cast(typeof(glGetSamplerParameterfv))load("glGetSamplerParameterfv"); 965 glGetSamplerParameterIuiv = cast(typeof(glGetSamplerParameterIuiv))load("glGetSamplerParameterIuiv"); 966 glQueryCounter = cast(typeof(glQueryCounter))load("glQueryCounter"); 967 glGetQueryObjecti64v = cast(typeof(glGetQueryObjecti64v))load("glGetQueryObjecti64v"); 968 glGetQueryObjectui64v = cast(typeof(glGetQueryObjectui64v))load("glGetQueryObjectui64v"); 969 glVertexAttribDivisor = cast(typeof(glVertexAttribDivisor))load("glVertexAttribDivisor"); 970 glVertexAttribP1ui = cast(typeof(glVertexAttribP1ui))load("glVertexAttribP1ui"); 971 glVertexAttribP1uiv = cast(typeof(glVertexAttribP1uiv))load("glVertexAttribP1uiv"); 972 glVertexAttribP2ui = cast(typeof(glVertexAttribP2ui))load("glVertexAttribP2ui"); 973 glVertexAttribP2uiv = cast(typeof(glVertexAttribP2uiv))load("glVertexAttribP2uiv"); 974 glVertexAttribP3ui = cast(typeof(glVertexAttribP3ui))load("glVertexAttribP3ui"); 975 glVertexAttribP3uiv = cast(typeof(glVertexAttribP3uiv))load("glVertexAttribP3uiv"); 976 glVertexAttribP4ui = cast(typeof(glVertexAttribP4ui))load("glVertexAttribP4ui"); 977 glVertexAttribP4uiv = cast(typeof(glVertexAttribP4uiv))load("glVertexAttribP4uiv"); 978 glVertexP2ui = cast(typeof(glVertexP2ui))load("glVertexP2ui"); 979 glVertexP2uiv = cast(typeof(glVertexP2uiv))load("glVertexP2uiv"); 980 glVertexP3ui = cast(typeof(glVertexP3ui))load("glVertexP3ui"); 981 glVertexP3uiv = cast(typeof(glVertexP3uiv))load("glVertexP3uiv"); 982 glVertexP4ui = cast(typeof(glVertexP4ui))load("glVertexP4ui"); 983 glVertexP4uiv = cast(typeof(glVertexP4uiv))load("glVertexP4uiv"); 984 glTexCoordP1ui = cast(typeof(glTexCoordP1ui))load("glTexCoordP1ui"); 985 glTexCoordP1uiv = cast(typeof(glTexCoordP1uiv))load("glTexCoordP1uiv"); 986 glTexCoordP2ui = cast(typeof(glTexCoordP2ui))load("glTexCoordP2ui"); 987 glTexCoordP2uiv = cast(typeof(glTexCoordP2uiv))load("glTexCoordP2uiv"); 988 glTexCoordP3ui = cast(typeof(glTexCoordP3ui))load("glTexCoordP3ui"); 989 glTexCoordP3uiv = cast(typeof(glTexCoordP3uiv))load("glTexCoordP3uiv"); 990 glTexCoordP4ui = cast(typeof(glTexCoordP4ui))load("glTexCoordP4ui"); 991 glTexCoordP4uiv = cast(typeof(glTexCoordP4uiv))load("glTexCoordP4uiv"); 992 glMultiTexCoordP1ui = cast(typeof(glMultiTexCoordP1ui))load("glMultiTexCoordP1ui"); 993 glMultiTexCoordP1uiv = cast(typeof(glMultiTexCoordP1uiv))load("glMultiTexCoordP1uiv"); 994 glMultiTexCoordP2ui = cast(typeof(glMultiTexCoordP2ui))load("glMultiTexCoordP2ui"); 995 glMultiTexCoordP2uiv = cast(typeof(glMultiTexCoordP2uiv))load("glMultiTexCoordP2uiv"); 996 glMultiTexCoordP3ui = cast(typeof(glMultiTexCoordP3ui))load("glMultiTexCoordP3ui"); 997 glMultiTexCoordP3uiv = cast(typeof(glMultiTexCoordP3uiv))load("glMultiTexCoordP3uiv"); 998 glMultiTexCoordP4ui = cast(typeof(glMultiTexCoordP4ui))load("glMultiTexCoordP4ui"); 999 glMultiTexCoordP4uiv = cast(typeof(glMultiTexCoordP4uiv))load("glMultiTexCoordP4uiv"); 1000 glNormalP3ui = cast(typeof(glNormalP3ui))load("glNormalP3ui"); 1001 glNormalP3uiv = cast(typeof(glNormalP3uiv))load("glNormalP3uiv"); 1002 glColorP3ui = cast(typeof(glColorP3ui))load("glColorP3ui"); 1003 glColorP3uiv = cast(typeof(glColorP3uiv))load("glColorP3uiv"); 1004 glColorP4ui = cast(typeof(glColorP4ui))load("glColorP4ui"); 1005 glColorP4uiv = cast(typeof(glColorP4uiv))load("glColorP4uiv"); 1006 glSecondaryColorP3ui = cast(typeof(glSecondaryColorP3ui))load("glSecondaryColorP3ui"); 1007 glSecondaryColorP3uiv = cast(typeof(glSecondaryColorP3uiv))load("glSecondaryColorP3uiv"); 1008 return; 1009 } 1010 1011 1012 } /* private */ 1013 1014 bool gladLoadGLES2(Loader load) { 1015 glGetString = cast(typeof(glGetString))load("glGetString"); 1016 if(glGetString is null) { return false; } 1017 if(glGetString(GL_VERSION) is null) { return false; } 1018 1019 find_coreGLES2(); 1020 load_GL_ES_VERSION_2_0(load); 1021 load_GL_ES_VERSION_3_0(load); 1022 1023 find_extensionsGLES2(); 1024 return GLVersion.major != 0 || GLVersion.minor != 0; 1025 } 1026 1027 private { 1028 1029 void find_coreGLES2() { 1030 1031 // Thank you @elmindreda 1032 // https://github.com/elmindreda/greg/blob/master/templates/greg.c.in#L176 1033 // https://github.com/glfw/glfw/blob/master/src/context.c#L36 1034 int i; 1035 const(char)* glversion; 1036 const(char)*[3] prefixes = [ 1037 "OpenGL ES-CM ".ptr, 1038 "OpenGL ES-CL ".ptr, 1039 "OpenGL ES ".ptr, 1040 ]; 1041 1042 glversion = cast(const(char)*)glGetString(GL_VERSION); 1043 if (glversion is null) return; 1044 1045 foreach(prefix; prefixes) { 1046 size_t length = strlen(prefix); 1047 if (strncmp(glversion, prefix, length) == 0) { 1048 glversion += length; 1049 break; 1050 } 1051 } 1052 1053 int major = glversion[0] - '0'; 1054 int minor = glversion[2] - '0'; 1055 GLVersion.major = major; GLVersion.minor = minor; 1056 GL_ES_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; 1057 GL_ES_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; 1058 return; 1059 } 1060 1061 void find_extensionsGLES2() { 1062 return; 1063 } 1064 1065 void load_GL_ES_VERSION_2_0(Loader load) { 1066 if(!GL_ES_VERSION_2_0) return; 1067 glActiveTexture = cast(typeof(glActiveTexture))load("glActiveTexture"); 1068 glAttachShader = cast(typeof(glAttachShader))load("glAttachShader"); 1069 glBindAttribLocation = cast(typeof(glBindAttribLocation))load("glBindAttribLocation"); 1070 glBindBuffer = cast(typeof(glBindBuffer))load("glBindBuffer"); 1071 glBindFramebuffer = cast(typeof(glBindFramebuffer))load("glBindFramebuffer"); 1072 glBindRenderbuffer = cast(typeof(glBindRenderbuffer))load("glBindRenderbuffer"); 1073 glBindTexture = cast(typeof(glBindTexture))load("glBindTexture"); 1074 glBlendColor = cast(typeof(glBlendColor))load("glBlendColor"); 1075 glBlendEquation = cast(typeof(glBlendEquation))load("glBlendEquation"); 1076 glBlendEquationSeparate = cast(typeof(glBlendEquationSeparate))load("glBlendEquationSeparate"); 1077 glBlendFunc = cast(typeof(glBlendFunc))load("glBlendFunc"); 1078 glBlendFuncSeparate = cast(typeof(glBlendFuncSeparate))load("glBlendFuncSeparate"); 1079 glBufferData = cast(typeof(glBufferData))load("glBufferData"); 1080 glBufferSubData = cast(typeof(glBufferSubData))load("glBufferSubData"); 1081 glCheckFramebufferStatus = cast(typeof(glCheckFramebufferStatus))load("glCheckFramebufferStatus"); 1082 glClear = cast(typeof(glClear))load("glClear"); 1083 glClearColor = cast(typeof(glClearColor))load("glClearColor"); 1084 glClearDepthf = cast(typeof(glClearDepthf))load("glClearDepthf"); 1085 glClearStencil = cast(typeof(glClearStencil))load("glClearStencil"); 1086 glColorMask = cast(typeof(glColorMask))load("glColorMask"); 1087 glCompileShader = cast(typeof(glCompileShader))load("glCompileShader"); 1088 glCompressedTexImage2D = cast(typeof(glCompressedTexImage2D))load("glCompressedTexImage2D"); 1089 glCompressedTexSubImage2D = cast(typeof(glCompressedTexSubImage2D))load("glCompressedTexSubImage2D"); 1090 glCopyTexImage2D = cast(typeof(glCopyTexImage2D))load("glCopyTexImage2D"); 1091 glCopyTexSubImage2D = cast(typeof(glCopyTexSubImage2D))load("glCopyTexSubImage2D"); 1092 glCreateProgram = cast(typeof(glCreateProgram))load("glCreateProgram"); 1093 glCreateShader = cast(typeof(glCreateShader))load("glCreateShader"); 1094 glCullFace = cast(typeof(glCullFace))load("glCullFace"); 1095 glDeleteBuffers = cast(typeof(glDeleteBuffers))load("glDeleteBuffers"); 1096 glDeleteFramebuffers = cast(typeof(glDeleteFramebuffers))load("glDeleteFramebuffers"); 1097 glDeleteProgram = cast(typeof(glDeleteProgram))load("glDeleteProgram"); 1098 glDeleteRenderbuffers = cast(typeof(glDeleteRenderbuffers))load("glDeleteRenderbuffers"); 1099 glDeleteShader = cast(typeof(glDeleteShader))load("glDeleteShader"); 1100 glDeleteTextures = cast(typeof(glDeleteTextures))load("glDeleteTextures"); 1101 glDepthFunc = cast(typeof(glDepthFunc))load("glDepthFunc"); 1102 glDepthMask = cast(typeof(glDepthMask))load("glDepthMask"); 1103 glDepthRangef = cast(typeof(glDepthRangef))load("glDepthRangef"); 1104 glDetachShader = cast(typeof(glDetachShader))load("glDetachShader"); 1105 glDisable = cast(typeof(glDisable))load("glDisable"); 1106 glDisableVertexAttribArray = cast(typeof(glDisableVertexAttribArray))load("glDisableVertexAttribArray"); 1107 glDrawArrays = cast(typeof(glDrawArrays))load("glDrawArrays"); 1108 glDrawElements = cast(typeof(glDrawElements))load("glDrawElements"); 1109 glEnable = cast(typeof(glEnable))load("glEnable"); 1110 glEnableVertexAttribArray = cast(typeof(glEnableVertexAttribArray))load("glEnableVertexAttribArray"); 1111 glFinish = cast(typeof(glFinish))load("glFinish"); 1112 glFlush = cast(typeof(glFlush))load("glFlush"); 1113 glFramebufferRenderbuffer = cast(typeof(glFramebufferRenderbuffer))load("glFramebufferRenderbuffer"); 1114 glFramebufferTexture2D = cast(typeof(glFramebufferTexture2D))load("glFramebufferTexture2D"); 1115 glFrontFace = cast(typeof(glFrontFace))load("glFrontFace"); 1116 glGenBuffers = cast(typeof(glGenBuffers))load("glGenBuffers"); 1117 glGenerateMipmap = cast(typeof(glGenerateMipmap))load("glGenerateMipmap"); 1118 glGenFramebuffers = cast(typeof(glGenFramebuffers))load("glGenFramebuffers"); 1119 glGenRenderbuffers = cast(typeof(glGenRenderbuffers))load("glGenRenderbuffers"); 1120 glGenTextures = cast(typeof(glGenTextures))load("glGenTextures"); 1121 glGetActiveAttrib = cast(typeof(glGetActiveAttrib))load("glGetActiveAttrib"); 1122 glGetActiveUniform = cast(typeof(glGetActiveUniform))load("glGetActiveUniform"); 1123 glGetAttachedShaders = cast(typeof(glGetAttachedShaders))load("glGetAttachedShaders"); 1124 glGetAttribLocation = cast(typeof(glGetAttribLocation))load("glGetAttribLocation"); 1125 glGetBooleanv = cast(typeof(glGetBooleanv))load("glGetBooleanv"); 1126 glGetBufferParameteriv = cast(typeof(glGetBufferParameteriv))load("glGetBufferParameteriv"); 1127 glGetError = cast(typeof(glGetError))load("glGetError"); 1128 glGetFloatv = cast(typeof(glGetFloatv))load("glGetFloatv"); 1129 glGetFramebufferAttachmentParameteriv = cast(typeof(glGetFramebufferAttachmentParameteriv))load("glGetFramebufferAttachmentParameteriv"); 1130 glGetIntegerv = cast(typeof(glGetIntegerv))load("glGetIntegerv"); 1131 glGetProgramiv = cast(typeof(glGetProgramiv))load("glGetProgramiv"); 1132 glGetProgramInfoLog = cast(typeof(glGetProgramInfoLog))load("glGetProgramInfoLog"); 1133 glGetRenderbufferParameteriv = cast(typeof(glGetRenderbufferParameteriv))load("glGetRenderbufferParameteriv"); 1134 glGetShaderiv = cast(typeof(glGetShaderiv))load("glGetShaderiv"); 1135 glGetShaderInfoLog = cast(typeof(glGetShaderInfoLog))load("glGetShaderInfoLog"); 1136 glGetShaderPrecisionFormat = cast(typeof(glGetShaderPrecisionFormat))load("glGetShaderPrecisionFormat"); 1137 glGetShaderSource = cast(typeof(glGetShaderSource))load("glGetShaderSource"); 1138 glGetString = cast(typeof(glGetString))load("glGetString"); 1139 glGetTexParameterfv = cast(typeof(glGetTexParameterfv))load("glGetTexParameterfv"); 1140 glGetTexParameteriv = cast(typeof(glGetTexParameteriv))load("glGetTexParameteriv"); 1141 glGetUniformfv = cast(typeof(glGetUniformfv))load("glGetUniformfv"); 1142 glGetUniformiv = cast(typeof(glGetUniformiv))load("glGetUniformiv"); 1143 glGetUniformLocation = cast(typeof(glGetUniformLocation))load("glGetUniformLocation"); 1144 glGetVertexAttribfv = cast(typeof(glGetVertexAttribfv))load("glGetVertexAttribfv"); 1145 glGetVertexAttribiv = cast(typeof(glGetVertexAttribiv))load("glGetVertexAttribiv"); 1146 glGetVertexAttribPointerv = cast(typeof(glGetVertexAttribPointerv))load("glGetVertexAttribPointerv"); 1147 glHint = cast(typeof(glHint))load("glHint"); 1148 glIsBuffer = cast(typeof(glIsBuffer))load("glIsBuffer"); 1149 glIsEnabled = cast(typeof(glIsEnabled))load("glIsEnabled"); 1150 glIsFramebuffer = cast(typeof(glIsFramebuffer))load("glIsFramebuffer"); 1151 glIsProgram = cast(typeof(glIsProgram))load("glIsProgram"); 1152 glIsRenderbuffer = cast(typeof(glIsRenderbuffer))load("glIsRenderbuffer"); 1153 glIsShader = cast(typeof(glIsShader))load("glIsShader"); 1154 glIsTexture = cast(typeof(glIsTexture))load("glIsTexture"); 1155 glLineWidth = cast(typeof(glLineWidth))load("glLineWidth"); 1156 glLinkProgram = cast(typeof(glLinkProgram))load("glLinkProgram"); 1157 glPixelStorei = cast(typeof(glPixelStorei))load("glPixelStorei"); 1158 glPolygonOffset = cast(typeof(glPolygonOffset))load("glPolygonOffset"); 1159 glReadPixels = cast(typeof(glReadPixels))load("glReadPixels"); 1160 glReleaseShaderCompiler = cast(typeof(glReleaseShaderCompiler))load("glReleaseShaderCompiler"); 1161 glRenderbufferStorage = cast(typeof(glRenderbufferStorage))load("glRenderbufferStorage"); 1162 glSampleCoverage = cast(typeof(glSampleCoverage))load("glSampleCoverage"); 1163 glScissor = cast(typeof(glScissor))load("glScissor"); 1164 glShaderBinary = cast(typeof(glShaderBinary))load("glShaderBinary"); 1165 glShaderSource = cast(typeof(glShaderSource))load("glShaderSource"); 1166 glStencilFunc = cast(typeof(glStencilFunc))load("glStencilFunc"); 1167 glStencilFuncSeparate = cast(typeof(glStencilFuncSeparate))load("glStencilFuncSeparate"); 1168 glStencilMask = cast(typeof(glStencilMask))load("glStencilMask"); 1169 glStencilMaskSeparate = cast(typeof(glStencilMaskSeparate))load("glStencilMaskSeparate"); 1170 glStencilOp = cast(typeof(glStencilOp))load("glStencilOp"); 1171 glStencilOpSeparate = cast(typeof(glStencilOpSeparate))load("glStencilOpSeparate"); 1172 glTexImage2D = cast(typeof(glTexImage2D))load("glTexImage2D"); 1173 glTexParameterf = cast(typeof(glTexParameterf))load("glTexParameterf"); 1174 glTexParameterfv = cast(typeof(glTexParameterfv))load("glTexParameterfv"); 1175 glTexParameteri = cast(typeof(glTexParameteri))load("glTexParameteri"); 1176 glTexParameteriv = cast(typeof(glTexParameteriv))load("glTexParameteriv"); 1177 glTexSubImage2D = cast(typeof(glTexSubImage2D))load("glTexSubImage2D"); 1178 glUniform1f = cast(typeof(glUniform1f))load("glUniform1f"); 1179 glUniform1fv = cast(typeof(glUniform1fv))load("glUniform1fv"); 1180 glUniform1i = cast(typeof(glUniform1i))load("glUniform1i"); 1181 glUniform1iv = cast(typeof(glUniform1iv))load("glUniform1iv"); 1182 glUniform2f = cast(typeof(glUniform2f))load("glUniform2f"); 1183 glUniform2fv = cast(typeof(glUniform2fv))load("glUniform2fv"); 1184 glUniform2i = cast(typeof(glUniform2i))load("glUniform2i"); 1185 glUniform2iv = cast(typeof(glUniform2iv))load("glUniform2iv"); 1186 glUniform3f = cast(typeof(glUniform3f))load("glUniform3f"); 1187 glUniform3fv = cast(typeof(glUniform3fv))load("glUniform3fv"); 1188 glUniform3i = cast(typeof(glUniform3i))load("glUniform3i"); 1189 glUniform3iv = cast(typeof(glUniform3iv))load("glUniform3iv"); 1190 glUniform4f = cast(typeof(glUniform4f))load("glUniform4f"); 1191 glUniform4fv = cast(typeof(glUniform4fv))load("glUniform4fv"); 1192 glUniform4i = cast(typeof(glUniform4i))load("glUniform4i"); 1193 glUniform4iv = cast(typeof(glUniform4iv))load("glUniform4iv"); 1194 glUniformMatrix2fv = cast(typeof(glUniformMatrix2fv))load("glUniformMatrix2fv"); 1195 glUniformMatrix3fv = cast(typeof(glUniformMatrix3fv))load("glUniformMatrix3fv"); 1196 glUniformMatrix4fv = cast(typeof(glUniformMatrix4fv))load("glUniformMatrix4fv"); 1197 glUseProgram = cast(typeof(glUseProgram))load("glUseProgram"); 1198 glValidateProgram = cast(typeof(glValidateProgram))load("glValidateProgram"); 1199 glVertexAttrib1f = cast(typeof(glVertexAttrib1f))load("glVertexAttrib1f"); 1200 glVertexAttrib1fv = cast(typeof(glVertexAttrib1fv))load("glVertexAttrib1fv"); 1201 glVertexAttrib2f = cast(typeof(glVertexAttrib2f))load("glVertexAttrib2f"); 1202 glVertexAttrib2fv = cast(typeof(glVertexAttrib2fv))load("glVertexAttrib2fv"); 1203 glVertexAttrib3f = cast(typeof(glVertexAttrib3f))load("glVertexAttrib3f"); 1204 glVertexAttrib3fv = cast(typeof(glVertexAttrib3fv))load("glVertexAttrib3fv"); 1205 glVertexAttrib4f = cast(typeof(glVertexAttrib4f))load("glVertexAttrib4f"); 1206 glVertexAttrib4fv = cast(typeof(glVertexAttrib4fv))load("glVertexAttrib4fv"); 1207 glVertexAttribPointer = cast(typeof(glVertexAttribPointer))load("glVertexAttribPointer"); 1208 glViewport = cast(typeof(glViewport))load("glViewport"); 1209 return; 1210 } 1211 1212 void load_GL_ES_VERSION_3_0(Loader load) { 1213 if(!GL_ES_VERSION_3_0) return; 1214 glReadBuffer = cast(typeof(glReadBuffer))load("glReadBuffer"); 1215 glDrawRangeElements = cast(typeof(glDrawRangeElements))load("glDrawRangeElements"); 1216 glTexImage3D = cast(typeof(glTexImage3D))load("glTexImage3D"); 1217 glTexSubImage3D = cast(typeof(glTexSubImage3D))load("glTexSubImage3D"); 1218 glCopyTexSubImage3D = cast(typeof(glCopyTexSubImage3D))load("glCopyTexSubImage3D"); 1219 glCompressedTexImage3D = cast(typeof(glCompressedTexImage3D))load("glCompressedTexImage3D"); 1220 glCompressedTexSubImage3D = cast(typeof(glCompressedTexSubImage3D))load("glCompressedTexSubImage3D"); 1221 glGenQueries = cast(typeof(glGenQueries))load("glGenQueries"); 1222 glDeleteQueries = cast(typeof(glDeleteQueries))load("glDeleteQueries"); 1223 glIsQuery = cast(typeof(glIsQuery))load("glIsQuery"); 1224 glBeginQuery = cast(typeof(glBeginQuery))load("glBeginQuery"); 1225 glEndQuery = cast(typeof(glEndQuery))load("glEndQuery"); 1226 glGetQueryiv = cast(typeof(glGetQueryiv))load("glGetQueryiv"); 1227 glGetQueryObjectuiv = cast(typeof(glGetQueryObjectuiv))load("glGetQueryObjectuiv"); 1228 glUnmapBuffer = cast(typeof(glUnmapBuffer))load("glUnmapBuffer"); 1229 glGetBufferPointerv = cast(typeof(glGetBufferPointerv))load("glGetBufferPointerv"); 1230 glDrawBuffers = cast(typeof(glDrawBuffers))load("glDrawBuffers"); 1231 glUniformMatrix2x3fv = cast(typeof(glUniformMatrix2x3fv))load("glUniformMatrix2x3fv"); 1232 glUniformMatrix3x2fv = cast(typeof(glUniformMatrix3x2fv))load("glUniformMatrix3x2fv"); 1233 glUniformMatrix2x4fv = cast(typeof(glUniformMatrix2x4fv))load("glUniformMatrix2x4fv"); 1234 glUniformMatrix4x2fv = cast(typeof(glUniformMatrix4x2fv))load("glUniformMatrix4x2fv"); 1235 glUniformMatrix3x4fv = cast(typeof(glUniformMatrix3x4fv))load("glUniformMatrix3x4fv"); 1236 glUniformMatrix4x3fv = cast(typeof(glUniformMatrix4x3fv))load("glUniformMatrix4x3fv"); 1237 glBlitFramebuffer = cast(typeof(glBlitFramebuffer))load("glBlitFramebuffer"); 1238 glRenderbufferStorageMultisample = cast(typeof(glRenderbufferStorageMultisample))load("glRenderbufferStorageMultisample"); 1239 glFramebufferTextureLayer = cast(typeof(glFramebufferTextureLayer))load("glFramebufferTextureLayer"); 1240 glMapBufferRange = cast(typeof(glMapBufferRange))load("glMapBufferRange"); 1241 glFlushMappedBufferRange = cast(typeof(glFlushMappedBufferRange))load("glFlushMappedBufferRange"); 1242 glBindVertexArray = cast(typeof(glBindVertexArray))load("glBindVertexArray"); 1243 glDeleteVertexArrays = cast(typeof(glDeleteVertexArrays))load("glDeleteVertexArrays"); 1244 glGenVertexArrays = cast(typeof(glGenVertexArrays))load("glGenVertexArrays"); 1245 glIsVertexArray = cast(typeof(glIsVertexArray))load("glIsVertexArray"); 1246 glGetIntegeri_v = cast(typeof(glGetIntegeri_v))load("glGetIntegeri_v"); 1247 glBeginTransformFeedback = cast(typeof(glBeginTransformFeedback))load("glBeginTransformFeedback"); 1248 glEndTransformFeedback = cast(typeof(glEndTransformFeedback))load("glEndTransformFeedback"); 1249 glBindBufferRange = cast(typeof(glBindBufferRange))load("glBindBufferRange"); 1250 glBindBufferBase = cast(typeof(glBindBufferBase))load("glBindBufferBase"); 1251 glTransformFeedbackVaryings = cast(typeof(glTransformFeedbackVaryings))load("glTransformFeedbackVaryings"); 1252 glGetTransformFeedbackVarying = cast(typeof(glGetTransformFeedbackVarying))load("glGetTransformFeedbackVarying"); 1253 glVertexAttribIPointer = cast(typeof(glVertexAttribIPointer))load("glVertexAttribIPointer"); 1254 glGetVertexAttribIiv = cast(typeof(glGetVertexAttribIiv))load("glGetVertexAttribIiv"); 1255 glGetVertexAttribIuiv = cast(typeof(glGetVertexAttribIuiv))load("glGetVertexAttribIuiv"); 1256 glVertexAttribI4i = cast(typeof(glVertexAttribI4i))load("glVertexAttribI4i"); 1257 glVertexAttribI4ui = cast(typeof(glVertexAttribI4ui))load("glVertexAttribI4ui"); 1258 glVertexAttribI4iv = cast(typeof(glVertexAttribI4iv))load("glVertexAttribI4iv"); 1259 glVertexAttribI4uiv = cast(typeof(glVertexAttribI4uiv))load("glVertexAttribI4uiv"); 1260 glGetUniformuiv = cast(typeof(glGetUniformuiv))load("glGetUniformuiv"); 1261 glGetFragDataLocation = cast(typeof(glGetFragDataLocation))load("glGetFragDataLocation"); 1262 glUniform1ui = cast(typeof(glUniform1ui))load("glUniform1ui"); 1263 glUniform2ui = cast(typeof(glUniform2ui))load("glUniform2ui"); 1264 glUniform3ui = cast(typeof(glUniform3ui))load("glUniform3ui"); 1265 glUniform4ui = cast(typeof(glUniform4ui))load("glUniform4ui"); 1266 glUniform1uiv = cast(typeof(glUniform1uiv))load("glUniform1uiv"); 1267 glUniform2uiv = cast(typeof(glUniform2uiv))load("glUniform2uiv"); 1268 glUniform3uiv = cast(typeof(glUniform3uiv))load("glUniform3uiv"); 1269 glUniform4uiv = cast(typeof(glUniform4uiv))load("glUniform4uiv"); 1270 glClearBufferiv = cast(typeof(glClearBufferiv))load("glClearBufferiv"); 1271 glClearBufferuiv = cast(typeof(glClearBufferuiv))load("glClearBufferuiv"); 1272 glClearBufferfv = cast(typeof(glClearBufferfv))load("glClearBufferfv"); 1273 glClearBufferfi = cast(typeof(glClearBufferfi))load("glClearBufferfi"); 1274 glGetStringi = cast(typeof(glGetStringi))load("glGetStringi"); 1275 glCopyBufferSubData = cast(typeof(glCopyBufferSubData))load("glCopyBufferSubData"); 1276 glGetUniformIndices = cast(typeof(glGetUniformIndices))load("glGetUniformIndices"); 1277 glGetActiveUniformsiv = cast(typeof(glGetActiveUniformsiv))load("glGetActiveUniformsiv"); 1278 glGetUniformBlockIndex = cast(typeof(glGetUniformBlockIndex))load("glGetUniformBlockIndex"); 1279 glGetActiveUniformBlockiv = cast(typeof(glGetActiveUniformBlockiv))load("glGetActiveUniformBlockiv"); 1280 glGetActiveUniformBlockName = cast(typeof(glGetActiveUniformBlockName))load("glGetActiveUniformBlockName"); 1281 glUniformBlockBinding = cast(typeof(glUniformBlockBinding))load("glUniformBlockBinding"); 1282 glDrawArraysInstanced = cast(typeof(glDrawArraysInstanced))load("glDrawArraysInstanced"); 1283 glDrawElementsInstanced = cast(typeof(glDrawElementsInstanced))load("glDrawElementsInstanced"); 1284 glFenceSync = cast(typeof(glFenceSync))load("glFenceSync"); 1285 glIsSync = cast(typeof(glIsSync))load("glIsSync"); 1286 glDeleteSync = cast(typeof(glDeleteSync))load("glDeleteSync"); 1287 glClientWaitSync = cast(typeof(glClientWaitSync))load("glClientWaitSync"); 1288 glWaitSync = cast(typeof(glWaitSync))load("glWaitSync"); 1289 glGetInteger64v = cast(typeof(glGetInteger64v))load("glGetInteger64v"); 1290 glGetSynciv = cast(typeof(glGetSynciv))load("glGetSynciv"); 1291 glGetInteger64i_v = cast(typeof(glGetInteger64i_v))load("glGetInteger64i_v"); 1292 glGetBufferParameteri64v = cast(typeof(glGetBufferParameteri64v))load("glGetBufferParameteri64v"); 1293 glGenSamplers = cast(typeof(glGenSamplers))load("glGenSamplers"); 1294 glDeleteSamplers = cast(typeof(glDeleteSamplers))load("glDeleteSamplers"); 1295 glIsSampler = cast(typeof(glIsSampler))load("glIsSampler"); 1296 glBindSampler = cast(typeof(glBindSampler))load("glBindSampler"); 1297 glSamplerParameteri = cast(typeof(glSamplerParameteri))load("glSamplerParameteri"); 1298 glSamplerParameteriv = cast(typeof(glSamplerParameteriv))load("glSamplerParameteriv"); 1299 glSamplerParameterf = cast(typeof(glSamplerParameterf))load("glSamplerParameterf"); 1300 glSamplerParameterfv = cast(typeof(glSamplerParameterfv))load("glSamplerParameterfv"); 1301 glGetSamplerParameteriv = cast(typeof(glGetSamplerParameteriv))load("glGetSamplerParameteriv"); 1302 glGetSamplerParameterfv = cast(typeof(glGetSamplerParameterfv))load("glGetSamplerParameterfv"); 1303 glVertexAttribDivisor = cast(typeof(glVertexAttribDivisor))load("glVertexAttribDivisor"); 1304 glBindTransformFeedback = cast(typeof(glBindTransformFeedback))load("glBindTransformFeedback"); 1305 glDeleteTransformFeedbacks = cast(typeof(glDeleteTransformFeedbacks))load("glDeleteTransformFeedbacks"); 1306 glGenTransformFeedbacks = cast(typeof(glGenTransformFeedbacks))load("glGenTransformFeedbacks"); 1307 glIsTransformFeedback = cast(typeof(glIsTransformFeedback))load("glIsTransformFeedback"); 1308 glPauseTransformFeedback = cast(typeof(glPauseTransformFeedback))load("glPauseTransformFeedback"); 1309 glResumeTransformFeedback = cast(typeof(glResumeTransformFeedback))load("glResumeTransformFeedback"); 1310 glGetProgramBinary = cast(typeof(glGetProgramBinary))load("glGetProgramBinary"); 1311 glProgramBinary = cast(typeof(glProgramBinary))load("glProgramBinary"); 1312 glProgramParameteri = cast(typeof(glProgramParameteri))load("glProgramParameteri"); 1313 glInvalidateFramebuffer = cast(typeof(glInvalidateFramebuffer))load("glInvalidateFramebuffer"); 1314 glInvalidateSubFramebuffer = cast(typeof(glInvalidateSubFramebuffer))load("glInvalidateSubFramebuffer"); 1315 glTexStorage2D = cast(typeof(glTexStorage2D))load("glTexStorage2D"); 1316 glTexStorage3D = cast(typeof(glTexStorage3D))load("glTexStorage3D"); 1317 glGetInternalformativ = cast(typeof(glGetInternalformativ))load("glGetInternalformativ"); 1318 return; 1319 } 1320 1321 1322 } /* private */ 1323