├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── README.md ├── build.bat ├── example ├── CMakeLists.txt ├── glad.c ├── glad │ ├── gl.h │ ├── khrplatform.h │ ├── vk_platform.h │ └── vulkan.h ├── glfw.h ├── linmath.h └── test.c └── generate_glfw_single_header.py /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .idea 3 | .vs 4 | cmake-build-debug/ 5 | out/ 6 | build/ 7 | generated-single-header/ 8 | generated-single-header-and-source/ -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "glfw"] 2 | path = glfw 3 | url = https://github.com/glfw/glfw 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | project(glfw-single-header) 4 | 5 | add_subdirectory(glfw) 6 | add_subdirectory(example) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # glfw-single-header 2 | A python3 script that generates a single-header and single-header+single-source version of GLFW. 3 | Currently it compiles on windows easily, here is an example with gcc: 4 | ``` 5 | gcc example/*.c -I example/ -lgdi32 6 | ``` 7 | 8 | And also MacOS, 9 | 10 | ``` 11 | export SDKROOT=$(xcrun --show-sdk-path) 12 | gcc -ObjC example/*.c -I example/ -framework Cocoa -framework IOkit 13 | ``` 14 | -------------------------------------------------------------------------------- /build.bat: -------------------------------------------------------------------------------- 1 | :: Used to build examples from the command line 2 | gcc example/*.c -I example/ -lgdi32 -------------------------------------------------------------------------------- /example/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | project(example) 4 | 5 | set(CMAKE_C_STANDARD 99) 6 | 7 | include_directories(../generated-single-header) 8 | include_directories(./) 9 | #include_directories(../generated-single-header-and-source) 10 | 11 | add_executable(test test.c glad.c) -------------------------------------------------------------------------------- /example/glad.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #ifndef GLAD_IMPL_UTIL_C_ 7 | #define GLAD_IMPL_UTIL_C_ 8 | 9 | #ifdef _MSC_VER 10 | #define GLAD_IMPL_UTIL_SSCANF sscanf_s 11 | #else 12 | #define GLAD_IMPL_UTIL_SSCANF sscanf 13 | #endif 14 | 15 | #endif /* GLAD_IMPL_UTIL_C_ */ 16 | 17 | 18 | int GLAD_GL_VERSION_1_0 = 0; 19 | int GLAD_GL_VERSION_1_1 = 0; 20 | int GLAD_GL_VERSION_1_2 = 0; 21 | int GLAD_GL_VERSION_1_3 = 0; 22 | int GLAD_GL_VERSION_1_4 = 0; 23 | int GLAD_GL_VERSION_1_5 = 0; 24 | int GLAD_GL_VERSION_2_0 = 0; 25 | int GLAD_GL_VERSION_2_1 = 0; 26 | int GLAD_GL_VERSION_3_0 = 0; 27 | int GLAD_GL_VERSION_3_1 = 0; 28 | int GLAD_GL_VERSION_3_2 = 0; 29 | int GLAD_GL_VERSION_3_3 = 0; 30 | int GLAD_GL_ARB_multisample = 0; 31 | int GLAD_GL_ARB_robustness = 0; 32 | int GLAD_GL_KHR_debug = 0; 33 | 34 | 35 | 36 | PFNGLACCUMPROC glad_glAccum = NULL; 37 | PFNGLACTIVETEXTUREPROC glad_glActiveTexture = NULL; 38 | PFNGLALPHAFUNCPROC glad_glAlphaFunc = NULL; 39 | PFNGLARETEXTURESRESIDENTPROC glad_glAreTexturesResident = NULL; 40 | PFNGLARRAYELEMENTPROC glad_glArrayElement = NULL; 41 | PFNGLATTACHSHADERPROC glad_glAttachShader = NULL; 42 | PFNGLBEGINPROC glad_glBegin = NULL; 43 | PFNGLBEGINCONDITIONALRENDERPROC glad_glBeginConditionalRender = NULL; 44 | PFNGLBEGINQUERYPROC glad_glBeginQuery = NULL; 45 | PFNGLBEGINTRANSFORMFEEDBACKPROC glad_glBeginTransformFeedback = NULL; 46 | PFNGLBINDATTRIBLOCATIONPROC glad_glBindAttribLocation = NULL; 47 | PFNGLBINDBUFFERPROC glad_glBindBuffer = NULL; 48 | PFNGLBINDBUFFERBASEPROC glad_glBindBufferBase = NULL; 49 | PFNGLBINDBUFFERRANGEPROC glad_glBindBufferRange = NULL; 50 | PFNGLBINDFRAGDATALOCATIONPROC glad_glBindFragDataLocation = NULL; 51 | PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glad_glBindFragDataLocationIndexed = NULL; 52 | PFNGLBINDFRAMEBUFFERPROC glad_glBindFramebuffer = NULL; 53 | PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL; 54 | PFNGLBINDSAMPLERPROC glad_glBindSampler = NULL; 55 | PFNGLBINDTEXTUREPROC glad_glBindTexture = NULL; 56 | PFNGLBINDVERTEXARRAYPROC glad_glBindVertexArray = NULL; 57 | PFNGLBITMAPPROC glad_glBitmap = NULL; 58 | PFNGLBLENDCOLORPROC glad_glBlendColor = NULL; 59 | PFNGLBLENDEQUATIONPROC glad_glBlendEquation = NULL; 60 | PFNGLBLENDEQUATIONSEPARATEPROC glad_glBlendEquationSeparate = NULL; 61 | PFNGLBLENDFUNCPROC glad_glBlendFunc = NULL; 62 | PFNGLBLENDFUNCSEPARATEPROC glad_glBlendFuncSeparate = NULL; 63 | PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL; 64 | PFNGLBUFFERDATAPROC glad_glBufferData = NULL; 65 | PFNGLBUFFERSUBDATAPROC glad_glBufferSubData = NULL; 66 | PFNGLCALLLISTPROC glad_glCallList = NULL; 67 | PFNGLCALLLISTSPROC glad_glCallLists = NULL; 68 | PFNGLCHECKFRAMEBUFFERSTATUSPROC glad_glCheckFramebufferStatus = NULL; 69 | PFNGLCLAMPCOLORPROC glad_glClampColor = NULL; 70 | PFNGLCLEARPROC glad_glClear = NULL; 71 | PFNGLCLEARACCUMPROC glad_glClearAccum = NULL; 72 | PFNGLCLEARBUFFERFIPROC glad_glClearBufferfi = NULL; 73 | PFNGLCLEARBUFFERFVPROC glad_glClearBufferfv = NULL; 74 | PFNGLCLEARBUFFERIVPROC glad_glClearBufferiv = NULL; 75 | PFNGLCLEARBUFFERUIVPROC glad_glClearBufferuiv = NULL; 76 | PFNGLCLEARCOLORPROC glad_glClearColor = NULL; 77 | PFNGLCLEARDEPTHPROC glad_glClearDepth = NULL; 78 | PFNGLCLEARINDEXPROC glad_glClearIndex = NULL; 79 | PFNGLCLEARSTENCILPROC glad_glClearStencil = NULL; 80 | PFNGLCLIENTACTIVETEXTUREPROC glad_glClientActiveTexture = NULL; 81 | PFNGLCLIENTWAITSYNCPROC glad_glClientWaitSync = NULL; 82 | PFNGLCLIPPLANEPROC glad_glClipPlane = NULL; 83 | PFNGLCOLOR3BPROC glad_glColor3b = NULL; 84 | PFNGLCOLOR3BVPROC glad_glColor3bv = NULL; 85 | PFNGLCOLOR3DPROC glad_glColor3d = NULL; 86 | PFNGLCOLOR3DVPROC glad_glColor3dv = NULL; 87 | PFNGLCOLOR3FPROC glad_glColor3f = NULL; 88 | PFNGLCOLOR3FVPROC glad_glColor3fv = NULL; 89 | PFNGLCOLOR3IPROC glad_glColor3i = NULL; 90 | PFNGLCOLOR3IVPROC glad_glColor3iv = NULL; 91 | PFNGLCOLOR3SPROC glad_glColor3s = NULL; 92 | PFNGLCOLOR3SVPROC glad_glColor3sv = NULL; 93 | PFNGLCOLOR3UBPROC glad_glColor3ub = NULL; 94 | PFNGLCOLOR3UBVPROC glad_glColor3ubv = NULL; 95 | PFNGLCOLOR3UIPROC glad_glColor3ui = NULL; 96 | PFNGLCOLOR3UIVPROC glad_glColor3uiv = NULL; 97 | PFNGLCOLOR3USPROC glad_glColor3us = NULL; 98 | PFNGLCOLOR3USVPROC glad_glColor3usv = NULL; 99 | PFNGLCOLOR4BPROC glad_glColor4b = NULL; 100 | PFNGLCOLOR4BVPROC glad_glColor4bv = NULL; 101 | PFNGLCOLOR4DPROC glad_glColor4d = NULL; 102 | PFNGLCOLOR4DVPROC glad_glColor4dv = NULL; 103 | PFNGLCOLOR4FPROC glad_glColor4f = NULL; 104 | PFNGLCOLOR4FVPROC glad_glColor4fv = NULL; 105 | PFNGLCOLOR4IPROC glad_glColor4i = NULL; 106 | PFNGLCOLOR4IVPROC glad_glColor4iv = NULL; 107 | PFNGLCOLOR4SPROC glad_glColor4s = NULL; 108 | PFNGLCOLOR4SVPROC glad_glColor4sv = NULL; 109 | PFNGLCOLOR4UBPROC glad_glColor4ub = NULL; 110 | PFNGLCOLOR4UBVPROC glad_glColor4ubv = NULL; 111 | PFNGLCOLOR4UIPROC glad_glColor4ui = NULL; 112 | PFNGLCOLOR4UIVPROC glad_glColor4uiv = NULL; 113 | PFNGLCOLOR4USPROC glad_glColor4us = NULL; 114 | PFNGLCOLOR4USVPROC glad_glColor4usv = NULL; 115 | PFNGLCOLORMASKPROC glad_glColorMask = NULL; 116 | PFNGLCOLORMASKIPROC glad_glColorMaski = NULL; 117 | PFNGLCOLORMATERIALPROC glad_glColorMaterial = NULL; 118 | PFNGLCOLORP3UIPROC glad_glColorP3ui = NULL; 119 | PFNGLCOLORP3UIVPROC glad_glColorP3uiv = NULL; 120 | PFNGLCOLORP4UIPROC glad_glColorP4ui = NULL; 121 | PFNGLCOLORP4UIVPROC glad_glColorP4uiv = NULL; 122 | PFNGLCOLORPOINTERPROC glad_glColorPointer = NULL; 123 | PFNGLCOMPILESHADERPROC glad_glCompileShader = NULL; 124 | PFNGLCOMPRESSEDTEXIMAGE1DPROC glad_glCompressedTexImage1D = NULL; 125 | PFNGLCOMPRESSEDTEXIMAGE2DPROC glad_glCompressedTexImage2D = NULL; 126 | PFNGLCOMPRESSEDTEXIMAGE3DPROC glad_glCompressedTexImage3D = NULL; 127 | PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glad_glCompressedTexSubImage1D = NULL; 128 | PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glad_glCompressedTexSubImage2D = NULL; 129 | PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glad_glCompressedTexSubImage3D = NULL; 130 | PFNGLCOPYBUFFERSUBDATAPROC glad_glCopyBufferSubData = NULL; 131 | PFNGLCOPYPIXELSPROC glad_glCopyPixels = NULL; 132 | PFNGLCOPYTEXIMAGE1DPROC glad_glCopyTexImage1D = NULL; 133 | PFNGLCOPYTEXIMAGE2DPROC glad_glCopyTexImage2D = NULL; 134 | PFNGLCOPYTEXSUBIMAGE1DPROC glad_glCopyTexSubImage1D = NULL; 135 | PFNGLCOPYTEXSUBIMAGE2DPROC glad_glCopyTexSubImage2D = NULL; 136 | PFNGLCOPYTEXSUBIMAGE3DPROC glad_glCopyTexSubImage3D = NULL; 137 | PFNGLCREATEPROGRAMPROC glad_glCreateProgram = NULL; 138 | PFNGLCREATESHADERPROC glad_glCreateShader = NULL; 139 | PFNGLCULLFACEPROC glad_glCullFace = NULL; 140 | PFNGLDEBUGMESSAGECALLBACKPROC glad_glDebugMessageCallback = NULL; 141 | PFNGLDEBUGMESSAGECONTROLPROC glad_glDebugMessageControl = NULL; 142 | PFNGLDEBUGMESSAGEINSERTPROC glad_glDebugMessageInsert = NULL; 143 | PFNGLDELETEBUFFERSPROC glad_glDeleteBuffers = NULL; 144 | PFNGLDELETEFRAMEBUFFERSPROC glad_glDeleteFramebuffers = NULL; 145 | PFNGLDELETELISTSPROC glad_glDeleteLists = NULL; 146 | PFNGLDELETEPROGRAMPROC glad_glDeleteProgram = NULL; 147 | PFNGLDELETEQUERIESPROC glad_glDeleteQueries = NULL; 148 | PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL; 149 | PFNGLDELETESAMPLERSPROC glad_glDeleteSamplers = NULL; 150 | PFNGLDELETESHADERPROC glad_glDeleteShader = NULL; 151 | PFNGLDELETESYNCPROC glad_glDeleteSync = NULL; 152 | PFNGLDELETETEXTURESPROC glad_glDeleteTextures = NULL; 153 | PFNGLDELETEVERTEXARRAYSPROC glad_glDeleteVertexArrays = NULL; 154 | PFNGLDEPTHFUNCPROC glad_glDepthFunc = NULL; 155 | PFNGLDEPTHMASKPROC glad_glDepthMask = NULL; 156 | PFNGLDEPTHRANGEPROC glad_glDepthRange = NULL; 157 | PFNGLDETACHSHADERPROC glad_glDetachShader = NULL; 158 | PFNGLDISABLEPROC glad_glDisable = NULL; 159 | PFNGLDISABLECLIENTSTATEPROC glad_glDisableClientState = NULL; 160 | PFNGLDISABLEVERTEXATTRIBARRAYPROC glad_glDisableVertexAttribArray = NULL; 161 | PFNGLDISABLEIPROC glad_glDisablei = NULL; 162 | PFNGLDRAWARRAYSPROC glad_glDrawArrays = NULL; 163 | PFNGLDRAWARRAYSINSTANCEDPROC glad_glDrawArraysInstanced = NULL; 164 | PFNGLDRAWBUFFERPROC glad_glDrawBuffer = NULL; 165 | PFNGLDRAWBUFFERSPROC glad_glDrawBuffers = NULL; 166 | PFNGLDRAWELEMENTSPROC glad_glDrawElements = NULL; 167 | PFNGLDRAWELEMENTSBASEVERTEXPROC glad_glDrawElementsBaseVertex = NULL; 168 | PFNGLDRAWELEMENTSINSTANCEDPROC glad_glDrawElementsInstanced = NULL; 169 | PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glad_glDrawElementsInstancedBaseVertex = NULL; 170 | PFNGLDRAWPIXELSPROC glad_glDrawPixels = NULL; 171 | PFNGLDRAWRANGEELEMENTSPROC glad_glDrawRangeElements = NULL; 172 | PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glad_glDrawRangeElementsBaseVertex = NULL; 173 | PFNGLEDGEFLAGPROC glad_glEdgeFlag = NULL; 174 | PFNGLEDGEFLAGPOINTERPROC glad_glEdgeFlagPointer = NULL; 175 | PFNGLEDGEFLAGVPROC glad_glEdgeFlagv = NULL; 176 | PFNGLENABLEPROC glad_glEnable = NULL; 177 | PFNGLENABLECLIENTSTATEPROC glad_glEnableClientState = NULL; 178 | PFNGLENABLEVERTEXATTRIBARRAYPROC glad_glEnableVertexAttribArray = NULL; 179 | PFNGLENABLEIPROC glad_glEnablei = NULL; 180 | PFNGLENDPROC glad_glEnd = NULL; 181 | PFNGLENDCONDITIONALRENDERPROC glad_glEndConditionalRender = NULL; 182 | PFNGLENDLISTPROC glad_glEndList = NULL; 183 | PFNGLENDQUERYPROC glad_glEndQuery = NULL; 184 | PFNGLENDTRANSFORMFEEDBACKPROC glad_glEndTransformFeedback = NULL; 185 | PFNGLEVALCOORD1DPROC glad_glEvalCoord1d = NULL; 186 | PFNGLEVALCOORD1DVPROC glad_glEvalCoord1dv = NULL; 187 | PFNGLEVALCOORD1FPROC glad_glEvalCoord1f = NULL; 188 | PFNGLEVALCOORD1FVPROC glad_glEvalCoord1fv = NULL; 189 | PFNGLEVALCOORD2DPROC glad_glEvalCoord2d = NULL; 190 | PFNGLEVALCOORD2DVPROC glad_glEvalCoord2dv = NULL; 191 | PFNGLEVALCOORD2FPROC glad_glEvalCoord2f = NULL; 192 | PFNGLEVALCOORD2FVPROC glad_glEvalCoord2fv = NULL; 193 | PFNGLEVALMESH1PROC glad_glEvalMesh1 = NULL; 194 | PFNGLEVALMESH2PROC glad_glEvalMesh2 = NULL; 195 | PFNGLEVALPOINT1PROC glad_glEvalPoint1 = NULL; 196 | PFNGLEVALPOINT2PROC glad_glEvalPoint2 = NULL; 197 | PFNGLFEEDBACKBUFFERPROC glad_glFeedbackBuffer = NULL; 198 | PFNGLFENCESYNCPROC glad_glFenceSync = NULL; 199 | PFNGLFINISHPROC glad_glFinish = NULL; 200 | PFNGLFLUSHPROC glad_glFlush = NULL; 201 | PFNGLFLUSHMAPPEDBUFFERRANGEPROC glad_glFlushMappedBufferRange = NULL; 202 | PFNGLFOGCOORDPOINTERPROC glad_glFogCoordPointer = NULL; 203 | PFNGLFOGCOORDDPROC glad_glFogCoordd = NULL; 204 | PFNGLFOGCOORDDVPROC glad_glFogCoorddv = NULL; 205 | PFNGLFOGCOORDFPROC glad_glFogCoordf = NULL; 206 | PFNGLFOGCOORDFVPROC glad_glFogCoordfv = NULL; 207 | PFNGLFOGFPROC glad_glFogf = NULL; 208 | PFNGLFOGFVPROC glad_glFogfv = NULL; 209 | PFNGLFOGIPROC glad_glFogi = NULL; 210 | PFNGLFOGIVPROC glad_glFogiv = NULL; 211 | PFNGLFRAMEBUFFERRENDERBUFFERPROC glad_glFramebufferRenderbuffer = NULL; 212 | PFNGLFRAMEBUFFERTEXTUREPROC glad_glFramebufferTexture = NULL; 213 | PFNGLFRAMEBUFFERTEXTURE1DPROC glad_glFramebufferTexture1D = NULL; 214 | PFNGLFRAMEBUFFERTEXTURE2DPROC glad_glFramebufferTexture2D = NULL; 215 | PFNGLFRAMEBUFFERTEXTURE3DPROC glad_glFramebufferTexture3D = NULL; 216 | PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL; 217 | PFNGLFRONTFACEPROC glad_glFrontFace = NULL; 218 | PFNGLFRUSTUMPROC glad_glFrustum = NULL; 219 | PFNGLGENBUFFERSPROC glad_glGenBuffers = NULL; 220 | PFNGLGENFRAMEBUFFERSPROC glad_glGenFramebuffers = NULL; 221 | PFNGLGENLISTSPROC glad_glGenLists = NULL; 222 | PFNGLGENQUERIESPROC glad_glGenQueries = NULL; 223 | PFNGLGENRENDERBUFFERSPROC glad_glGenRenderbuffers = NULL; 224 | PFNGLGENSAMPLERSPROC glad_glGenSamplers = NULL; 225 | PFNGLGENTEXTURESPROC glad_glGenTextures = NULL; 226 | PFNGLGENVERTEXARRAYSPROC glad_glGenVertexArrays = NULL; 227 | PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL; 228 | PFNGLGETACTIVEATTRIBPROC glad_glGetActiveAttrib = NULL; 229 | PFNGLGETACTIVEUNIFORMPROC glad_glGetActiveUniform = NULL; 230 | PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glad_glGetActiveUniformBlockName = NULL; 231 | PFNGLGETACTIVEUNIFORMBLOCKIVPROC glad_glGetActiveUniformBlockiv = NULL; 232 | PFNGLGETACTIVEUNIFORMNAMEPROC glad_glGetActiveUniformName = NULL; 233 | PFNGLGETACTIVEUNIFORMSIVPROC glad_glGetActiveUniformsiv = NULL; 234 | PFNGLGETATTACHEDSHADERSPROC glad_glGetAttachedShaders = NULL; 235 | PFNGLGETATTRIBLOCATIONPROC glad_glGetAttribLocation = NULL; 236 | PFNGLGETBOOLEANI_VPROC glad_glGetBooleani_v = NULL; 237 | PFNGLGETBOOLEANVPROC glad_glGetBooleanv = NULL; 238 | PFNGLGETBUFFERPARAMETERI64VPROC glad_glGetBufferParameteri64v = NULL; 239 | PFNGLGETBUFFERPARAMETERIVPROC glad_glGetBufferParameteriv = NULL; 240 | PFNGLGETBUFFERPOINTERVPROC glad_glGetBufferPointerv = NULL; 241 | PFNGLGETBUFFERSUBDATAPROC glad_glGetBufferSubData = NULL; 242 | PFNGLGETCLIPPLANEPROC glad_glGetClipPlane = NULL; 243 | PFNGLGETCOMPRESSEDTEXIMAGEPROC glad_glGetCompressedTexImage = NULL; 244 | PFNGLGETDEBUGMESSAGELOGPROC glad_glGetDebugMessageLog = NULL; 245 | PFNGLGETDOUBLEVPROC glad_glGetDoublev = NULL; 246 | PFNGLGETERRORPROC glad_glGetError = NULL; 247 | PFNGLGETFLOATVPROC glad_glGetFloatv = NULL; 248 | PFNGLGETFRAGDATAINDEXPROC glad_glGetFragDataIndex = NULL; 249 | PFNGLGETFRAGDATALOCATIONPROC glad_glGetFragDataLocation = NULL; 250 | PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glad_glGetFramebufferAttachmentParameteriv = NULL; 251 | PFNGLGETGRAPHICSRESETSTATUSARBPROC glad_glGetGraphicsResetStatusARB = NULL; 252 | PFNGLGETINTEGER64I_VPROC glad_glGetInteger64i_v = NULL; 253 | PFNGLGETINTEGER64VPROC glad_glGetInteger64v = NULL; 254 | PFNGLGETINTEGERI_VPROC glad_glGetIntegeri_v = NULL; 255 | PFNGLGETINTEGERVPROC glad_glGetIntegerv = NULL; 256 | PFNGLGETLIGHTFVPROC glad_glGetLightfv = NULL; 257 | PFNGLGETLIGHTIVPROC glad_glGetLightiv = NULL; 258 | PFNGLGETMAPDVPROC glad_glGetMapdv = NULL; 259 | PFNGLGETMAPFVPROC glad_glGetMapfv = NULL; 260 | PFNGLGETMAPIVPROC glad_glGetMapiv = NULL; 261 | PFNGLGETMATERIALFVPROC glad_glGetMaterialfv = NULL; 262 | PFNGLGETMATERIALIVPROC glad_glGetMaterialiv = NULL; 263 | PFNGLGETMULTISAMPLEFVPROC glad_glGetMultisamplefv = NULL; 264 | PFNGLGETOBJECTLABELPROC glad_glGetObjectLabel = NULL; 265 | PFNGLGETOBJECTPTRLABELPROC glad_glGetObjectPtrLabel = NULL; 266 | PFNGLGETPIXELMAPFVPROC glad_glGetPixelMapfv = NULL; 267 | PFNGLGETPIXELMAPUIVPROC glad_glGetPixelMapuiv = NULL; 268 | PFNGLGETPIXELMAPUSVPROC glad_glGetPixelMapusv = NULL; 269 | PFNGLGETPOINTERVPROC glad_glGetPointerv = NULL; 270 | PFNGLGETPOLYGONSTIPPLEPROC glad_glGetPolygonStipple = NULL; 271 | PFNGLGETPROGRAMINFOLOGPROC glad_glGetProgramInfoLog = NULL; 272 | PFNGLGETPROGRAMIVPROC glad_glGetProgramiv = NULL; 273 | PFNGLGETQUERYOBJECTI64VPROC glad_glGetQueryObjecti64v = NULL; 274 | PFNGLGETQUERYOBJECTIVPROC glad_glGetQueryObjectiv = NULL; 275 | PFNGLGETQUERYOBJECTUI64VPROC glad_glGetQueryObjectui64v = NULL; 276 | PFNGLGETQUERYOBJECTUIVPROC glad_glGetQueryObjectuiv = NULL; 277 | PFNGLGETQUERYIVPROC glad_glGetQueryiv = NULL; 278 | PFNGLGETRENDERBUFFERPARAMETERIVPROC glad_glGetRenderbufferParameteriv = NULL; 279 | PFNGLGETSAMPLERPARAMETERIIVPROC glad_glGetSamplerParameterIiv = NULL; 280 | PFNGLGETSAMPLERPARAMETERIUIVPROC glad_glGetSamplerParameterIuiv = NULL; 281 | PFNGLGETSAMPLERPARAMETERFVPROC glad_glGetSamplerParameterfv = NULL; 282 | PFNGLGETSAMPLERPARAMETERIVPROC glad_glGetSamplerParameteriv = NULL; 283 | PFNGLGETSHADERINFOLOGPROC glad_glGetShaderInfoLog = NULL; 284 | PFNGLGETSHADERSOURCEPROC glad_glGetShaderSource = NULL; 285 | PFNGLGETSHADERIVPROC glad_glGetShaderiv = NULL; 286 | PFNGLGETSTRINGPROC glad_glGetString = NULL; 287 | PFNGLGETSTRINGIPROC glad_glGetStringi = NULL; 288 | PFNGLGETSYNCIVPROC glad_glGetSynciv = NULL; 289 | PFNGLGETTEXENVFVPROC glad_glGetTexEnvfv = NULL; 290 | PFNGLGETTEXENVIVPROC glad_glGetTexEnviv = NULL; 291 | PFNGLGETTEXGENDVPROC glad_glGetTexGendv = NULL; 292 | PFNGLGETTEXGENFVPROC glad_glGetTexGenfv = NULL; 293 | PFNGLGETTEXGENIVPROC glad_glGetTexGeniv = NULL; 294 | PFNGLGETTEXIMAGEPROC glad_glGetTexImage = NULL; 295 | PFNGLGETTEXLEVELPARAMETERFVPROC glad_glGetTexLevelParameterfv = NULL; 296 | PFNGLGETTEXLEVELPARAMETERIVPROC glad_glGetTexLevelParameteriv = NULL; 297 | PFNGLGETTEXPARAMETERIIVPROC glad_glGetTexParameterIiv = NULL; 298 | PFNGLGETTEXPARAMETERIUIVPROC glad_glGetTexParameterIuiv = NULL; 299 | PFNGLGETTEXPARAMETERFVPROC glad_glGetTexParameterfv = NULL; 300 | PFNGLGETTEXPARAMETERIVPROC glad_glGetTexParameteriv = NULL; 301 | PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glad_glGetTransformFeedbackVarying = NULL; 302 | PFNGLGETUNIFORMBLOCKINDEXPROC glad_glGetUniformBlockIndex = NULL; 303 | PFNGLGETUNIFORMINDICESPROC glad_glGetUniformIndices = NULL; 304 | PFNGLGETUNIFORMLOCATIONPROC glad_glGetUniformLocation = NULL; 305 | PFNGLGETUNIFORMFVPROC glad_glGetUniformfv = NULL; 306 | PFNGLGETUNIFORMIVPROC glad_glGetUniformiv = NULL; 307 | PFNGLGETUNIFORMUIVPROC glad_glGetUniformuiv = NULL; 308 | PFNGLGETVERTEXATTRIBIIVPROC glad_glGetVertexAttribIiv = NULL; 309 | PFNGLGETVERTEXATTRIBIUIVPROC glad_glGetVertexAttribIuiv = NULL; 310 | PFNGLGETVERTEXATTRIBPOINTERVPROC glad_glGetVertexAttribPointerv = NULL; 311 | PFNGLGETVERTEXATTRIBDVPROC glad_glGetVertexAttribdv = NULL; 312 | PFNGLGETVERTEXATTRIBFVPROC glad_glGetVertexAttribfv = NULL; 313 | PFNGLGETVERTEXATTRIBIVPROC glad_glGetVertexAttribiv = NULL; 314 | PFNGLGETNCOLORTABLEARBPROC glad_glGetnColorTableARB = NULL; 315 | PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC glad_glGetnCompressedTexImageARB = NULL; 316 | PFNGLGETNCONVOLUTIONFILTERARBPROC glad_glGetnConvolutionFilterARB = NULL; 317 | PFNGLGETNHISTOGRAMARBPROC glad_glGetnHistogramARB = NULL; 318 | PFNGLGETNMAPDVARBPROC glad_glGetnMapdvARB = NULL; 319 | PFNGLGETNMAPFVARBPROC glad_glGetnMapfvARB = NULL; 320 | PFNGLGETNMAPIVARBPROC glad_glGetnMapivARB = NULL; 321 | PFNGLGETNMINMAXARBPROC glad_glGetnMinmaxARB = NULL; 322 | PFNGLGETNPIXELMAPFVARBPROC glad_glGetnPixelMapfvARB = NULL; 323 | PFNGLGETNPIXELMAPUIVARBPROC glad_glGetnPixelMapuivARB = NULL; 324 | PFNGLGETNPIXELMAPUSVARBPROC glad_glGetnPixelMapusvARB = NULL; 325 | PFNGLGETNPOLYGONSTIPPLEARBPROC glad_glGetnPolygonStippleARB = NULL; 326 | PFNGLGETNSEPARABLEFILTERARBPROC glad_glGetnSeparableFilterARB = NULL; 327 | PFNGLGETNTEXIMAGEARBPROC glad_glGetnTexImageARB = NULL; 328 | PFNGLGETNUNIFORMDVARBPROC glad_glGetnUniformdvARB = NULL; 329 | PFNGLGETNUNIFORMFVARBPROC glad_glGetnUniformfvARB = NULL; 330 | PFNGLGETNUNIFORMIVARBPROC glad_glGetnUniformivARB = NULL; 331 | PFNGLGETNUNIFORMUIVARBPROC glad_glGetnUniformuivARB = NULL; 332 | PFNGLHINTPROC glad_glHint = NULL; 333 | PFNGLINDEXMASKPROC glad_glIndexMask = NULL; 334 | PFNGLINDEXPOINTERPROC glad_glIndexPointer = NULL; 335 | PFNGLINDEXDPROC glad_glIndexd = NULL; 336 | PFNGLINDEXDVPROC glad_glIndexdv = NULL; 337 | PFNGLINDEXFPROC glad_glIndexf = NULL; 338 | PFNGLINDEXFVPROC glad_glIndexfv = NULL; 339 | PFNGLINDEXIPROC glad_glIndexi = NULL; 340 | PFNGLINDEXIVPROC glad_glIndexiv = NULL; 341 | PFNGLINDEXSPROC glad_glIndexs = NULL; 342 | PFNGLINDEXSVPROC glad_glIndexsv = NULL; 343 | PFNGLINDEXUBPROC glad_glIndexub = NULL; 344 | PFNGLINDEXUBVPROC glad_glIndexubv = NULL; 345 | PFNGLINITNAMESPROC glad_glInitNames = NULL; 346 | PFNGLINTERLEAVEDARRAYSPROC glad_glInterleavedArrays = NULL; 347 | PFNGLISBUFFERPROC glad_glIsBuffer = NULL; 348 | PFNGLISENABLEDPROC glad_glIsEnabled = NULL; 349 | PFNGLISENABLEDIPROC glad_glIsEnabledi = NULL; 350 | PFNGLISFRAMEBUFFERPROC glad_glIsFramebuffer = NULL; 351 | PFNGLISLISTPROC glad_glIsList = NULL; 352 | PFNGLISPROGRAMPROC glad_glIsProgram = NULL; 353 | PFNGLISQUERYPROC glad_glIsQuery = NULL; 354 | PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL; 355 | PFNGLISSAMPLERPROC glad_glIsSampler = NULL; 356 | PFNGLISSHADERPROC glad_glIsShader = NULL; 357 | PFNGLISSYNCPROC glad_glIsSync = NULL; 358 | PFNGLISTEXTUREPROC glad_glIsTexture = NULL; 359 | PFNGLISVERTEXARRAYPROC glad_glIsVertexArray = NULL; 360 | PFNGLLIGHTMODELFPROC glad_glLightModelf = NULL; 361 | PFNGLLIGHTMODELFVPROC glad_glLightModelfv = NULL; 362 | PFNGLLIGHTMODELIPROC glad_glLightModeli = NULL; 363 | PFNGLLIGHTMODELIVPROC glad_glLightModeliv = NULL; 364 | PFNGLLIGHTFPROC glad_glLightf = NULL; 365 | PFNGLLIGHTFVPROC glad_glLightfv = NULL; 366 | PFNGLLIGHTIPROC glad_glLighti = NULL; 367 | PFNGLLIGHTIVPROC glad_glLightiv = NULL; 368 | PFNGLLINESTIPPLEPROC glad_glLineStipple = NULL; 369 | PFNGLLINEWIDTHPROC glad_glLineWidth = NULL; 370 | PFNGLLINKPROGRAMPROC glad_glLinkProgram = NULL; 371 | PFNGLLISTBASEPROC glad_glListBase = NULL; 372 | PFNGLLOADIDENTITYPROC glad_glLoadIdentity = NULL; 373 | PFNGLLOADMATRIXDPROC glad_glLoadMatrixd = NULL; 374 | PFNGLLOADMATRIXFPROC glad_glLoadMatrixf = NULL; 375 | PFNGLLOADNAMEPROC glad_glLoadName = NULL; 376 | PFNGLLOADTRANSPOSEMATRIXDPROC glad_glLoadTransposeMatrixd = NULL; 377 | PFNGLLOADTRANSPOSEMATRIXFPROC glad_glLoadTransposeMatrixf = NULL; 378 | PFNGLLOGICOPPROC glad_glLogicOp = NULL; 379 | PFNGLMAP1DPROC glad_glMap1d = NULL; 380 | PFNGLMAP1FPROC glad_glMap1f = NULL; 381 | PFNGLMAP2DPROC glad_glMap2d = NULL; 382 | PFNGLMAP2FPROC glad_glMap2f = NULL; 383 | PFNGLMAPBUFFERPROC glad_glMapBuffer = NULL; 384 | PFNGLMAPBUFFERRANGEPROC glad_glMapBufferRange = NULL; 385 | PFNGLMAPGRID1DPROC glad_glMapGrid1d = NULL; 386 | PFNGLMAPGRID1FPROC glad_glMapGrid1f = NULL; 387 | PFNGLMAPGRID2DPROC glad_glMapGrid2d = NULL; 388 | PFNGLMAPGRID2FPROC glad_glMapGrid2f = NULL; 389 | PFNGLMATERIALFPROC glad_glMaterialf = NULL; 390 | PFNGLMATERIALFVPROC glad_glMaterialfv = NULL; 391 | PFNGLMATERIALIPROC glad_glMateriali = NULL; 392 | PFNGLMATERIALIVPROC glad_glMaterialiv = NULL; 393 | PFNGLMATRIXMODEPROC glad_glMatrixMode = NULL; 394 | PFNGLMULTMATRIXDPROC glad_glMultMatrixd = NULL; 395 | PFNGLMULTMATRIXFPROC glad_glMultMatrixf = NULL; 396 | PFNGLMULTTRANSPOSEMATRIXDPROC glad_glMultTransposeMatrixd = NULL; 397 | PFNGLMULTTRANSPOSEMATRIXFPROC glad_glMultTransposeMatrixf = NULL; 398 | PFNGLMULTIDRAWARRAYSPROC glad_glMultiDrawArrays = NULL; 399 | PFNGLMULTIDRAWELEMENTSPROC glad_glMultiDrawElements = NULL; 400 | PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glad_glMultiDrawElementsBaseVertex = NULL; 401 | PFNGLMULTITEXCOORD1DPROC glad_glMultiTexCoord1d = NULL; 402 | PFNGLMULTITEXCOORD1DVPROC glad_glMultiTexCoord1dv = NULL; 403 | PFNGLMULTITEXCOORD1FPROC glad_glMultiTexCoord1f = NULL; 404 | PFNGLMULTITEXCOORD1FVPROC glad_glMultiTexCoord1fv = NULL; 405 | PFNGLMULTITEXCOORD1IPROC glad_glMultiTexCoord1i = NULL; 406 | PFNGLMULTITEXCOORD1IVPROC glad_glMultiTexCoord1iv = NULL; 407 | PFNGLMULTITEXCOORD1SPROC glad_glMultiTexCoord1s = NULL; 408 | PFNGLMULTITEXCOORD1SVPROC glad_glMultiTexCoord1sv = NULL; 409 | PFNGLMULTITEXCOORD2DPROC glad_glMultiTexCoord2d = NULL; 410 | PFNGLMULTITEXCOORD2DVPROC glad_glMultiTexCoord2dv = NULL; 411 | PFNGLMULTITEXCOORD2FPROC glad_glMultiTexCoord2f = NULL; 412 | PFNGLMULTITEXCOORD2FVPROC glad_glMultiTexCoord2fv = NULL; 413 | PFNGLMULTITEXCOORD2IPROC glad_glMultiTexCoord2i = NULL; 414 | PFNGLMULTITEXCOORD2IVPROC glad_glMultiTexCoord2iv = NULL; 415 | PFNGLMULTITEXCOORD2SPROC glad_glMultiTexCoord2s = NULL; 416 | PFNGLMULTITEXCOORD2SVPROC glad_glMultiTexCoord2sv = NULL; 417 | PFNGLMULTITEXCOORD3DPROC glad_glMultiTexCoord3d = NULL; 418 | PFNGLMULTITEXCOORD3DVPROC glad_glMultiTexCoord3dv = NULL; 419 | PFNGLMULTITEXCOORD3FPROC glad_glMultiTexCoord3f = NULL; 420 | PFNGLMULTITEXCOORD3FVPROC glad_glMultiTexCoord3fv = NULL; 421 | PFNGLMULTITEXCOORD3IPROC glad_glMultiTexCoord3i = NULL; 422 | PFNGLMULTITEXCOORD3IVPROC glad_glMultiTexCoord3iv = NULL; 423 | PFNGLMULTITEXCOORD3SPROC glad_glMultiTexCoord3s = NULL; 424 | PFNGLMULTITEXCOORD3SVPROC glad_glMultiTexCoord3sv = NULL; 425 | PFNGLMULTITEXCOORD4DPROC glad_glMultiTexCoord4d = NULL; 426 | PFNGLMULTITEXCOORD4DVPROC glad_glMultiTexCoord4dv = NULL; 427 | PFNGLMULTITEXCOORD4FPROC glad_glMultiTexCoord4f = NULL; 428 | PFNGLMULTITEXCOORD4FVPROC glad_glMultiTexCoord4fv = NULL; 429 | PFNGLMULTITEXCOORD4IPROC glad_glMultiTexCoord4i = NULL; 430 | PFNGLMULTITEXCOORD4IVPROC glad_glMultiTexCoord4iv = NULL; 431 | PFNGLMULTITEXCOORD4SPROC glad_glMultiTexCoord4s = NULL; 432 | PFNGLMULTITEXCOORD4SVPROC glad_glMultiTexCoord4sv = NULL; 433 | PFNGLMULTITEXCOORDP1UIPROC glad_glMultiTexCoordP1ui = NULL; 434 | PFNGLMULTITEXCOORDP1UIVPROC glad_glMultiTexCoordP1uiv = NULL; 435 | PFNGLMULTITEXCOORDP2UIPROC glad_glMultiTexCoordP2ui = NULL; 436 | PFNGLMULTITEXCOORDP2UIVPROC glad_glMultiTexCoordP2uiv = NULL; 437 | PFNGLMULTITEXCOORDP3UIPROC glad_glMultiTexCoordP3ui = NULL; 438 | PFNGLMULTITEXCOORDP3UIVPROC glad_glMultiTexCoordP3uiv = NULL; 439 | PFNGLMULTITEXCOORDP4UIPROC glad_glMultiTexCoordP4ui = NULL; 440 | PFNGLMULTITEXCOORDP4UIVPROC glad_glMultiTexCoordP4uiv = NULL; 441 | PFNGLNEWLISTPROC glad_glNewList = NULL; 442 | PFNGLNORMAL3BPROC glad_glNormal3b = NULL; 443 | PFNGLNORMAL3BVPROC glad_glNormal3bv = NULL; 444 | PFNGLNORMAL3DPROC glad_glNormal3d = NULL; 445 | PFNGLNORMAL3DVPROC glad_glNormal3dv = NULL; 446 | PFNGLNORMAL3FPROC glad_glNormal3f = NULL; 447 | PFNGLNORMAL3FVPROC glad_glNormal3fv = NULL; 448 | PFNGLNORMAL3IPROC glad_glNormal3i = NULL; 449 | PFNGLNORMAL3IVPROC glad_glNormal3iv = NULL; 450 | PFNGLNORMAL3SPROC glad_glNormal3s = NULL; 451 | PFNGLNORMAL3SVPROC glad_glNormal3sv = NULL; 452 | PFNGLNORMALP3UIPROC glad_glNormalP3ui = NULL; 453 | PFNGLNORMALP3UIVPROC glad_glNormalP3uiv = NULL; 454 | PFNGLNORMALPOINTERPROC glad_glNormalPointer = NULL; 455 | PFNGLOBJECTLABELPROC glad_glObjectLabel = NULL; 456 | PFNGLOBJECTPTRLABELPROC glad_glObjectPtrLabel = NULL; 457 | PFNGLORTHOPROC glad_glOrtho = NULL; 458 | PFNGLPASSTHROUGHPROC glad_glPassThrough = NULL; 459 | PFNGLPIXELMAPFVPROC glad_glPixelMapfv = NULL; 460 | PFNGLPIXELMAPUIVPROC glad_glPixelMapuiv = NULL; 461 | PFNGLPIXELMAPUSVPROC glad_glPixelMapusv = NULL; 462 | PFNGLPIXELSTOREFPROC glad_glPixelStoref = NULL; 463 | PFNGLPIXELSTOREIPROC glad_glPixelStorei = NULL; 464 | PFNGLPIXELTRANSFERFPROC glad_glPixelTransferf = NULL; 465 | PFNGLPIXELTRANSFERIPROC glad_glPixelTransferi = NULL; 466 | PFNGLPIXELZOOMPROC glad_glPixelZoom = NULL; 467 | PFNGLPOINTPARAMETERFPROC glad_glPointParameterf = NULL; 468 | PFNGLPOINTPARAMETERFVPROC glad_glPointParameterfv = NULL; 469 | PFNGLPOINTPARAMETERIPROC glad_glPointParameteri = NULL; 470 | PFNGLPOINTPARAMETERIVPROC glad_glPointParameteriv = NULL; 471 | PFNGLPOINTSIZEPROC glad_glPointSize = NULL; 472 | PFNGLPOLYGONMODEPROC glad_glPolygonMode = NULL; 473 | PFNGLPOLYGONOFFSETPROC glad_glPolygonOffset = NULL; 474 | PFNGLPOLYGONSTIPPLEPROC glad_glPolygonStipple = NULL; 475 | PFNGLPOPATTRIBPROC glad_glPopAttrib = NULL; 476 | PFNGLPOPCLIENTATTRIBPROC glad_glPopClientAttrib = NULL; 477 | PFNGLPOPDEBUGGROUPPROC glad_glPopDebugGroup = NULL; 478 | PFNGLPOPMATRIXPROC glad_glPopMatrix = NULL; 479 | PFNGLPOPNAMEPROC glad_glPopName = NULL; 480 | PFNGLPRIMITIVERESTARTINDEXPROC glad_glPrimitiveRestartIndex = NULL; 481 | PFNGLPRIORITIZETEXTURESPROC glad_glPrioritizeTextures = NULL; 482 | PFNGLPROVOKINGVERTEXPROC glad_glProvokingVertex = NULL; 483 | PFNGLPUSHATTRIBPROC glad_glPushAttrib = NULL; 484 | PFNGLPUSHCLIENTATTRIBPROC glad_glPushClientAttrib = NULL; 485 | PFNGLPUSHDEBUGGROUPPROC glad_glPushDebugGroup = NULL; 486 | PFNGLPUSHMATRIXPROC glad_glPushMatrix = NULL; 487 | PFNGLPUSHNAMEPROC glad_glPushName = NULL; 488 | PFNGLQUERYCOUNTERPROC glad_glQueryCounter = NULL; 489 | PFNGLRASTERPOS2DPROC glad_glRasterPos2d = NULL; 490 | PFNGLRASTERPOS2DVPROC glad_glRasterPos2dv = NULL; 491 | PFNGLRASTERPOS2FPROC glad_glRasterPos2f = NULL; 492 | PFNGLRASTERPOS2FVPROC glad_glRasterPos2fv = NULL; 493 | PFNGLRASTERPOS2IPROC glad_glRasterPos2i = NULL; 494 | PFNGLRASTERPOS2IVPROC glad_glRasterPos2iv = NULL; 495 | PFNGLRASTERPOS2SPROC glad_glRasterPos2s = NULL; 496 | PFNGLRASTERPOS2SVPROC glad_glRasterPos2sv = NULL; 497 | PFNGLRASTERPOS3DPROC glad_glRasterPos3d = NULL; 498 | PFNGLRASTERPOS3DVPROC glad_glRasterPos3dv = NULL; 499 | PFNGLRASTERPOS3FPROC glad_glRasterPos3f = NULL; 500 | PFNGLRASTERPOS3FVPROC glad_glRasterPos3fv = NULL; 501 | PFNGLRASTERPOS3IPROC glad_glRasterPos3i = NULL; 502 | PFNGLRASTERPOS3IVPROC glad_glRasterPos3iv = NULL; 503 | PFNGLRASTERPOS3SPROC glad_glRasterPos3s = NULL; 504 | PFNGLRASTERPOS3SVPROC glad_glRasterPos3sv = NULL; 505 | PFNGLRASTERPOS4DPROC glad_glRasterPos4d = NULL; 506 | PFNGLRASTERPOS4DVPROC glad_glRasterPos4dv = NULL; 507 | PFNGLRASTERPOS4FPROC glad_glRasterPos4f = NULL; 508 | PFNGLRASTERPOS4FVPROC glad_glRasterPos4fv = NULL; 509 | PFNGLRASTERPOS4IPROC glad_glRasterPos4i = NULL; 510 | PFNGLRASTERPOS4IVPROC glad_glRasterPos4iv = NULL; 511 | PFNGLRASTERPOS4SPROC glad_glRasterPos4s = NULL; 512 | PFNGLRASTERPOS4SVPROC glad_glRasterPos4sv = NULL; 513 | PFNGLREADBUFFERPROC glad_glReadBuffer = NULL; 514 | PFNGLREADPIXELSPROC glad_glReadPixels = NULL; 515 | PFNGLREADNPIXELSPROC glad_glReadnPixels = NULL; 516 | PFNGLREADNPIXELSARBPROC glad_glReadnPixelsARB = NULL; 517 | PFNGLRECTDPROC glad_glRectd = NULL; 518 | PFNGLRECTDVPROC glad_glRectdv = NULL; 519 | PFNGLRECTFPROC glad_glRectf = NULL; 520 | PFNGLRECTFVPROC glad_glRectfv = NULL; 521 | PFNGLRECTIPROC glad_glRecti = NULL; 522 | PFNGLRECTIVPROC glad_glRectiv = NULL; 523 | PFNGLRECTSPROC glad_glRects = NULL; 524 | PFNGLRECTSVPROC glad_glRectsv = NULL; 525 | PFNGLRENDERMODEPROC glad_glRenderMode = NULL; 526 | PFNGLRENDERBUFFERSTORAGEPROC glad_glRenderbufferStorage = NULL; 527 | PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL; 528 | PFNGLROTATEDPROC glad_glRotated = NULL; 529 | PFNGLROTATEFPROC glad_glRotatef = NULL; 530 | PFNGLSAMPLECOVERAGEPROC glad_glSampleCoverage = NULL; 531 | PFNGLSAMPLECOVERAGEARBPROC glad_glSampleCoverageARB = NULL; 532 | PFNGLSAMPLEMASKIPROC glad_glSampleMaski = NULL; 533 | PFNGLSAMPLERPARAMETERIIVPROC glad_glSamplerParameterIiv = NULL; 534 | PFNGLSAMPLERPARAMETERIUIVPROC glad_glSamplerParameterIuiv = NULL; 535 | PFNGLSAMPLERPARAMETERFPROC glad_glSamplerParameterf = NULL; 536 | PFNGLSAMPLERPARAMETERFVPROC glad_glSamplerParameterfv = NULL; 537 | PFNGLSAMPLERPARAMETERIPROC glad_glSamplerParameteri = NULL; 538 | PFNGLSAMPLERPARAMETERIVPROC glad_glSamplerParameteriv = NULL; 539 | PFNGLSCALEDPROC glad_glScaled = NULL; 540 | PFNGLSCALEFPROC glad_glScalef = NULL; 541 | PFNGLSCISSORPROC glad_glScissor = NULL; 542 | PFNGLSECONDARYCOLOR3BPROC glad_glSecondaryColor3b = NULL; 543 | PFNGLSECONDARYCOLOR3BVPROC glad_glSecondaryColor3bv = NULL; 544 | PFNGLSECONDARYCOLOR3DPROC glad_glSecondaryColor3d = NULL; 545 | PFNGLSECONDARYCOLOR3DVPROC glad_glSecondaryColor3dv = NULL; 546 | PFNGLSECONDARYCOLOR3FPROC glad_glSecondaryColor3f = NULL; 547 | PFNGLSECONDARYCOLOR3FVPROC glad_glSecondaryColor3fv = NULL; 548 | PFNGLSECONDARYCOLOR3IPROC glad_glSecondaryColor3i = NULL; 549 | PFNGLSECONDARYCOLOR3IVPROC glad_glSecondaryColor3iv = NULL; 550 | PFNGLSECONDARYCOLOR3SPROC glad_glSecondaryColor3s = NULL; 551 | PFNGLSECONDARYCOLOR3SVPROC glad_glSecondaryColor3sv = NULL; 552 | PFNGLSECONDARYCOLOR3UBPROC glad_glSecondaryColor3ub = NULL; 553 | PFNGLSECONDARYCOLOR3UBVPROC glad_glSecondaryColor3ubv = NULL; 554 | PFNGLSECONDARYCOLOR3UIPROC glad_glSecondaryColor3ui = NULL; 555 | PFNGLSECONDARYCOLOR3UIVPROC glad_glSecondaryColor3uiv = NULL; 556 | PFNGLSECONDARYCOLOR3USPROC glad_glSecondaryColor3us = NULL; 557 | PFNGLSECONDARYCOLOR3USVPROC glad_glSecondaryColor3usv = NULL; 558 | PFNGLSECONDARYCOLORP3UIPROC glad_glSecondaryColorP3ui = NULL; 559 | PFNGLSECONDARYCOLORP3UIVPROC glad_glSecondaryColorP3uiv = NULL; 560 | PFNGLSECONDARYCOLORPOINTERPROC glad_glSecondaryColorPointer = NULL; 561 | PFNGLSELECTBUFFERPROC glad_glSelectBuffer = NULL; 562 | PFNGLSHADEMODELPROC glad_glShadeModel = NULL; 563 | PFNGLSHADERSOURCEPROC glad_glShaderSource = NULL; 564 | PFNGLSTENCILFUNCPROC glad_glStencilFunc = NULL; 565 | PFNGLSTENCILFUNCSEPARATEPROC glad_glStencilFuncSeparate = NULL; 566 | PFNGLSTENCILMASKPROC glad_glStencilMask = NULL; 567 | PFNGLSTENCILMASKSEPARATEPROC glad_glStencilMaskSeparate = NULL; 568 | PFNGLSTENCILOPPROC glad_glStencilOp = NULL; 569 | PFNGLSTENCILOPSEPARATEPROC glad_glStencilOpSeparate = NULL; 570 | PFNGLTEXBUFFERPROC glad_glTexBuffer = NULL; 571 | PFNGLTEXCOORD1DPROC glad_glTexCoord1d = NULL; 572 | PFNGLTEXCOORD1DVPROC glad_glTexCoord1dv = NULL; 573 | PFNGLTEXCOORD1FPROC glad_glTexCoord1f = NULL; 574 | PFNGLTEXCOORD1FVPROC glad_glTexCoord1fv = NULL; 575 | PFNGLTEXCOORD1IPROC glad_glTexCoord1i = NULL; 576 | PFNGLTEXCOORD1IVPROC glad_glTexCoord1iv = NULL; 577 | PFNGLTEXCOORD1SPROC glad_glTexCoord1s = NULL; 578 | PFNGLTEXCOORD1SVPROC glad_glTexCoord1sv = NULL; 579 | PFNGLTEXCOORD2DPROC glad_glTexCoord2d = NULL; 580 | PFNGLTEXCOORD2DVPROC glad_glTexCoord2dv = NULL; 581 | PFNGLTEXCOORD2FPROC glad_glTexCoord2f = NULL; 582 | PFNGLTEXCOORD2FVPROC glad_glTexCoord2fv = NULL; 583 | PFNGLTEXCOORD2IPROC glad_glTexCoord2i = NULL; 584 | PFNGLTEXCOORD2IVPROC glad_glTexCoord2iv = NULL; 585 | PFNGLTEXCOORD2SPROC glad_glTexCoord2s = NULL; 586 | PFNGLTEXCOORD2SVPROC glad_glTexCoord2sv = NULL; 587 | PFNGLTEXCOORD3DPROC glad_glTexCoord3d = NULL; 588 | PFNGLTEXCOORD3DVPROC glad_glTexCoord3dv = NULL; 589 | PFNGLTEXCOORD3FPROC glad_glTexCoord3f = NULL; 590 | PFNGLTEXCOORD3FVPROC glad_glTexCoord3fv = NULL; 591 | PFNGLTEXCOORD3IPROC glad_glTexCoord3i = NULL; 592 | PFNGLTEXCOORD3IVPROC glad_glTexCoord3iv = NULL; 593 | PFNGLTEXCOORD3SPROC glad_glTexCoord3s = NULL; 594 | PFNGLTEXCOORD3SVPROC glad_glTexCoord3sv = NULL; 595 | PFNGLTEXCOORD4DPROC glad_glTexCoord4d = NULL; 596 | PFNGLTEXCOORD4DVPROC glad_glTexCoord4dv = NULL; 597 | PFNGLTEXCOORD4FPROC glad_glTexCoord4f = NULL; 598 | PFNGLTEXCOORD4FVPROC glad_glTexCoord4fv = NULL; 599 | PFNGLTEXCOORD4IPROC glad_glTexCoord4i = NULL; 600 | PFNGLTEXCOORD4IVPROC glad_glTexCoord4iv = NULL; 601 | PFNGLTEXCOORD4SPROC glad_glTexCoord4s = NULL; 602 | PFNGLTEXCOORD4SVPROC glad_glTexCoord4sv = NULL; 603 | PFNGLTEXCOORDP1UIPROC glad_glTexCoordP1ui = NULL; 604 | PFNGLTEXCOORDP1UIVPROC glad_glTexCoordP1uiv = NULL; 605 | PFNGLTEXCOORDP2UIPROC glad_glTexCoordP2ui = NULL; 606 | PFNGLTEXCOORDP2UIVPROC glad_glTexCoordP2uiv = NULL; 607 | PFNGLTEXCOORDP3UIPROC glad_glTexCoordP3ui = NULL; 608 | PFNGLTEXCOORDP3UIVPROC glad_glTexCoordP3uiv = NULL; 609 | PFNGLTEXCOORDP4UIPROC glad_glTexCoordP4ui = NULL; 610 | PFNGLTEXCOORDP4UIVPROC glad_glTexCoordP4uiv = NULL; 611 | PFNGLTEXCOORDPOINTERPROC glad_glTexCoordPointer = NULL; 612 | PFNGLTEXENVFPROC glad_glTexEnvf = NULL; 613 | PFNGLTEXENVFVPROC glad_glTexEnvfv = NULL; 614 | PFNGLTEXENVIPROC glad_glTexEnvi = NULL; 615 | PFNGLTEXENVIVPROC glad_glTexEnviv = NULL; 616 | PFNGLTEXGENDPROC glad_glTexGend = NULL; 617 | PFNGLTEXGENDVPROC glad_glTexGendv = NULL; 618 | PFNGLTEXGENFPROC glad_glTexGenf = NULL; 619 | PFNGLTEXGENFVPROC glad_glTexGenfv = NULL; 620 | PFNGLTEXGENIPROC glad_glTexGeni = NULL; 621 | PFNGLTEXGENIVPROC glad_glTexGeniv = NULL; 622 | PFNGLTEXIMAGE1DPROC glad_glTexImage1D = NULL; 623 | PFNGLTEXIMAGE2DPROC glad_glTexImage2D = NULL; 624 | PFNGLTEXIMAGE2DMULTISAMPLEPROC glad_glTexImage2DMultisample = NULL; 625 | PFNGLTEXIMAGE3DPROC glad_glTexImage3D = NULL; 626 | PFNGLTEXIMAGE3DMULTISAMPLEPROC glad_glTexImage3DMultisample = NULL; 627 | PFNGLTEXPARAMETERIIVPROC glad_glTexParameterIiv = NULL; 628 | PFNGLTEXPARAMETERIUIVPROC glad_glTexParameterIuiv = NULL; 629 | PFNGLTEXPARAMETERFPROC glad_glTexParameterf = NULL; 630 | PFNGLTEXPARAMETERFVPROC glad_glTexParameterfv = NULL; 631 | PFNGLTEXPARAMETERIPROC glad_glTexParameteri = NULL; 632 | PFNGLTEXPARAMETERIVPROC glad_glTexParameteriv = NULL; 633 | PFNGLTEXSUBIMAGE1DPROC glad_glTexSubImage1D = NULL; 634 | PFNGLTEXSUBIMAGE2DPROC glad_glTexSubImage2D = NULL; 635 | PFNGLTEXSUBIMAGE3DPROC glad_glTexSubImage3D = NULL; 636 | PFNGLTRANSFORMFEEDBACKVARYINGSPROC glad_glTransformFeedbackVaryings = NULL; 637 | PFNGLTRANSLATEDPROC glad_glTranslated = NULL; 638 | PFNGLTRANSLATEFPROC glad_glTranslatef = NULL; 639 | PFNGLUNIFORM1FPROC glad_glUniform1f = NULL; 640 | PFNGLUNIFORM1FVPROC glad_glUniform1fv = NULL; 641 | PFNGLUNIFORM1IPROC glad_glUniform1i = NULL; 642 | PFNGLUNIFORM1IVPROC glad_glUniform1iv = NULL; 643 | PFNGLUNIFORM1UIPROC glad_glUniform1ui = NULL; 644 | PFNGLUNIFORM1UIVPROC glad_glUniform1uiv = NULL; 645 | PFNGLUNIFORM2FPROC glad_glUniform2f = NULL; 646 | PFNGLUNIFORM2FVPROC glad_glUniform2fv = NULL; 647 | PFNGLUNIFORM2IPROC glad_glUniform2i = NULL; 648 | PFNGLUNIFORM2IVPROC glad_glUniform2iv = NULL; 649 | PFNGLUNIFORM2UIPROC glad_glUniform2ui = NULL; 650 | PFNGLUNIFORM2UIVPROC glad_glUniform2uiv = NULL; 651 | PFNGLUNIFORM3FPROC glad_glUniform3f = NULL; 652 | PFNGLUNIFORM3FVPROC glad_glUniform3fv = NULL; 653 | PFNGLUNIFORM3IPROC glad_glUniform3i = NULL; 654 | PFNGLUNIFORM3IVPROC glad_glUniform3iv = NULL; 655 | PFNGLUNIFORM3UIPROC glad_glUniform3ui = NULL; 656 | PFNGLUNIFORM3UIVPROC glad_glUniform3uiv = NULL; 657 | PFNGLUNIFORM4FPROC glad_glUniform4f = NULL; 658 | PFNGLUNIFORM4FVPROC glad_glUniform4fv = NULL; 659 | PFNGLUNIFORM4IPROC glad_glUniform4i = NULL; 660 | PFNGLUNIFORM4IVPROC glad_glUniform4iv = NULL; 661 | PFNGLUNIFORM4UIPROC glad_glUniform4ui = NULL; 662 | PFNGLUNIFORM4UIVPROC glad_glUniform4uiv = NULL; 663 | PFNGLUNIFORMBLOCKBINDINGPROC glad_glUniformBlockBinding = NULL; 664 | PFNGLUNIFORMMATRIX2FVPROC glad_glUniformMatrix2fv = NULL; 665 | PFNGLUNIFORMMATRIX2X3FVPROC glad_glUniformMatrix2x3fv = NULL; 666 | PFNGLUNIFORMMATRIX2X4FVPROC glad_glUniformMatrix2x4fv = NULL; 667 | PFNGLUNIFORMMATRIX3FVPROC glad_glUniformMatrix3fv = NULL; 668 | PFNGLUNIFORMMATRIX3X2FVPROC glad_glUniformMatrix3x2fv = NULL; 669 | PFNGLUNIFORMMATRIX3X4FVPROC glad_glUniformMatrix3x4fv = NULL; 670 | PFNGLUNIFORMMATRIX4FVPROC glad_glUniformMatrix4fv = NULL; 671 | PFNGLUNIFORMMATRIX4X2FVPROC glad_glUniformMatrix4x2fv = NULL; 672 | PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv = NULL; 673 | PFNGLUNMAPBUFFERPROC glad_glUnmapBuffer = NULL; 674 | PFNGLUSEPROGRAMPROC glad_glUseProgram = NULL; 675 | PFNGLVALIDATEPROGRAMPROC glad_glValidateProgram = NULL; 676 | PFNGLVERTEX2DPROC glad_glVertex2d = NULL; 677 | PFNGLVERTEX2DVPROC glad_glVertex2dv = NULL; 678 | PFNGLVERTEX2FPROC glad_glVertex2f = NULL; 679 | PFNGLVERTEX2FVPROC glad_glVertex2fv = NULL; 680 | PFNGLVERTEX2IPROC glad_glVertex2i = NULL; 681 | PFNGLVERTEX2IVPROC glad_glVertex2iv = NULL; 682 | PFNGLVERTEX2SPROC glad_glVertex2s = NULL; 683 | PFNGLVERTEX2SVPROC glad_glVertex2sv = NULL; 684 | PFNGLVERTEX3DPROC glad_glVertex3d = NULL; 685 | PFNGLVERTEX3DVPROC glad_glVertex3dv = NULL; 686 | PFNGLVERTEX3FPROC glad_glVertex3f = NULL; 687 | PFNGLVERTEX3FVPROC glad_glVertex3fv = NULL; 688 | PFNGLVERTEX3IPROC glad_glVertex3i = NULL; 689 | PFNGLVERTEX3IVPROC glad_glVertex3iv = NULL; 690 | PFNGLVERTEX3SPROC glad_glVertex3s = NULL; 691 | PFNGLVERTEX3SVPROC glad_glVertex3sv = NULL; 692 | PFNGLVERTEX4DPROC glad_glVertex4d = NULL; 693 | PFNGLVERTEX4DVPROC glad_glVertex4dv = NULL; 694 | PFNGLVERTEX4FPROC glad_glVertex4f = NULL; 695 | PFNGLVERTEX4FVPROC glad_glVertex4fv = NULL; 696 | PFNGLVERTEX4IPROC glad_glVertex4i = NULL; 697 | PFNGLVERTEX4IVPROC glad_glVertex4iv = NULL; 698 | PFNGLVERTEX4SPROC glad_glVertex4s = NULL; 699 | PFNGLVERTEX4SVPROC glad_glVertex4sv = NULL; 700 | PFNGLVERTEXATTRIB1DPROC glad_glVertexAttrib1d = NULL; 701 | PFNGLVERTEXATTRIB1DVPROC glad_glVertexAttrib1dv = NULL; 702 | PFNGLVERTEXATTRIB1FPROC glad_glVertexAttrib1f = NULL; 703 | PFNGLVERTEXATTRIB1FVPROC glad_glVertexAttrib1fv = NULL; 704 | PFNGLVERTEXATTRIB1SPROC glad_glVertexAttrib1s = NULL; 705 | PFNGLVERTEXATTRIB1SVPROC glad_glVertexAttrib1sv = NULL; 706 | PFNGLVERTEXATTRIB2DPROC glad_glVertexAttrib2d = NULL; 707 | PFNGLVERTEXATTRIB2DVPROC glad_glVertexAttrib2dv = NULL; 708 | PFNGLVERTEXATTRIB2FPROC glad_glVertexAttrib2f = NULL; 709 | PFNGLVERTEXATTRIB2FVPROC glad_glVertexAttrib2fv = NULL; 710 | PFNGLVERTEXATTRIB2SPROC glad_glVertexAttrib2s = NULL; 711 | PFNGLVERTEXATTRIB2SVPROC glad_glVertexAttrib2sv = NULL; 712 | PFNGLVERTEXATTRIB3DPROC glad_glVertexAttrib3d = NULL; 713 | PFNGLVERTEXATTRIB3DVPROC glad_glVertexAttrib3dv = NULL; 714 | PFNGLVERTEXATTRIB3FPROC glad_glVertexAttrib3f = NULL; 715 | PFNGLVERTEXATTRIB3FVPROC glad_glVertexAttrib3fv = NULL; 716 | PFNGLVERTEXATTRIB3SPROC glad_glVertexAttrib3s = NULL; 717 | PFNGLVERTEXATTRIB3SVPROC glad_glVertexAttrib3sv = NULL; 718 | PFNGLVERTEXATTRIB4NBVPROC glad_glVertexAttrib4Nbv = NULL; 719 | PFNGLVERTEXATTRIB4NIVPROC glad_glVertexAttrib4Niv = NULL; 720 | PFNGLVERTEXATTRIB4NSVPROC glad_glVertexAttrib4Nsv = NULL; 721 | PFNGLVERTEXATTRIB4NUBPROC glad_glVertexAttrib4Nub = NULL; 722 | PFNGLVERTEXATTRIB4NUBVPROC glad_glVertexAttrib4Nubv = NULL; 723 | PFNGLVERTEXATTRIB4NUIVPROC glad_glVertexAttrib4Nuiv = NULL; 724 | PFNGLVERTEXATTRIB4NUSVPROC glad_glVertexAttrib4Nusv = NULL; 725 | PFNGLVERTEXATTRIB4BVPROC glad_glVertexAttrib4bv = NULL; 726 | PFNGLVERTEXATTRIB4DPROC glad_glVertexAttrib4d = NULL; 727 | PFNGLVERTEXATTRIB4DVPROC glad_glVertexAttrib4dv = NULL; 728 | PFNGLVERTEXATTRIB4FPROC glad_glVertexAttrib4f = NULL; 729 | PFNGLVERTEXATTRIB4FVPROC glad_glVertexAttrib4fv = NULL; 730 | PFNGLVERTEXATTRIB4IVPROC glad_glVertexAttrib4iv = NULL; 731 | PFNGLVERTEXATTRIB4SPROC glad_glVertexAttrib4s = NULL; 732 | PFNGLVERTEXATTRIB4SVPROC glad_glVertexAttrib4sv = NULL; 733 | PFNGLVERTEXATTRIB4UBVPROC glad_glVertexAttrib4ubv = NULL; 734 | PFNGLVERTEXATTRIB4UIVPROC glad_glVertexAttrib4uiv = NULL; 735 | PFNGLVERTEXATTRIB4USVPROC glad_glVertexAttrib4usv = NULL; 736 | PFNGLVERTEXATTRIBDIVISORPROC glad_glVertexAttribDivisor = NULL; 737 | PFNGLVERTEXATTRIBI1IPROC glad_glVertexAttribI1i = NULL; 738 | PFNGLVERTEXATTRIBI1IVPROC glad_glVertexAttribI1iv = NULL; 739 | PFNGLVERTEXATTRIBI1UIPROC glad_glVertexAttribI1ui = NULL; 740 | PFNGLVERTEXATTRIBI1UIVPROC glad_glVertexAttribI1uiv = NULL; 741 | PFNGLVERTEXATTRIBI2IPROC glad_glVertexAttribI2i = NULL; 742 | PFNGLVERTEXATTRIBI2IVPROC glad_glVertexAttribI2iv = NULL; 743 | PFNGLVERTEXATTRIBI2UIPROC glad_glVertexAttribI2ui = NULL; 744 | PFNGLVERTEXATTRIBI2UIVPROC glad_glVertexAttribI2uiv = NULL; 745 | PFNGLVERTEXATTRIBI3IPROC glad_glVertexAttribI3i = NULL; 746 | PFNGLVERTEXATTRIBI3IVPROC glad_glVertexAttribI3iv = NULL; 747 | PFNGLVERTEXATTRIBI3UIPROC glad_glVertexAttribI3ui = NULL; 748 | PFNGLVERTEXATTRIBI3UIVPROC glad_glVertexAttribI3uiv = NULL; 749 | PFNGLVERTEXATTRIBI4BVPROC glad_glVertexAttribI4bv = NULL; 750 | PFNGLVERTEXATTRIBI4IPROC glad_glVertexAttribI4i = NULL; 751 | PFNGLVERTEXATTRIBI4IVPROC glad_glVertexAttribI4iv = NULL; 752 | PFNGLVERTEXATTRIBI4SVPROC glad_glVertexAttribI4sv = NULL; 753 | PFNGLVERTEXATTRIBI4UBVPROC glad_glVertexAttribI4ubv = NULL; 754 | PFNGLVERTEXATTRIBI4UIPROC glad_glVertexAttribI4ui = NULL; 755 | PFNGLVERTEXATTRIBI4UIVPROC glad_glVertexAttribI4uiv = NULL; 756 | PFNGLVERTEXATTRIBI4USVPROC glad_glVertexAttribI4usv = NULL; 757 | PFNGLVERTEXATTRIBIPOINTERPROC glad_glVertexAttribIPointer = NULL; 758 | PFNGLVERTEXATTRIBP1UIPROC glad_glVertexAttribP1ui = NULL; 759 | PFNGLVERTEXATTRIBP1UIVPROC glad_glVertexAttribP1uiv = NULL; 760 | PFNGLVERTEXATTRIBP2UIPROC glad_glVertexAttribP2ui = NULL; 761 | PFNGLVERTEXATTRIBP2UIVPROC glad_glVertexAttribP2uiv = NULL; 762 | PFNGLVERTEXATTRIBP3UIPROC glad_glVertexAttribP3ui = NULL; 763 | PFNGLVERTEXATTRIBP3UIVPROC glad_glVertexAttribP3uiv = NULL; 764 | PFNGLVERTEXATTRIBP4UIPROC glad_glVertexAttribP4ui = NULL; 765 | PFNGLVERTEXATTRIBP4UIVPROC glad_glVertexAttribP4uiv = NULL; 766 | PFNGLVERTEXATTRIBPOINTERPROC glad_glVertexAttribPointer = NULL; 767 | PFNGLVERTEXP2UIPROC glad_glVertexP2ui = NULL; 768 | PFNGLVERTEXP2UIVPROC glad_glVertexP2uiv = NULL; 769 | PFNGLVERTEXP3UIPROC glad_glVertexP3ui = NULL; 770 | PFNGLVERTEXP3UIVPROC glad_glVertexP3uiv = NULL; 771 | PFNGLVERTEXP4UIPROC glad_glVertexP4ui = NULL; 772 | PFNGLVERTEXP4UIVPROC glad_glVertexP4uiv = NULL; 773 | PFNGLVERTEXPOINTERPROC glad_glVertexPointer = NULL; 774 | PFNGLVIEWPORTPROC glad_glViewport = NULL; 775 | PFNGLWAITSYNCPROC glad_glWaitSync = NULL; 776 | PFNGLWINDOWPOS2DPROC glad_glWindowPos2d = NULL; 777 | PFNGLWINDOWPOS2DVPROC glad_glWindowPos2dv = NULL; 778 | PFNGLWINDOWPOS2FPROC glad_glWindowPos2f = NULL; 779 | PFNGLWINDOWPOS2FVPROC glad_glWindowPos2fv = NULL; 780 | PFNGLWINDOWPOS2IPROC glad_glWindowPos2i = NULL; 781 | PFNGLWINDOWPOS2IVPROC glad_glWindowPos2iv = NULL; 782 | PFNGLWINDOWPOS2SPROC glad_glWindowPos2s = NULL; 783 | PFNGLWINDOWPOS2SVPROC glad_glWindowPos2sv = NULL; 784 | PFNGLWINDOWPOS3DPROC glad_glWindowPos3d = NULL; 785 | PFNGLWINDOWPOS3DVPROC glad_glWindowPos3dv = NULL; 786 | PFNGLWINDOWPOS3FPROC glad_glWindowPos3f = NULL; 787 | PFNGLWINDOWPOS3FVPROC glad_glWindowPos3fv = NULL; 788 | PFNGLWINDOWPOS3IPROC glad_glWindowPos3i = NULL; 789 | PFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv = NULL; 790 | PFNGLWINDOWPOS3SPROC glad_glWindowPos3s = NULL; 791 | PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv = NULL; 792 | 793 | 794 | static void glad_gl_load_GL_VERSION_1_0( GLADuserptrloadfunc load, void* userptr) { 795 | if(!GLAD_GL_VERSION_1_0) return; 796 | glAccum = (PFNGLACCUMPROC) load("glAccum", userptr); 797 | glAlphaFunc = (PFNGLALPHAFUNCPROC) load("glAlphaFunc", userptr); 798 | glBegin = (PFNGLBEGINPROC) load("glBegin", userptr); 799 | glBitmap = (PFNGLBITMAPPROC) load("glBitmap", userptr); 800 | glBlendFunc = (PFNGLBLENDFUNCPROC) load("glBlendFunc", userptr); 801 | glCallList = (PFNGLCALLLISTPROC) load("glCallList", userptr); 802 | glCallLists = (PFNGLCALLLISTSPROC) load("glCallLists", userptr); 803 | glClear = (PFNGLCLEARPROC) load("glClear", userptr); 804 | glClearAccum = (PFNGLCLEARACCUMPROC) load("glClearAccum", userptr); 805 | glClearColor = (PFNGLCLEARCOLORPROC) load("glClearColor", userptr); 806 | glClearDepth = (PFNGLCLEARDEPTHPROC) load("glClearDepth", userptr); 807 | glClearIndex = (PFNGLCLEARINDEXPROC) load("glClearIndex", userptr); 808 | glClearStencil = (PFNGLCLEARSTENCILPROC) load("glClearStencil", userptr); 809 | glClipPlane = (PFNGLCLIPPLANEPROC) load("glClipPlane", userptr); 810 | glColor3b = (PFNGLCOLOR3BPROC) load("glColor3b", userptr); 811 | glColor3bv = (PFNGLCOLOR3BVPROC) load("glColor3bv", userptr); 812 | glColor3d = (PFNGLCOLOR3DPROC) load("glColor3d", userptr); 813 | glColor3dv = (PFNGLCOLOR3DVPROC) load("glColor3dv", userptr); 814 | glColor3f = (PFNGLCOLOR3FPROC) load("glColor3f", userptr); 815 | glColor3fv = (PFNGLCOLOR3FVPROC) load("glColor3fv", userptr); 816 | glColor3i = (PFNGLCOLOR3IPROC) load("glColor3i", userptr); 817 | glColor3iv = (PFNGLCOLOR3IVPROC) load("glColor3iv", userptr); 818 | glColor3s = (PFNGLCOLOR3SPROC) load("glColor3s", userptr); 819 | glColor3sv = (PFNGLCOLOR3SVPROC) load("glColor3sv", userptr); 820 | glColor3ub = (PFNGLCOLOR3UBPROC) load("glColor3ub", userptr); 821 | glColor3ubv = (PFNGLCOLOR3UBVPROC) load("glColor3ubv", userptr); 822 | glColor3ui = (PFNGLCOLOR3UIPROC) load("glColor3ui", userptr); 823 | glColor3uiv = (PFNGLCOLOR3UIVPROC) load("glColor3uiv", userptr); 824 | glColor3us = (PFNGLCOLOR3USPROC) load("glColor3us", userptr); 825 | glColor3usv = (PFNGLCOLOR3USVPROC) load("glColor3usv", userptr); 826 | glColor4b = (PFNGLCOLOR4BPROC) load("glColor4b", userptr); 827 | glColor4bv = (PFNGLCOLOR4BVPROC) load("glColor4bv", userptr); 828 | glColor4d = (PFNGLCOLOR4DPROC) load("glColor4d", userptr); 829 | glColor4dv = (PFNGLCOLOR4DVPROC) load("glColor4dv", userptr); 830 | glColor4f = (PFNGLCOLOR4FPROC) load("glColor4f", userptr); 831 | glColor4fv = (PFNGLCOLOR4FVPROC) load("glColor4fv", userptr); 832 | glColor4i = (PFNGLCOLOR4IPROC) load("glColor4i", userptr); 833 | glColor4iv = (PFNGLCOLOR4IVPROC) load("glColor4iv", userptr); 834 | glColor4s = (PFNGLCOLOR4SPROC) load("glColor4s", userptr); 835 | glColor4sv = (PFNGLCOLOR4SVPROC) load("glColor4sv", userptr); 836 | glColor4ub = (PFNGLCOLOR4UBPROC) load("glColor4ub", userptr); 837 | glColor4ubv = (PFNGLCOLOR4UBVPROC) load("glColor4ubv", userptr); 838 | glColor4ui = (PFNGLCOLOR4UIPROC) load("glColor4ui", userptr); 839 | glColor4uiv = (PFNGLCOLOR4UIVPROC) load("glColor4uiv", userptr); 840 | glColor4us = (PFNGLCOLOR4USPROC) load("glColor4us", userptr); 841 | glColor4usv = (PFNGLCOLOR4USVPROC) load("glColor4usv", userptr); 842 | glColorMask = (PFNGLCOLORMASKPROC) load("glColorMask", userptr); 843 | glColorMaterial = (PFNGLCOLORMATERIALPROC) load("glColorMaterial", userptr); 844 | glCopyPixels = (PFNGLCOPYPIXELSPROC) load("glCopyPixels", userptr); 845 | glCullFace = (PFNGLCULLFACEPROC) load("glCullFace", userptr); 846 | glDeleteLists = (PFNGLDELETELISTSPROC) load("glDeleteLists", userptr); 847 | glDepthFunc = (PFNGLDEPTHFUNCPROC) load("glDepthFunc", userptr); 848 | glDepthMask = (PFNGLDEPTHMASKPROC) load("glDepthMask", userptr); 849 | glDepthRange = (PFNGLDEPTHRANGEPROC) load("glDepthRange", userptr); 850 | glDisable = (PFNGLDISABLEPROC) load("glDisable", userptr); 851 | glDrawBuffer = (PFNGLDRAWBUFFERPROC) load("glDrawBuffer", userptr); 852 | glDrawPixels = (PFNGLDRAWPIXELSPROC) load("glDrawPixels", userptr); 853 | glEdgeFlag = (PFNGLEDGEFLAGPROC) load("glEdgeFlag", userptr); 854 | glEdgeFlagv = (PFNGLEDGEFLAGVPROC) load("glEdgeFlagv", userptr); 855 | glEnable = (PFNGLENABLEPROC) load("glEnable", userptr); 856 | glEnd = (PFNGLENDPROC) load("glEnd", userptr); 857 | glEndList = (PFNGLENDLISTPROC) load("glEndList", userptr); 858 | glEvalCoord1d = (PFNGLEVALCOORD1DPROC) load("glEvalCoord1d", userptr); 859 | glEvalCoord1dv = (PFNGLEVALCOORD1DVPROC) load("glEvalCoord1dv", userptr); 860 | glEvalCoord1f = (PFNGLEVALCOORD1FPROC) load("glEvalCoord1f", userptr); 861 | glEvalCoord1fv = (PFNGLEVALCOORD1FVPROC) load("glEvalCoord1fv", userptr); 862 | glEvalCoord2d = (PFNGLEVALCOORD2DPROC) load("glEvalCoord2d", userptr); 863 | glEvalCoord2dv = (PFNGLEVALCOORD2DVPROC) load("glEvalCoord2dv", userptr); 864 | glEvalCoord2f = (PFNGLEVALCOORD2FPROC) load("glEvalCoord2f", userptr); 865 | glEvalCoord2fv = (PFNGLEVALCOORD2FVPROC) load("glEvalCoord2fv", userptr); 866 | glEvalMesh1 = (PFNGLEVALMESH1PROC) load("glEvalMesh1", userptr); 867 | glEvalMesh2 = (PFNGLEVALMESH2PROC) load("glEvalMesh2", userptr); 868 | glEvalPoint1 = (PFNGLEVALPOINT1PROC) load("glEvalPoint1", userptr); 869 | glEvalPoint2 = (PFNGLEVALPOINT2PROC) load("glEvalPoint2", userptr); 870 | glFeedbackBuffer = (PFNGLFEEDBACKBUFFERPROC) load("glFeedbackBuffer", userptr); 871 | glFinish = (PFNGLFINISHPROC) load("glFinish", userptr); 872 | glFlush = (PFNGLFLUSHPROC) load("glFlush", userptr); 873 | glFogf = (PFNGLFOGFPROC) load("glFogf", userptr); 874 | glFogfv = (PFNGLFOGFVPROC) load("glFogfv", userptr); 875 | glFogi = (PFNGLFOGIPROC) load("glFogi", userptr); 876 | glFogiv = (PFNGLFOGIVPROC) load("glFogiv", userptr); 877 | glFrontFace = (PFNGLFRONTFACEPROC) load("glFrontFace", userptr); 878 | glFrustum = (PFNGLFRUSTUMPROC) load("glFrustum", userptr); 879 | glGenLists = (PFNGLGENLISTSPROC) load("glGenLists", userptr); 880 | glGetBooleanv = (PFNGLGETBOOLEANVPROC) load("glGetBooleanv", userptr); 881 | glGetClipPlane = (PFNGLGETCLIPPLANEPROC) load("glGetClipPlane", userptr); 882 | glGetDoublev = (PFNGLGETDOUBLEVPROC) load("glGetDoublev", userptr); 883 | glGetError = (PFNGLGETERRORPROC) load("glGetError", userptr); 884 | glGetFloatv = (PFNGLGETFLOATVPROC) load("glGetFloatv", userptr); 885 | glGetIntegerv = (PFNGLGETINTEGERVPROC) load("glGetIntegerv", userptr); 886 | glGetLightfv = (PFNGLGETLIGHTFVPROC) load("glGetLightfv", userptr); 887 | glGetLightiv = (PFNGLGETLIGHTIVPROC) load("glGetLightiv", userptr); 888 | glGetMapdv = (PFNGLGETMAPDVPROC) load("glGetMapdv", userptr); 889 | glGetMapfv = (PFNGLGETMAPFVPROC) load("glGetMapfv", userptr); 890 | glGetMapiv = (PFNGLGETMAPIVPROC) load("glGetMapiv", userptr); 891 | glGetMaterialfv = (PFNGLGETMATERIALFVPROC) load("glGetMaterialfv", userptr); 892 | glGetMaterialiv = (PFNGLGETMATERIALIVPROC) load("glGetMaterialiv", userptr); 893 | glGetPixelMapfv = (PFNGLGETPIXELMAPFVPROC) load("glGetPixelMapfv", userptr); 894 | glGetPixelMapuiv = (PFNGLGETPIXELMAPUIVPROC) load("glGetPixelMapuiv", userptr); 895 | glGetPixelMapusv = (PFNGLGETPIXELMAPUSVPROC) load("glGetPixelMapusv", userptr); 896 | glGetPolygonStipple = (PFNGLGETPOLYGONSTIPPLEPROC) load("glGetPolygonStipple", userptr); 897 | glGetString = (PFNGLGETSTRINGPROC) load("glGetString", userptr); 898 | glGetTexEnvfv = (PFNGLGETTEXENVFVPROC) load("glGetTexEnvfv", userptr); 899 | glGetTexEnviv = (PFNGLGETTEXENVIVPROC) load("glGetTexEnviv", userptr); 900 | glGetTexGendv = (PFNGLGETTEXGENDVPROC) load("glGetTexGendv", userptr); 901 | glGetTexGenfv = (PFNGLGETTEXGENFVPROC) load("glGetTexGenfv", userptr); 902 | glGetTexGeniv = (PFNGLGETTEXGENIVPROC) load("glGetTexGeniv", userptr); 903 | glGetTexImage = (PFNGLGETTEXIMAGEPROC) load("glGetTexImage", userptr); 904 | glGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC) load("glGetTexLevelParameterfv", userptr); 905 | glGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC) load("glGetTexLevelParameteriv", userptr); 906 | glGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC) load("glGetTexParameterfv", userptr); 907 | glGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC) load("glGetTexParameteriv", userptr); 908 | glHint = (PFNGLHINTPROC) load("glHint", userptr); 909 | glIndexMask = (PFNGLINDEXMASKPROC) load("glIndexMask", userptr); 910 | glIndexd = (PFNGLINDEXDPROC) load("glIndexd", userptr); 911 | glIndexdv = (PFNGLINDEXDVPROC) load("glIndexdv", userptr); 912 | glIndexf = (PFNGLINDEXFPROC) load("glIndexf", userptr); 913 | glIndexfv = (PFNGLINDEXFVPROC) load("glIndexfv", userptr); 914 | glIndexi = (PFNGLINDEXIPROC) load("glIndexi", userptr); 915 | glIndexiv = (PFNGLINDEXIVPROC) load("glIndexiv", userptr); 916 | glIndexs = (PFNGLINDEXSPROC) load("glIndexs", userptr); 917 | glIndexsv = (PFNGLINDEXSVPROC) load("glIndexsv", userptr); 918 | glInitNames = (PFNGLINITNAMESPROC) load("glInitNames", userptr); 919 | glIsEnabled = (PFNGLISENABLEDPROC) load("glIsEnabled", userptr); 920 | glIsList = (PFNGLISLISTPROC) load("glIsList", userptr); 921 | glLightModelf = (PFNGLLIGHTMODELFPROC) load("glLightModelf", userptr); 922 | glLightModelfv = (PFNGLLIGHTMODELFVPROC) load("glLightModelfv", userptr); 923 | glLightModeli = (PFNGLLIGHTMODELIPROC) load("glLightModeli", userptr); 924 | glLightModeliv = (PFNGLLIGHTMODELIVPROC) load("glLightModeliv", userptr); 925 | glLightf = (PFNGLLIGHTFPROC) load("glLightf", userptr); 926 | glLightfv = (PFNGLLIGHTFVPROC) load("glLightfv", userptr); 927 | glLighti = (PFNGLLIGHTIPROC) load("glLighti", userptr); 928 | glLightiv = (PFNGLLIGHTIVPROC) load("glLightiv", userptr); 929 | glLineStipple = (PFNGLLINESTIPPLEPROC) load("glLineStipple", userptr); 930 | glLineWidth = (PFNGLLINEWIDTHPROC) load("glLineWidth", userptr); 931 | glListBase = (PFNGLLISTBASEPROC) load("glListBase", userptr); 932 | glLoadIdentity = (PFNGLLOADIDENTITYPROC) load("glLoadIdentity", userptr); 933 | glLoadMatrixd = (PFNGLLOADMATRIXDPROC) load("glLoadMatrixd", userptr); 934 | glLoadMatrixf = (PFNGLLOADMATRIXFPROC) load("glLoadMatrixf", userptr); 935 | glLoadName = (PFNGLLOADNAMEPROC) load("glLoadName", userptr); 936 | glLogicOp = (PFNGLLOGICOPPROC) load("glLogicOp", userptr); 937 | glMap1d = (PFNGLMAP1DPROC) load("glMap1d", userptr); 938 | glMap1f = (PFNGLMAP1FPROC) load("glMap1f", userptr); 939 | glMap2d = (PFNGLMAP2DPROC) load("glMap2d", userptr); 940 | glMap2f = (PFNGLMAP2FPROC) load("glMap2f", userptr); 941 | glMapGrid1d = (PFNGLMAPGRID1DPROC) load("glMapGrid1d", userptr); 942 | glMapGrid1f = (PFNGLMAPGRID1FPROC) load("glMapGrid1f", userptr); 943 | glMapGrid2d = (PFNGLMAPGRID2DPROC) load("glMapGrid2d", userptr); 944 | glMapGrid2f = (PFNGLMAPGRID2FPROC) load("glMapGrid2f", userptr); 945 | glMaterialf = (PFNGLMATERIALFPROC) load("glMaterialf", userptr); 946 | glMaterialfv = (PFNGLMATERIALFVPROC) load("glMaterialfv", userptr); 947 | glMateriali = (PFNGLMATERIALIPROC) load("glMateriali", userptr); 948 | glMaterialiv = (PFNGLMATERIALIVPROC) load("glMaterialiv", userptr); 949 | glMatrixMode = (PFNGLMATRIXMODEPROC) load("glMatrixMode", userptr); 950 | glMultMatrixd = (PFNGLMULTMATRIXDPROC) load("glMultMatrixd", userptr); 951 | glMultMatrixf = (PFNGLMULTMATRIXFPROC) load("glMultMatrixf", userptr); 952 | glNewList = (PFNGLNEWLISTPROC) load("glNewList", userptr); 953 | glNormal3b = (PFNGLNORMAL3BPROC) load("glNormal3b", userptr); 954 | glNormal3bv = (PFNGLNORMAL3BVPROC) load("glNormal3bv", userptr); 955 | glNormal3d = (PFNGLNORMAL3DPROC) load("glNormal3d", userptr); 956 | glNormal3dv = (PFNGLNORMAL3DVPROC) load("glNormal3dv", userptr); 957 | glNormal3f = (PFNGLNORMAL3FPROC) load("glNormal3f", userptr); 958 | glNormal3fv = (PFNGLNORMAL3FVPROC) load("glNormal3fv", userptr); 959 | glNormal3i = (PFNGLNORMAL3IPROC) load("glNormal3i", userptr); 960 | glNormal3iv = (PFNGLNORMAL3IVPROC) load("glNormal3iv", userptr); 961 | glNormal3s = (PFNGLNORMAL3SPROC) load("glNormal3s", userptr); 962 | glNormal3sv = (PFNGLNORMAL3SVPROC) load("glNormal3sv", userptr); 963 | glOrtho = (PFNGLORTHOPROC) load("glOrtho", userptr); 964 | glPassThrough = (PFNGLPASSTHROUGHPROC) load("glPassThrough", userptr); 965 | glPixelMapfv = (PFNGLPIXELMAPFVPROC) load("glPixelMapfv", userptr); 966 | glPixelMapuiv = (PFNGLPIXELMAPUIVPROC) load("glPixelMapuiv", userptr); 967 | glPixelMapusv = (PFNGLPIXELMAPUSVPROC) load("glPixelMapusv", userptr); 968 | glPixelStoref = (PFNGLPIXELSTOREFPROC) load("glPixelStoref", userptr); 969 | glPixelStorei = (PFNGLPIXELSTOREIPROC) load("glPixelStorei", userptr); 970 | glPixelTransferf = (PFNGLPIXELTRANSFERFPROC) load("glPixelTransferf", userptr); 971 | glPixelTransferi = (PFNGLPIXELTRANSFERIPROC) load("glPixelTransferi", userptr); 972 | glPixelZoom = (PFNGLPIXELZOOMPROC) load("glPixelZoom", userptr); 973 | glPointSize = (PFNGLPOINTSIZEPROC) load("glPointSize", userptr); 974 | glPolygonMode = (PFNGLPOLYGONMODEPROC) load("glPolygonMode", userptr); 975 | glPolygonStipple = (PFNGLPOLYGONSTIPPLEPROC) load("glPolygonStipple", userptr); 976 | glPopAttrib = (PFNGLPOPATTRIBPROC) load("glPopAttrib", userptr); 977 | glPopMatrix = (PFNGLPOPMATRIXPROC) load("glPopMatrix", userptr); 978 | glPopName = (PFNGLPOPNAMEPROC) load("glPopName", userptr); 979 | glPushAttrib = (PFNGLPUSHATTRIBPROC) load("glPushAttrib", userptr); 980 | glPushMatrix = (PFNGLPUSHMATRIXPROC) load("glPushMatrix", userptr); 981 | glPushName = (PFNGLPUSHNAMEPROC) load("glPushName", userptr); 982 | glRasterPos2d = (PFNGLRASTERPOS2DPROC) load("glRasterPos2d", userptr); 983 | glRasterPos2dv = (PFNGLRASTERPOS2DVPROC) load("glRasterPos2dv", userptr); 984 | glRasterPos2f = (PFNGLRASTERPOS2FPROC) load("glRasterPos2f", userptr); 985 | glRasterPos2fv = (PFNGLRASTERPOS2FVPROC) load("glRasterPos2fv", userptr); 986 | glRasterPos2i = (PFNGLRASTERPOS2IPROC) load("glRasterPos2i", userptr); 987 | glRasterPos2iv = (PFNGLRASTERPOS2IVPROC) load("glRasterPos2iv", userptr); 988 | glRasterPos2s = (PFNGLRASTERPOS2SPROC) load("glRasterPos2s", userptr); 989 | glRasterPos2sv = (PFNGLRASTERPOS2SVPROC) load("glRasterPos2sv", userptr); 990 | glRasterPos3d = (PFNGLRASTERPOS3DPROC) load("glRasterPos3d", userptr); 991 | glRasterPos3dv = (PFNGLRASTERPOS3DVPROC) load("glRasterPos3dv", userptr); 992 | glRasterPos3f = (PFNGLRASTERPOS3FPROC) load("glRasterPos3f", userptr); 993 | glRasterPos3fv = (PFNGLRASTERPOS3FVPROC) load("glRasterPos3fv", userptr); 994 | glRasterPos3i = (PFNGLRASTERPOS3IPROC) load("glRasterPos3i", userptr); 995 | glRasterPos3iv = (PFNGLRASTERPOS3IVPROC) load("glRasterPos3iv", userptr); 996 | glRasterPos3s = (PFNGLRASTERPOS3SPROC) load("glRasterPos3s", userptr); 997 | glRasterPos3sv = (PFNGLRASTERPOS3SVPROC) load("glRasterPos3sv", userptr); 998 | glRasterPos4d = (PFNGLRASTERPOS4DPROC) load("glRasterPos4d", userptr); 999 | glRasterPos4dv = (PFNGLRASTERPOS4DVPROC) load("glRasterPos4dv", userptr); 1000 | glRasterPos4f = (PFNGLRASTERPOS4FPROC) load("glRasterPos4f", userptr); 1001 | glRasterPos4fv = (PFNGLRASTERPOS4FVPROC) load("glRasterPos4fv", userptr); 1002 | glRasterPos4i = (PFNGLRASTERPOS4IPROC) load("glRasterPos4i", userptr); 1003 | glRasterPos4iv = (PFNGLRASTERPOS4IVPROC) load("glRasterPos4iv", userptr); 1004 | glRasterPos4s = (PFNGLRASTERPOS4SPROC) load("glRasterPos4s", userptr); 1005 | glRasterPos4sv = (PFNGLRASTERPOS4SVPROC) load("glRasterPos4sv", userptr); 1006 | glReadBuffer = (PFNGLREADBUFFERPROC) load("glReadBuffer", userptr); 1007 | glReadPixels = (PFNGLREADPIXELSPROC) load("glReadPixels", userptr); 1008 | glRectd = (PFNGLRECTDPROC) load("glRectd", userptr); 1009 | glRectdv = (PFNGLRECTDVPROC) load("glRectdv", userptr); 1010 | glRectf = (PFNGLRECTFPROC) load("glRectf", userptr); 1011 | glRectfv = (PFNGLRECTFVPROC) load("glRectfv", userptr); 1012 | glRecti = (PFNGLRECTIPROC) load("glRecti", userptr); 1013 | glRectiv = (PFNGLRECTIVPROC) load("glRectiv", userptr); 1014 | glRects = (PFNGLRECTSPROC) load("glRects", userptr); 1015 | glRectsv = (PFNGLRECTSVPROC) load("glRectsv", userptr); 1016 | glRenderMode = (PFNGLRENDERMODEPROC) load("glRenderMode", userptr); 1017 | glRotated = (PFNGLROTATEDPROC) load("glRotated", userptr); 1018 | glRotatef = (PFNGLROTATEFPROC) load("glRotatef", userptr); 1019 | glScaled = (PFNGLSCALEDPROC) load("glScaled", userptr); 1020 | glScalef = (PFNGLSCALEFPROC) load("glScalef", userptr); 1021 | glScissor = (PFNGLSCISSORPROC) load("glScissor", userptr); 1022 | glSelectBuffer = (PFNGLSELECTBUFFERPROC) load("glSelectBuffer", userptr); 1023 | glShadeModel = (PFNGLSHADEMODELPROC) load("glShadeModel", userptr); 1024 | glStencilFunc = (PFNGLSTENCILFUNCPROC) load("glStencilFunc", userptr); 1025 | glStencilMask = (PFNGLSTENCILMASKPROC) load("glStencilMask", userptr); 1026 | glStencilOp = (PFNGLSTENCILOPPROC) load("glStencilOp", userptr); 1027 | glTexCoord1d = (PFNGLTEXCOORD1DPROC) load("glTexCoord1d", userptr); 1028 | glTexCoord1dv = (PFNGLTEXCOORD1DVPROC) load("glTexCoord1dv", userptr); 1029 | glTexCoord1f = (PFNGLTEXCOORD1FPROC) load("glTexCoord1f", userptr); 1030 | glTexCoord1fv = (PFNGLTEXCOORD1FVPROC) load("glTexCoord1fv", userptr); 1031 | glTexCoord1i = (PFNGLTEXCOORD1IPROC) load("glTexCoord1i", userptr); 1032 | glTexCoord1iv = (PFNGLTEXCOORD1IVPROC) load("glTexCoord1iv", userptr); 1033 | glTexCoord1s = (PFNGLTEXCOORD1SPROC) load("glTexCoord1s", userptr); 1034 | glTexCoord1sv = (PFNGLTEXCOORD1SVPROC) load("glTexCoord1sv", userptr); 1035 | glTexCoord2d = (PFNGLTEXCOORD2DPROC) load("glTexCoord2d", userptr); 1036 | glTexCoord2dv = (PFNGLTEXCOORD2DVPROC) load("glTexCoord2dv", userptr); 1037 | glTexCoord2f = (PFNGLTEXCOORD2FPROC) load("glTexCoord2f", userptr); 1038 | glTexCoord2fv = (PFNGLTEXCOORD2FVPROC) load("glTexCoord2fv", userptr); 1039 | glTexCoord2i = (PFNGLTEXCOORD2IPROC) load("glTexCoord2i", userptr); 1040 | glTexCoord2iv = (PFNGLTEXCOORD2IVPROC) load("glTexCoord2iv", userptr); 1041 | glTexCoord2s = (PFNGLTEXCOORD2SPROC) load("glTexCoord2s", userptr); 1042 | glTexCoord2sv = (PFNGLTEXCOORD2SVPROC) load("glTexCoord2sv", userptr); 1043 | glTexCoord3d = (PFNGLTEXCOORD3DPROC) load("glTexCoord3d", userptr); 1044 | glTexCoord3dv = (PFNGLTEXCOORD3DVPROC) load("glTexCoord3dv", userptr); 1045 | glTexCoord3f = (PFNGLTEXCOORD3FPROC) load("glTexCoord3f", userptr); 1046 | glTexCoord3fv = (PFNGLTEXCOORD3FVPROC) load("glTexCoord3fv", userptr); 1047 | glTexCoord3i = (PFNGLTEXCOORD3IPROC) load("glTexCoord3i", userptr); 1048 | glTexCoord3iv = (PFNGLTEXCOORD3IVPROC) load("glTexCoord3iv", userptr); 1049 | glTexCoord3s = (PFNGLTEXCOORD3SPROC) load("glTexCoord3s", userptr); 1050 | glTexCoord3sv = (PFNGLTEXCOORD3SVPROC) load("glTexCoord3sv", userptr); 1051 | glTexCoord4d = (PFNGLTEXCOORD4DPROC) load("glTexCoord4d", userptr); 1052 | glTexCoord4dv = (PFNGLTEXCOORD4DVPROC) load("glTexCoord4dv", userptr); 1053 | glTexCoord4f = (PFNGLTEXCOORD4FPROC) load("glTexCoord4f", userptr); 1054 | glTexCoord4fv = (PFNGLTEXCOORD4FVPROC) load("glTexCoord4fv", userptr); 1055 | glTexCoord4i = (PFNGLTEXCOORD4IPROC) load("glTexCoord4i", userptr); 1056 | glTexCoord4iv = (PFNGLTEXCOORD4IVPROC) load("glTexCoord4iv", userptr); 1057 | glTexCoord4s = (PFNGLTEXCOORD4SPROC) load("glTexCoord4s", userptr); 1058 | glTexCoord4sv = (PFNGLTEXCOORD4SVPROC) load("glTexCoord4sv", userptr); 1059 | glTexEnvf = (PFNGLTEXENVFPROC) load("glTexEnvf", userptr); 1060 | glTexEnvfv = (PFNGLTEXENVFVPROC) load("glTexEnvfv", userptr); 1061 | glTexEnvi = (PFNGLTEXENVIPROC) load("glTexEnvi", userptr); 1062 | glTexEnviv = (PFNGLTEXENVIVPROC) load("glTexEnviv", userptr); 1063 | glTexGend = (PFNGLTEXGENDPROC) load("glTexGend", userptr); 1064 | glTexGendv = (PFNGLTEXGENDVPROC) load("glTexGendv", userptr); 1065 | glTexGenf = (PFNGLTEXGENFPROC) load("glTexGenf", userptr); 1066 | glTexGenfv = (PFNGLTEXGENFVPROC) load("glTexGenfv", userptr); 1067 | glTexGeni = (PFNGLTEXGENIPROC) load("glTexGeni", userptr); 1068 | glTexGeniv = (PFNGLTEXGENIVPROC) load("glTexGeniv", userptr); 1069 | glTexImage1D = (PFNGLTEXIMAGE1DPROC) load("glTexImage1D", userptr); 1070 | glTexImage2D = (PFNGLTEXIMAGE2DPROC) load("glTexImage2D", userptr); 1071 | glTexParameterf = (PFNGLTEXPARAMETERFPROC) load("glTexParameterf", userptr); 1072 | glTexParameterfv = (PFNGLTEXPARAMETERFVPROC) load("glTexParameterfv", userptr); 1073 | glTexParameteri = (PFNGLTEXPARAMETERIPROC) load("glTexParameteri", userptr); 1074 | glTexParameteriv = (PFNGLTEXPARAMETERIVPROC) load("glTexParameteriv", userptr); 1075 | glTranslated = (PFNGLTRANSLATEDPROC) load("glTranslated", userptr); 1076 | glTranslatef = (PFNGLTRANSLATEFPROC) load("glTranslatef", userptr); 1077 | glVertex2d = (PFNGLVERTEX2DPROC) load("glVertex2d", userptr); 1078 | glVertex2dv = (PFNGLVERTEX2DVPROC) load("glVertex2dv", userptr); 1079 | glVertex2f = (PFNGLVERTEX2FPROC) load("glVertex2f", userptr); 1080 | glVertex2fv = (PFNGLVERTEX2FVPROC) load("glVertex2fv", userptr); 1081 | glVertex2i = (PFNGLVERTEX2IPROC) load("glVertex2i", userptr); 1082 | glVertex2iv = (PFNGLVERTEX2IVPROC) load("glVertex2iv", userptr); 1083 | glVertex2s = (PFNGLVERTEX2SPROC) load("glVertex2s", userptr); 1084 | glVertex2sv = (PFNGLVERTEX2SVPROC) load("glVertex2sv", userptr); 1085 | glVertex3d = (PFNGLVERTEX3DPROC) load("glVertex3d", userptr); 1086 | glVertex3dv = (PFNGLVERTEX3DVPROC) load("glVertex3dv", userptr); 1087 | glVertex3f = (PFNGLVERTEX3FPROC) load("glVertex3f", userptr); 1088 | glVertex3fv = (PFNGLVERTEX3FVPROC) load("glVertex3fv", userptr); 1089 | glVertex3i = (PFNGLVERTEX3IPROC) load("glVertex3i", userptr); 1090 | glVertex3iv = (PFNGLVERTEX3IVPROC) load("glVertex3iv", userptr); 1091 | glVertex3s = (PFNGLVERTEX3SPROC) load("glVertex3s", userptr); 1092 | glVertex3sv = (PFNGLVERTEX3SVPROC) load("glVertex3sv", userptr); 1093 | glVertex4d = (PFNGLVERTEX4DPROC) load("glVertex4d", userptr); 1094 | glVertex4dv = (PFNGLVERTEX4DVPROC) load("glVertex4dv", userptr); 1095 | glVertex4f = (PFNGLVERTEX4FPROC) load("glVertex4f", userptr); 1096 | glVertex4fv = (PFNGLVERTEX4FVPROC) load("glVertex4fv", userptr); 1097 | glVertex4i = (PFNGLVERTEX4IPROC) load("glVertex4i", userptr); 1098 | glVertex4iv = (PFNGLVERTEX4IVPROC) load("glVertex4iv", userptr); 1099 | glVertex4s = (PFNGLVERTEX4SPROC) load("glVertex4s", userptr); 1100 | glVertex4sv = (PFNGLVERTEX4SVPROC) load("glVertex4sv", userptr); 1101 | glViewport = (PFNGLVIEWPORTPROC) load("glViewport", userptr); 1102 | } 1103 | static void glad_gl_load_GL_VERSION_1_1( GLADuserptrloadfunc load, void* userptr) { 1104 | if(!GLAD_GL_VERSION_1_1) return; 1105 | glAreTexturesResident = (PFNGLARETEXTURESRESIDENTPROC) load("glAreTexturesResident", userptr); 1106 | glArrayElement = (PFNGLARRAYELEMENTPROC) load("glArrayElement", userptr); 1107 | glBindTexture = (PFNGLBINDTEXTUREPROC) load("glBindTexture", userptr); 1108 | glColorPointer = (PFNGLCOLORPOINTERPROC) load("glColorPointer", userptr); 1109 | glCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC) load("glCopyTexImage1D", userptr); 1110 | glCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC) load("glCopyTexImage2D", userptr); 1111 | glCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC) load("glCopyTexSubImage1D", userptr); 1112 | glCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC) load("glCopyTexSubImage2D", userptr); 1113 | glDeleteTextures = (PFNGLDELETETEXTURESPROC) load("glDeleteTextures", userptr); 1114 | glDisableClientState = (PFNGLDISABLECLIENTSTATEPROC) load("glDisableClientState", userptr); 1115 | glDrawArrays = (PFNGLDRAWARRAYSPROC) load("glDrawArrays", userptr); 1116 | glDrawElements = (PFNGLDRAWELEMENTSPROC) load("glDrawElements", userptr); 1117 | glEdgeFlagPointer = (PFNGLEDGEFLAGPOINTERPROC) load("glEdgeFlagPointer", userptr); 1118 | glEnableClientState = (PFNGLENABLECLIENTSTATEPROC) load("glEnableClientState", userptr); 1119 | glGenTextures = (PFNGLGENTEXTURESPROC) load("glGenTextures", userptr); 1120 | glGetPointerv = (PFNGLGETPOINTERVPROC) load("glGetPointerv", userptr); 1121 | glIndexPointer = (PFNGLINDEXPOINTERPROC) load("glIndexPointer", userptr); 1122 | glIndexub = (PFNGLINDEXUBPROC) load("glIndexub", userptr); 1123 | glIndexubv = (PFNGLINDEXUBVPROC) load("glIndexubv", userptr); 1124 | glInterleavedArrays = (PFNGLINTERLEAVEDARRAYSPROC) load("glInterleavedArrays", userptr); 1125 | glIsTexture = (PFNGLISTEXTUREPROC) load("glIsTexture", userptr); 1126 | glNormalPointer = (PFNGLNORMALPOINTERPROC) load("glNormalPointer", userptr); 1127 | glPolygonOffset = (PFNGLPOLYGONOFFSETPROC) load("glPolygonOffset", userptr); 1128 | glPopClientAttrib = (PFNGLPOPCLIENTATTRIBPROC) load("glPopClientAttrib", userptr); 1129 | glPrioritizeTextures = (PFNGLPRIORITIZETEXTURESPROC) load("glPrioritizeTextures", userptr); 1130 | glPushClientAttrib = (PFNGLPUSHCLIENTATTRIBPROC) load("glPushClientAttrib", userptr); 1131 | glTexCoordPointer = (PFNGLTEXCOORDPOINTERPROC) load("glTexCoordPointer", userptr); 1132 | glTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC) load("glTexSubImage1D", userptr); 1133 | glTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) load("glTexSubImage2D", userptr); 1134 | glVertexPointer = (PFNGLVERTEXPOINTERPROC) load("glVertexPointer", userptr); 1135 | } 1136 | static void glad_gl_load_GL_VERSION_1_2( GLADuserptrloadfunc load, void* userptr) { 1137 | if(!GLAD_GL_VERSION_1_2) return; 1138 | glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC) load("glCopyTexSubImage3D", userptr); 1139 | glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) load("glDrawRangeElements", userptr); 1140 | glTexImage3D = (PFNGLTEXIMAGE3DPROC) load("glTexImage3D", userptr); 1141 | glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) load("glTexSubImage3D", userptr); 1142 | } 1143 | static void glad_gl_load_GL_VERSION_1_3( GLADuserptrloadfunc load, void* userptr) { 1144 | if(!GLAD_GL_VERSION_1_3) return; 1145 | glActiveTexture = (PFNGLACTIVETEXTUREPROC) load("glActiveTexture", userptr); 1146 | glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC) load("glClientActiveTexture", userptr); 1147 | glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC) load("glCompressedTexImage1D", userptr); 1148 | glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) load("glCompressedTexImage2D", userptr); 1149 | glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC) load("glCompressedTexImage3D", userptr); 1150 | glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) load("glCompressedTexSubImage1D", userptr); 1151 | glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) load("glCompressedTexSubImage2D", userptr); 1152 | glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) load("glCompressedTexSubImage3D", userptr); 1153 | glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC) load("glGetCompressedTexImage", userptr); 1154 | glLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC) load("glLoadTransposeMatrixd", userptr); 1155 | glLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC) load("glLoadTransposeMatrixf", userptr); 1156 | glMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC) load("glMultTransposeMatrixd", userptr); 1157 | glMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC) load("glMultTransposeMatrixf", userptr); 1158 | glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC) load("glMultiTexCoord1d", userptr); 1159 | glMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC) load("glMultiTexCoord1dv", userptr); 1160 | glMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC) load("glMultiTexCoord1f", userptr); 1161 | glMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC) load("glMultiTexCoord1fv", userptr); 1162 | glMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC) load("glMultiTexCoord1i", userptr); 1163 | glMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC) load("glMultiTexCoord1iv", userptr); 1164 | glMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC) load("glMultiTexCoord1s", userptr); 1165 | glMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC) load("glMultiTexCoord1sv", userptr); 1166 | glMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC) load("glMultiTexCoord2d", userptr); 1167 | glMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC) load("glMultiTexCoord2dv", userptr); 1168 | glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC) load("glMultiTexCoord2f", userptr); 1169 | glMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC) load("glMultiTexCoord2fv", userptr); 1170 | glMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC) load("glMultiTexCoord2i", userptr); 1171 | glMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC) load("glMultiTexCoord2iv", userptr); 1172 | glMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC) load("glMultiTexCoord2s", userptr); 1173 | glMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC) load("glMultiTexCoord2sv", userptr); 1174 | glMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC) load("glMultiTexCoord3d", userptr); 1175 | glMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC) load("glMultiTexCoord3dv", userptr); 1176 | glMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC) load("glMultiTexCoord3f", userptr); 1177 | glMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC) load("glMultiTexCoord3fv", userptr); 1178 | glMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC) load("glMultiTexCoord3i", userptr); 1179 | glMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC) load("glMultiTexCoord3iv", userptr); 1180 | glMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC) load("glMultiTexCoord3s", userptr); 1181 | glMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC) load("glMultiTexCoord3sv", userptr); 1182 | glMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC) load("glMultiTexCoord4d", userptr); 1183 | glMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC) load("glMultiTexCoord4dv", userptr); 1184 | glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC) load("glMultiTexCoord4f", userptr); 1185 | glMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC) load("glMultiTexCoord4fv", userptr); 1186 | glMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC) load("glMultiTexCoord4i", userptr); 1187 | glMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC) load("glMultiTexCoord4iv", userptr); 1188 | glMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC) load("glMultiTexCoord4s", userptr); 1189 | glMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC) load("glMultiTexCoord4sv", userptr); 1190 | glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load("glSampleCoverage", userptr); 1191 | } 1192 | static void glad_gl_load_GL_VERSION_1_4( GLADuserptrloadfunc load, void* userptr) { 1193 | if(!GLAD_GL_VERSION_1_4) return; 1194 | glBlendColor = (PFNGLBLENDCOLORPROC) load("glBlendColor", userptr); 1195 | glBlendEquation = (PFNGLBLENDEQUATIONPROC) load("glBlendEquation", userptr); 1196 | glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) load("glBlendFuncSeparate", userptr); 1197 | glFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC) load("glFogCoordPointer", userptr); 1198 | glFogCoordd = (PFNGLFOGCOORDDPROC) load("glFogCoordd", userptr); 1199 | glFogCoorddv = (PFNGLFOGCOORDDVPROC) load("glFogCoorddv", userptr); 1200 | glFogCoordf = (PFNGLFOGCOORDFPROC) load("glFogCoordf", userptr); 1201 | glFogCoordfv = (PFNGLFOGCOORDFVPROC) load("glFogCoordfv", userptr); 1202 | glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC) load("glMultiDrawArrays", userptr); 1203 | glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC) load("glMultiDrawElements", userptr); 1204 | glPointParameterf = (PFNGLPOINTPARAMETERFPROC) load("glPointParameterf", userptr); 1205 | glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC) load("glPointParameterfv", userptr); 1206 | glPointParameteri = (PFNGLPOINTPARAMETERIPROC) load("glPointParameteri", userptr); 1207 | glPointParameteriv = (PFNGLPOINTPARAMETERIVPROC) load("glPointParameteriv", userptr); 1208 | glSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC) load("glSecondaryColor3b", userptr); 1209 | glSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC) load("glSecondaryColor3bv", userptr); 1210 | glSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC) load("glSecondaryColor3d", userptr); 1211 | glSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC) load("glSecondaryColor3dv", userptr); 1212 | glSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC) load("glSecondaryColor3f", userptr); 1213 | glSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC) load("glSecondaryColor3fv", userptr); 1214 | glSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC) load("glSecondaryColor3i", userptr); 1215 | glSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC) load("glSecondaryColor3iv", userptr); 1216 | glSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC) load("glSecondaryColor3s", userptr); 1217 | glSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC) load("glSecondaryColor3sv", userptr); 1218 | glSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC) load("glSecondaryColor3ub", userptr); 1219 | glSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC) load("glSecondaryColor3ubv", userptr); 1220 | glSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC) load("glSecondaryColor3ui", userptr); 1221 | glSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC) load("glSecondaryColor3uiv", userptr); 1222 | glSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC) load("glSecondaryColor3us", userptr); 1223 | glSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC) load("glSecondaryColor3usv", userptr); 1224 | glSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC) load("glSecondaryColorPointer", userptr); 1225 | glWindowPos2d = (PFNGLWINDOWPOS2DPROC) load("glWindowPos2d", userptr); 1226 | glWindowPos2dv = (PFNGLWINDOWPOS2DVPROC) load("glWindowPos2dv", userptr); 1227 | glWindowPos2f = (PFNGLWINDOWPOS2FPROC) load("glWindowPos2f", userptr); 1228 | glWindowPos2fv = (PFNGLWINDOWPOS2FVPROC) load("glWindowPos2fv", userptr); 1229 | glWindowPos2i = (PFNGLWINDOWPOS2IPROC) load("glWindowPos2i", userptr); 1230 | glWindowPos2iv = (PFNGLWINDOWPOS2IVPROC) load("glWindowPos2iv", userptr); 1231 | glWindowPos2s = (PFNGLWINDOWPOS2SPROC) load("glWindowPos2s", userptr); 1232 | glWindowPos2sv = (PFNGLWINDOWPOS2SVPROC) load("glWindowPos2sv", userptr); 1233 | glWindowPos3d = (PFNGLWINDOWPOS3DPROC) load("glWindowPos3d", userptr); 1234 | glWindowPos3dv = (PFNGLWINDOWPOS3DVPROC) load("glWindowPos3dv", userptr); 1235 | glWindowPos3f = (PFNGLWINDOWPOS3FPROC) load("glWindowPos3f", userptr); 1236 | glWindowPos3fv = (PFNGLWINDOWPOS3FVPROC) load("glWindowPos3fv", userptr); 1237 | glWindowPos3i = (PFNGLWINDOWPOS3IPROC) load("glWindowPos3i", userptr); 1238 | glWindowPos3iv = (PFNGLWINDOWPOS3IVPROC) load("glWindowPos3iv", userptr); 1239 | glWindowPos3s = (PFNGLWINDOWPOS3SPROC) load("glWindowPos3s", userptr); 1240 | glWindowPos3sv = (PFNGLWINDOWPOS3SVPROC) load("glWindowPos3sv", userptr); 1241 | } 1242 | static void glad_gl_load_GL_VERSION_1_5( GLADuserptrloadfunc load, void* userptr) { 1243 | if(!GLAD_GL_VERSION_1_5) return; 1244 | glBeginQuery = (PFNGLBEGINQUERYPROC) load("glBeginQuery", userptr); 1245 | glBindBuffer = (PFNGLBINDBUFFERPROC) load("glBindBuffer", userptr); 1246 | glBufferData = (PFNGLBUFFERDATAPROC) load("glBufferData", userptr); 1247 | glBufferSubData = (PFNGLBUFFERSUBDATAPROC) load("glBufferSubData", userptr); 1248 | glDeleteBuffers = (PFNGLDELETEBUFFERSPROC) load("glDeleteBuffers", userptr); 1249 | glDeleteQueries = (PFNGLDELETEQUERIESPROC) load("glDeleteQueries", userptr); 1250 | glEndQuery = (PFNGLENDQUERYPROC) load("glEndQuery", userptr); 1251 | glGenBuffers = (PFNGLGENBUFFERSPROC) load("glGenBuffers", userptr); 1252 | glGenQueries = (PFNGLGENQUERIESPROC) load("glGenQueries", userptr); 1253 | glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC) load("glGetBufferParameteriv", userptr); 1254 | glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC) load("glGetBufferPointerv", userptr); 1255 | glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC) load("glGetBufferSubData", userptr); 1256 | glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC) load("glGetQueryObjectiv", userptr); 1257 | glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC) load("glGetQueryObjectuiv", userptr); 1258 | glGetQueryiv = (PFNGLGETQUERYIVPROC) load("glGetQueryiv", userptr); 1259 | glIsBuffer = (PFNGLISBUFFERPROC) load("glIsBuffer", userptr); 1260 | glIsQuery = (PFNGLISQUERYPROC) load("glIsQuery", userptr); 1261 | glMapBuffer = (PFNGLMAPBUFFERPROC) load("glMapBuffer", userptr); 1262 | glUnmapBuffer = (PFNGLUNMAPBUFFERPROC) load("glUnmapBuffer", userptr); 1263 | } 1264 | static void glad_gl_load_GL_VERSION_2_0( GLADuserptrloadfunc load, void* userptr) { 1265 | if(!GLAD_GL_VERSION_2_0) return; 1266 | glAttachShader = (PFNGLATTACHSHADERPROC) load("glAttachShader", userptr); 1267 | glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC) load("glBindAttribLocation", userptr); 1268 | glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) load("glBlendEquationSeparate", userptr); 1269 | glCompileShader = (PFNGLCOMPILESHADERPROC) load("glCompileShader", userptr); 1270 | glCreateProgram = (PFNGLCREATEPROGRAMPROC) load("glCreateProgram", userptr); 1271 | glCreateShader = (PFNGLCREATESHADERPROC) load("glCreateShader", userptr); 1272 | glDeleteProgram = (PFNGLDELETEPROGRAMPROC) load("glDeleteProgram", userptr); 1273 | glDeleteShader = (PFNGLDELETESHADERPROC) load("glDeleteShader", userptr); 1274 | glDetachShader = (PFNGLDETACHSHADERPROC) load("glDetachShader", userptr); 1275 | glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) load("glDisableVertexAttribArray", userptr); 1276 | glDrawBuffers = (PFNGLDRAWBUFFERSPROC) load("glDrawBuffers", userptr); 1277 | glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) load("glEnableVertexAttribArray", userptr); 1278 | glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) load("glGetActiveAttrib", userptr); 1279 | glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) load("glGetActiveUniform", userptr); 1280 | glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) load("glGetAttachedShaders", userptr); 1281 | glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) load("glGetAttribLocation", userptr); 1282 | glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) load("glGetProgramInfoLog", userptr); 1283 | glGetProgramiv = (PFNGLGETPROGRAMIVPROC) load("glGetProgramiv", userptr); 1284 | glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) load("glGetShaderInfoLog", userptr); 1285 | glGetShaderSource = (PFNGLGETSHADERSOURCEPROC) load("glGetShaderSource", userptr); 1286 | glGetShaderiv = (PFNGLGETSHADERIVPROC) load("glGetShaderiv", userptr); 1287 | glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) load("glGetUniformLocation", userptr); 1288 | glGetUniformfv = (PFNGLGETUNIFORMFVPROC) load("glGetUniformfv", userptr); 1289 | glGetUniformiv = (PFNGLGETUNIFORMIVPROC) load("glGetUniformiv", userptr); 1290 | glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC) load("glGetVertexAttribPointerv", userptr); 1291 | glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC) load("glGetVertexAttribdv", userptr); 1292 | glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC) load("glGetVertexAttribfv", userptr); 1293 | glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC) load("glGetVertexAttribiv", userptr); 1294 | glIsProgram = (PFNGLISPROGRAMPROC) load("glIsProgram", userptr); 1295 | glIsShader = (PFNGLISSHADERPROC) load("glIsShader", userptr); 1296 | glLinkProgram = (PFNGLLINKPROGRAMPROC) load("glLinkProgram", userptr); 1297 | glShaderSource = (PFNGLSHADERSOURCEPROC) load("glShaderSource", userptr); 1298 | glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) load("glStencilFuncSeparate", userptr); 1299 | glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) load("glStencilMaskSeparate", userptr); 1300 | glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) load("glStencilOpSeparate", userptr); 1301 | glUniform1f = (PFNGLUNIFORM1FPROC) load("glUniform1f", userptr); 1302 | glUniform1fv = (PFNGLUNIFORM1FVPROC) load("glUniform1fv", userptr); 1303 | glUniform1i = (PFNGLUNIFORM1IPROC) load("glUniform1i", userptr); 1304 | glUniform1iv = (PFNGLUNIFORM1IVPROC) load("glUniform1iv", userptr); 1305 | glUniform2f = (PFNGLUNIFORM2FPROC) load("glUniform2f", userptr); 1306 | glUniform2fv = (PFNGLUNIFORM2FVPROC) load("glUniform2fv", userptr); 1307 | glUniform2i = (PFNGLUNIFORM2IPROC) load("glUniform2i", userptr); 1308 | glUniform2iv = (PFNGLUNIFORM2IVPROC) load("glUniform2iv", userptr); 1309 | glUniform3f = (PFNGLUNIFORM3FPROC) load("glUniform3f", userptr); 1310 | glUniform3fv = (PFNGLUNIFORM3FVPROC) load("glUniform3fv", userptr); 1311 | glUniform3i = (PFNGLUNIFORM3IPROC) load("glUniform3i", userptr); 1312 | glUniform3iv = (PFNGLUNIFORM3IVPROC) load("glUniform3iv", userptr); 1313 | glUniform4f = (PFNGLUNIFORM4FPROC) load("glUniform4f", userptr); 1314 | glUniform4fv = (PFNGLUNIFORM4FVPROC) load("glUniform4fv", userptr); 1315 | glUniform4i = (PFNGLUNIFORM4IPROC) load("glUniform4i", userptr); 1316 | glUniform4iv = (PFNGLUNIFORM4IVPROC) load("glUniform4iv", userptr); 1317 | glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC) load("glUniformMatrix2fv", userptr); 1318 | glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC) load("glUniformMatrix3fv", userptr); 1319 | glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) load("glUniformMatrix4fv", userptr); 1320 | glUseProgram = (PFNGLUSEPROGRAMPROC) load("glUseProgram", userptr); 1321 | glValidateProgram = (PFNGLVALIDATEPROGRAMPROC) load("glValidateProgram", userptr); 1322 | glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC) load("glVertexAttrib1d", userptr); 1323 | glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC) load("glVertexAttrib1dv", userptr); 1324 | glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) load("glVertexAttrib1f", userptr); 1325 | glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC) load("glVertexAttrib1fv", userptr); 1326 | glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC) load("glVertexAttrib1s", userptr); 1327 | glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC) load("glVertexAttrib1sv", userptr); 1328 | glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC) load("glVertexAttrib2d", userptr); 1329 | glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC) load("glVertexAttrib2dv", userptr); 1330 | glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) load("glVertexAttrib2f", userptr); 1331 | glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC) load("glVertexAttrib2fv", userptr); 1332 | glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC) load("glVertexAttrib2s", userptr); 1333 | glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC) load("glVertexAttrib2sv", userptr); 1334 | glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC) load("glVertexAttrib3d", userptr); 1335 | glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC) load("glVertexAttrib3dv", userptr); 1336 | glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC) load("glVertexAttrib3f", userptr); 1337 | glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC) load("glVertexAttrib3fv", userptr); 1338 | glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC) load("glVertexAttrib3s", userptr); 1339 | glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC) load("glVertexAttrib3sv", userptr); 1340 | glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC) load("glVertexAttrib4Nbv", userptr); 1341 | glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC) load("glVertexAttrib4Niv", userptr); 1342 | glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC) load("glVertexAttrib4Nsv", userptr); 1343 | glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC) load("glVertexAttrib4Nub", userptr); 1344 | glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC) load("glVertexAttrib4Nubv", userptr); 1345 | glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC) load("glVertexAttrib4Nuiv", userptr); 1346 | glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC) load("glVertexAttrib4Nusv", userptr); 1347 | glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC) load("glVertexAttrib4bv", userptr); 1348 | glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC) load("glVertexAttrib4d", userptr); 1349 | glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC) load("glVertexAttrib4dv", userptr); 1350 | glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC) load("glVertexAttrib4f", userptr); 1351 | glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC) load("glVertexAttrib4fv", userptr); 1352 | glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC) load("glVertexAttrib4iv", userptr); 1353 | glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC) load("glVertexAttrib4s", userptr); 1354 | glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC) load("glVertexAttrib4sv", userptr); 1355 | glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC) load("glVertexAttrib4ubv", userptr); 1356 | glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC) load("glVertexAttrib4uiv", userptr); 1357 | glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC) load("glVertexAttrib4usv", userptr); 1358 | glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) load("glVertexAttribPointer", userptr); 1359 | } 1360 | static void glad_gl_load_GL_VERSION_2_1( GLADuserptrloadfunc load, void* userptr) { 1361 | if(!GLAD_GL_VERSION_2_1) return; 1362 | glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC) load("glUniformMatrix2x3fv", userptr); 1363 | glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC) load("glUniformMatrix2x4fv", userptr); 1364 | glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC) load("glUniformMatrix3x2fv", userptr); 1365 | glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) load("glUniformMatrix3x4fv", userptr); 1366 | glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC) load("glUniformMatrix4x2fv", userptr); 1367 | glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC) load("glUniformMatrix4x3fv", userptr); 1368 | } 1369 | static void glad_gl_load_GL_VERSION_3_0( GLADuserptrloadfunc load, void* userptr) { 1370 | if(!GLAD_GL_VERSION_3_0) return; 1371 | glBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC) load("glBeginConditionalRender", userptr); 1372 | glBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC) load("glBeginTransformFeedback", userptr); 1373 | glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) load("glBindBufferBase", userptr); 1374 | glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load("glBindBufferRange", userptr); 1375 | glBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC) load("glBindFragDataLocation", userptr); 1376 | glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) load("glBindFramebuffer", userptr); 1377 | glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) load("glBindRenderbuffer", userptr); 1378 | glBindVertexArray = (PFNGLBINDVERTEXARRAYPROC) load("glBindVertexArray", userptr); 1379 | glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) load("glBlitFramebuffer", userptr); 1380 | glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) load("glCheckFramebufferStatus", userptr); 1381 | glClampColor = (PFNGLCLAMPCOLORPROC) load("glClampColor", userptr); 1382 | glClearBufferfi = (PFNGLCLEARBUFFERFIPROC) load("glClearBufferfi", userptr); 1383 | glClearBufferfv = (PFNGLCLEARBUFFERFVPROC) load("glClearBufferfv", userptr); 1384 | glClearBufferiv = (PFNGLCLEARBUFFERIVPROC) load("glClearBufferiv", userptr); 1385 | glClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC) load("glClearBufferuiv", userptr); 1386 | glColorMaski = (PFNGLCOLORMASKIPROC) load("glColorMaski", userptr); 1387 | glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) load("glDeleteFramebuffers", userptr); 1388 | glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) load("glDeleteRenderbuffers", userptr); 1389 | glDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) load("glDeleteVertexArrays", userptr); 1390 | glDisablei = (PFNGLDISABLEIPROC) load("glDisablei", userptr); 1391 | glEnablei = (PFNGLENABLEIPROC) load("glEnablei", userptr); 1392 | glEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC) load("glEndConditionalRender", userptr); 1393 | glEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) load("glEndTransformFeedback", userptr); 1394 | glFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) load("glFlushMappedBufferRange", userptr); 1395 | glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) load("glFramebufferRenderbuffer", userptr); 1396 | glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC) load("glFramebufferTexture1D", userptr); 1397 | glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) load("glFramebufferTexture2D", userptr); 1398 | glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC) load("glFramebufferTexture3D", userptr); 1399 | glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) load("glFramebufferTextureLayer", userptr); 1400 | glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) load("glGenFramebuffers", userptr); 1401 | glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) load("glGenRenderbuffers", userptr); 1402 | glGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) load("glGenVertexArrays", userptr); 1403 | glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) load("glGenerateMipmap", userptr); 1404 | glGetBooleani_v = (PFNGLGETBOOLEANI_VPROC) load("glGetBooleani_v", userptr); 1405 | glGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC) load("glGetFragDataLocation", userptr); 1406 | glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) load("glGetFramebufferAttachmentParameteriv", userptr); 1407 | glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load("glGetIntegeri_v", userptr); 1408 | glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) load("glGetRenderbufferParameteriv", userptr); 1409 | glGetStringi = (PFNGLGETSTRINGIPROC) load("glGetStringi", userptr); 1410 | glGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC) load("glGetTexParameterIiv", userptr); 1411 | glGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC) load("glGetTexParameterIuiv", userptr); 1412 | glGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) load("glGetTransformFeedbackVarying", userptr); 1413 | glGetUniformuiv = (PFNGLGETUNIFORMUIVPROC) load("glGetUniformuiv", userptr); 1414 | glGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC) load("glGetVertexAttribIiv", userptr); 1415 | glGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC) load("glGetVertexAttribIuiv", userptr); 1416 | glIsEnabledi = (PFNGLISENABLEDIPROC) load("glIsEnabledi", userptr); 1417 | glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC) load("glIsFramebuffer", userptr); 1418 | glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) load("glIsRenderbuffer", userptr); 1419 | glIsVertexArray = (PFNGLISVERTEXARRAYPROC) load("glIsVertexArray", userptr); 1420 | glMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) load("glMapBufferRange", userptr); 1421 | glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) load("glRenderbufferStorage", userptr); 1422 | glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) load("glRenderbufferStorageMultisample", userptr); 1423 | glTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC) load("glTexParameterIiv", userptr); 1424 | glTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC) load("glTexParameterIuiv", userptr); 1425 | glTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) load("glTransformFeedbackVaryings", userptr); 1426 | glUniform1ui = (PFNGLUNIFORM1UIPROC) load("glUniform1ui", userptr); 1427 | glUniform1uiv = (PFNGLUNIFORM1UIVPROC) load("glUniform1uiv", userptr); 1428 | glUniform2ui = (PFNGLUNIFORM2UIPROC) load("glUniform2ui", userptr); 1429 | glUniform2uiv = (PFNGLUNIFORM2UIVPROC) load("glUniform2uiv", userptr); 1430 | glUniform3ui = (PFNGLUNIFORM3UIPROC) load("glUniform3ui", userptr); 1431 | glUniform3uiv = (PFNGLUNIFORM3UIVPROC) load("glUniform3uiv", userptr); 1432 | glUniform4ui = (PFNGLUNIFORM4UIPROC) load("glUniform4ui", userptr); 1433 | glUniform4uiv = (PFNGLUNIFORM4UIVPROC) load("glUniform4uiv", userptr); 1434 | glVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC) load("glVertexAttribI1i", userptr); 1435 | glVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC) load("glVertexAttribI1iv", userptr); 1436 | glVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC) load("glVertexAttribI1ui", userptr); 1437 | glVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC) load("glVertexAttribI1uiv", userptr); 1438 | glVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC) load("glVertexAttribI2i", userptr); 1439 | glVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC) load("glVertexAttribI2iv", userptr); 1440 | glVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC) load("glVertexAttribI2ui", userptr); 1441 | glVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC) load("glVertexAttribI2uiv", userptr); 1442 | glVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC) load("glVertexAttribI3i", userptr); 1443 | glVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC) load("glVertexAttribI3iv", userptr); 1444 | glVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC) load("glVertexAttribI3ui", userptr); 1445 | glVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC) load("glVertexAttribI3uiv", userptr); 1446 | glVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC) load("glVertexAttribI4bv", userptr); 1447 | glVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC) load("glVertexAttribI4i", userptr); 1448 | glVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC) load("glVertexAttribI4iv", userptr); 1449 | glVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC) load("glVertexAttribI4sv", userptr); 1450 | glVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC) load("glVertexAttribI4ubv", userptr); 1451 | glVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC) load("glVertexAttribI4ui", userptr); 1452 | glVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC) load("glVertexAttribI4uiv", userptr); 1453 | glVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC) load("glVertexAttribI4usv", userptr); 1454 | glVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) load("glVertexAttribIPointer", userptr); 1455 | } 1456 | static void glad_gl_load_GL_VERSION_3_1( GLADuserptrloadfunc load, void* userptr) { 1457 | if(!GLAD_GL_VERSION_3_1) return; 1458 | glBindBufferBase = (PFNGLBINDBUFFERBASEPROC) load("glBindBufferBase", userptr); 1459 | glBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) load("glBindBufferRange", userptr); 1460 | glCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC) load("glCopyBufferSubData", userptr); 1461 | glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) load("glDrawArraysInstanced", userptr); 1462 | glDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC) load("glDrawElementsInstanced", userptr); 1463 | glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) load("glGetActiveUniformBlockName", userptr); 1464 | glGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC) load("glGetActiveUniformBlockiv", userptr); 1465 | glGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC) load("glGetActiveUniformName", userptr); 1466 | glGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC) load("glGetActiveUniformsiv", userptr); 1467 | glGetIntegeri_v = (PFNGLGETINTEGERI_VPROC) load("glGetIntegeri_v", userptr); 1468 | glGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC) load("glGetUniformBlockIndex", userptr); 1469 | glGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC) load("glGetUniformIndices", userptr); 1470 | glPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC) load("glPrimitiveRestartIndex", userptr); 1471 | glTexBuffer = (PFNGLTEXBUFFERPROC) load("glTexBuffer", userptr); 1472 | glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC) load("glUniformBlockBinding", userptr); 1473 | } 1474 | static void glad_gl_load_GL_VERSION_3_2( GLADuserptrloadfunc load, void* userptr) { 1475 | if(!GLAD_GL_VERSION_3_2) return; 1476 | glClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) load("glClientWaitSync", userptr); 1477 | glDeleteSync = (PFNGLDELETESYNCPROC) load("glDeleteSync", userptr); 1478 | glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC) load("glDrawElementsBaseVertex", userptr); 1479 | glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) load("glDrawElementsInstancedBaseVertex", userptr); 1480 | glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) load("glDrawRangeElementsBaseVertex", userptr); 1481 | glFenceSync = (PFNGLFENCESYNCPROC) load("glFenceSync", userptr); 1482 | glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC) load("glFramebufferTexture", userptr); 1483 | glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC) load("glGetBufferParameteri64v", userptr); 1484 | glGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC) load("glGetInteger64i_v", userptr); 1485 | glGetInteger64v = (PFNGLGETINTEGER64VPROC) load("glGetInteger64v", userptr); 1486 | glGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) load("glGetMultisamplefv", userptr); 1487 | glGetSynciv = (PFNGLGETSYNCIVPROC) load("glGetSynciv", userptr); 1488 | glIsSync = (PFNGLISSYNCPROC) load("glIsSync", userptr); 1489 | glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) load("glMultiDrawElementsBaseVertex", userptr); 1490 | glProvokingVertex = (PFNGLPROVOKINGVERTEXPROC) load("glProvokingVertex", userptr); 1491 | glSampleMaski = (PFNGLSAMPLEMASKIPROC) load("glSampleMaski", userptr); 1492 | glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) load("glTexImage2DMultisample", userptr); 1493 | glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC) load("glTexImage3DMultisample", userptr); 1494 | glWaitSync = (PFNGLWAITSYNCPROC) load("glWaitSync", userptr); 1495 | } 1496 | static void glad_gl_load_GL_VERSION_3_3( GLADuserptrloadfunc load, void* userptr) { 1497 | if(!GLAD_GL_VERSION_3_3) return; 1498 | glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) load("glBindFragDataLocationIndexed", userptr); 1499 | glBindSampler = (PFNGLBINDSAMPLERPROC) load("glBindSampler", userptr); 1500 | glColorP3ui = (PFNGLCOLORP3UIPROC) load("glColorP3ui", userptr); 1501 | glColorP3uiv = (PFNGLCOLORP3UIVPROC) load("glColorP3uiv", userptr); 1502 | glColorP4ui = (PFNGLCOLORP4UIPROC) load("glColorP4ui", userptr); 1503 | glColorP4uiv = (PFNGLCOLORP4UIVPROC) load("glColorP4uiv", userptr); 1504 | glDeleteSamplers = (PFNGLDELETESAMPLERSPROC) load("glDeleteSamplers", userptr); 1505 | glGenSamplers = (PFNGLGENSAMPLERSPROC) load("glGenSamplers", userptr); 1506 | glGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC) load("glGetFragDataIndex", userptr); 1507 | glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC) load("glGetQueryObjecti64v", userptr); 1508 | glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC) load("glGetQueryObjectui64v", userptr); 1509 | glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC) load("glGetSamplerParameterIiv", userptr); 1510 | glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC) load("glGetSamplerParameterIuiv", userptr); 1511 | glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC) load("glGetSamplerParameterfv", userptr); 1512 | glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC) load("glGetSamplerParameteriv", userptr); 1513 | glIsSampler = (PFNGLISSAMPLERPROC) load("glIsSampler", userptr); 1514 | glMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC) load("glMultiTexCoordP1ui", userptr); 1515 | glMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC) load("glMultiTexCoordP1uiv", userptr); 1516 | glMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC) load("glMultiTexCoordP2ui", userptr); 1517 | glMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC) load("glMultiTexCoordP2uiv", userptr); 1518 | glMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC) load("glMultiTexCoordP3ui", userptr); 1519 | glMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC) load("glMultiTexCoordP3uiv", userptr); 1520 | glMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC) load("glMultiTexCoordP4ui", userptr); 1521 | glMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC) load("glMultiTexCoordP4uiv", userptr); 1522 | glNormalP3ui = (PFNGLNORMALP3UIPROC) load("glNormalP3ui", userptr); 1523 | glNormalP3uiv = (PFNGLNORMALP3UIVPROC) load("glNormalP3uiv", userptr); 1524 | glQueryCounter = (PFNGLQUERYCOUNTERPROC) load("glQueryCounter", userptr); 1525 | glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC) load("glSamplerParameterIiv", userptr); 1526 | glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC) load("glSamplerParameterIuiv", userptr); 1527 | glSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC) load("glSamplerParameterf", userptr); 1528 | glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC) load("glSamplerParameterfv", userptr); 1529 | glSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC) load("glSamplerParameteri", userptr); 1530 | glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC) load("glSamplerParameteriv", userptr); 1531 | glSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC) load("glSecondaryColorP3ui", userptr); 1532 | glSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC) load("glSecondaryColorP3uiv", userptr); 1533 | glTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC) load("glTexCoordP1ui", userptr); 1534 | glTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC) load("glTexCoordP1uiv", userptr); 1535 | glTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC) load("glTexCoordP2ui", userptr); 1536 | glTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC) load("glTexCoordP2uiv", userptr); 1537 | glTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC) load("glTexCoordP3ui", userptr); 1538 | glTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC) load("glTexCoordP3uiv", userptr); 1539 | glTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC) load("glTexCoordP4ui", userptr); 1540 | glTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC) load("glTexCoordP4uiv", userptr); 1541 | glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC) load("glVertexAttribDivisor", userptr); 1542 | glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC) load("glVertexAttribP1ui", userptr); 1543 | glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC) load("glVertexAttribP1uiv", userptr); 1544 | glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC) load("glVertexAttribP2ui", userptr); 1545 | glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC) load("glVertexAttribP2uiv", userptr); 1546 | glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC) load("glVertexAttribP3ui", userptr); 1547 | glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC) load("glVertexAttribP3uiv", userptr); 1548 | glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC) load("glVertexAttribP4ui", userptr); 1549 | glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC) load("glVertexAttribP4uiv", userptr); 1550 | glVertexP2ui = (PFNGLVERTEXP2UIPROC) load("glVertexP2ui", userptr); 1551 | glVertexP2uiv = (PFNGLVERTEXP2UIVPROC) load("glVertexP2uiv", userptr); 1552 | glVertexP3ui = (PFNGLVERTEXP3UIPROC) load("glVertexP3ui", userptr); 1553 | glVertexP3uiv = (PFNGLVERTEXP3UIVPROC) load("glVertexP3uiv", userptr); 1554 | glVertexP4ui = (PFNGLVERTEXP4UIPROC) load("glVertexP4ui", userptr); 1555 | glVertexP4uiv = (PFNGLVERTEXP4UIVPROC) load("glVertexP4uiv", userptr); 1556 | } 1557 | static void glad_gl_load_GL_ARB_multisample( GLADuserptrloadfunc load, void* userptr) { 1558 | if(!GLAD_GL_ARB_multisample) return; 1559 | glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) load("glSampleCoverage", userptr); 1560 | glSampleCoverageARB = (PFNGLSAMPLECOVERAGEARBPROC) load("glSampleCoverageARB", userptr); 1561 | } 1562 | static void glad_gl_load_GL_ARB_robustness( GLADuserptrloadfunc load, void* userptr) { 1563 | if(!GLAD_GL_ARB_robustness) return; 1564 | glGetGraphicsResetStatusARB = (PFNGLGETGRAPHICSRESETSTATUSARBPROC) load("glGetGraphicsResetStatusARB", userptr); 1565 | glGetnColorTableARB = (PFNGLGETNCOLORTABLEARBPROC) load("glGetnColorTableARB", userptr); 1566 | glGetnCompressedTexImageARB = (PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) load("glGetnCompressedTexImageARB", userptr); 1567 | glGetnConvolutionFilterARB = (PFNGLGETNCONVOLUTIONFILTERARBPROC) load("glGetnConvolutionFilterARB", userptr); 1568 | glGetnHistogramARB = (PFNGLGETNHISTOGRAMARBPROC) load("glGetnHistogramARB", userptr); 1569 | glGetnMapdvARB = (PFNGLGETNMAPDVARBPROC) load("glGetnMapdvARB", userptr); 1570 | glGetnMapfvARB = (PFNGLGETNMAPFVARBPROC) load("glGetnMapfvARB", userptr); 1571 | glGetnMapivARB = (PFNGLGETNMAPIVARBPROC) load("glGetnMapivARB", userptr); 1572 | glGetnMinmaxARB = (PFNGLGETNMINMAXARBPROC) load("glGetnMinmaxARB", userptr); 1573 | glGetnPixelMapfvARB = (PFNGLGETNPIXELMAPFVARBPROC) load("glGetnPixelMapfvARB", userptr); 1574 | glGetnPixelMapuivARB = (PFNGLGETNPIXELMAPUIVARBPROC) load("glGetnPixelMapuivARB", userptr); 1575 | glGetnPixelMapusvARB = (PFNGLGETNPIXELMAPUSVARBPROC) load("glGetnPixelMapusvARB", userptr); 1576 | glGetnPolygonStippleARB = (PFNGLGETNPOLYGONSTIPPLEARBPROC) load("glGetnPolygonStippleARB", userptr); 1577 | glGetnSeparableFilterARB = (PFNGLGETNSEPARABLEFILTERARBPROC) load("glGetnSeparableFilterARB", userptr); 1578 | glGetnTexImageARB = (PFNGLGETNTEXIMAGEARBPROC) load("glGetnTexImageARB", userptr); 1579 | glGetnUniformdvARB = (PFNGLGETNUNIFORMDVARBPROC) load("glGetnUniformdvARB", userptr); 1580 | glGetnUniformfvARB = (PFNGLGETNUNIFORMFVARBPROC) load("glGetnUniformfvARB", userptr); 1581 | glGetnUniformivARB = (PFNGLGETNUNIFORMIVARBPROC) load("glGetnUniformivARB", userptr); 1582 | glGetnUniformuivARB = (PFNGLGETNUNIFORMUIVARBPROC) load("glGetnUniformuivARB", userptr); 1583 | glReadnPixels = (PFNGLREADNPIXELSPROC) load("glReadnPixels", userptr); 1584 | glReadnPixelsARB = (PFNGLREADNPIXELSARBPROC) load("glReadnPixelsARB", userptr); 1585 | } 1586 | static void glad_gl_load_GL_KHR_debug( GLADuserptrloadfunc load, void* userptr) { 1587 | if(!GLAD_GL_KHR_debug) return; 1588 | glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) load("glDebugMessageCallback", userptr); 1589 | glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) load("glDebugMessageControl", userptr); 1590 | glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC) load("glDebugMessageInsert", userptr); 1591 | glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC) load("glGetDebugMessageLog", userptr); 1592 | glGetObjectLabel = (PFNGLGETOBJECTLABELPROC) load("glGetObjectLabel", userptr); 1593 | glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC) load("glGetObjectPtrLabel", userptr); 1594 | glGetPointerv = (PFNGLGETPOINTERVPROC) load("glGetPointerv", userptr); 1595 | glObjectLabel = (PFNGLOBJECTLABELPROC) load("glObjectLabel", userptr); 1596 | glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC) load("glObjectPtrLabel", userptr); 1597 | glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC) load("glPopDebugGroup", userptr); 1598 | glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC) load("glPushDebugGroup", userptr); 1599 | } 1600 | 1601 | 1602 | 1603 | #if defined(GL_ES_VERSION_3_0) || defined(GL_VERSION_3_0) 1604 | #define GLAD_GL_IS_SOME_NEW_VERSION 1 1605 | #else 1606 | #define GLAD_GL_IS_SOME_NEW_VERSION 0 1607 | #endif 1608 | 1609 | static int glad_gl_get_extensions( int version, const char **out_exts, unsigned int *out_num_exts_i, char ***out_exts_i) { 1610 | #if GLAD_GL_IS_SOME_NEW_VERSION 1611 | if(GLAD_VERSION_MAJOR(version) < 3) { 1612 | #else 1613 | (void) version; 1614 | (void) out_num_exts_i; 1615 | (void) out_exts_i; 1616 | #endif 1617 | if (glGetString == NULL) { 1618 | return 0; 1619 | } 1620 | *out_exts = (const char *)glGetString(GL_EXTENSIONS); 1621 | #if GLAD_GL_IS_SOME_NEW_VERSION 1622 | } else { 1623 | unsigned int index = 0; 1624 | unsigned int num_exts_i = 0; 1625 | char **exts_i = NULL; 1626 | if (glGetStringi == NULL || glGetIntegerv == NULL) { 1627 | return 0; 1628 | } 1629 | glGetIntegerv(GL_NUM_EXTENSIONS, (int*) &num_exts_i); 1630 | if (num_exts_i > 0) { 1631 | exts_i = (char **) malloc(num_exts_i * (sizeof *exts_i)); 1632 | } 1633 | if (exts_i == NULL) { 1634 | return 0; 1635 | } 1636 | for(index = 0; index < num_exts_i; index++) { 1637 | const char *gl_str_tmp = (const char*) glGetStringi(GL_EXTENSIONS, index); 1638 | size_t len = strlen(gl_str_tmp) + 1; 1639 | 1640 | char *local_str = (char*) malloc(len * sizeof(char)); 1641 | if(local_str != NULL) { 1642 | memcpy(local_str, gl_str_tmp, len * sizeof(char)); 1643 | } 1644 | 1645 | exts_i[index] = local_str; 1646 | } 1647 | 1648 | *out_num_exts_i = num_exts_i; 1649 | *out_exts_i = exts_i; 1650 | } 1651 | #endif 1652 | return 1; 1653 | } 1654 | static void glad_gl_free_extensions(char **exts_i, unsigned int num_exts_i) { 1655 | if (exts_i != NULL) { 1656 | unsigned int index; 1657 | for(index = 0; index < num_exts_i; index++) { 1658 | free((void *) (exts_i[index])); 1659 | } 1660 | free((void *)exts_i); 1661 | exts_i = NULL; 1662 | } 1663 | } 1664 | static int glad_gl_has_extension(int version, const char *exts, unsigned int num_exts_i, char **exts_i, const char *ext) { 1665 | if(GLAD_VERSION_MAJOR(version) < 3 || !GLAD_GL_IS_SOME_NEW_VERSION) { 1666 | const char *extensions; 1667 | const char *loc; 1668 | const char *terminator; 1669 | extensions = exts; 1670 | if(extensions == NULL || ext == NULL) { 1671 | return 0; 1672 | } 1673 | while(1) { 1674 | loc = strstr(extensions, ext); 1675 | if(loc == NULL) { 1676 | return 0; 1677 | } 1678 | terminator = loc + strlen(ext); 1679 | if((loc == extensions || *(loc - 1) == ' ') && 1680 | (*terminator == ' ' || *terminator == '\0')) { 1681 | return 1; 1682 | } 1683 | extensions = terminator; 1684 | } 1685 | } else { 1686 | unsigned int index; 1687 | for(index = 0; index < num_exts_i; index++) { 1688 | const char *e = exts_i[index]; 1689 | if(strcmp(e, ext) == 0) { 1690 | return 1; 1691 | } 1692 | } 1693 | } 1694 | return 0; 1695 | } 1696 | 1697 | static GLADapiproc glad_gl_get_proc_from_userptr(const char* name, void *userptr) { 1698 | return (GLAD_GNUC_EXTENSION (GLADapiproc (*)(const char *name)) userptr)(name); 1699 | } 1700 | 1701 | static int glad_gl_find_extensions_gl( int version) { 1702 | const char *exts = NULL; 1703 | unsigned int num_exts_i = 0; 1704 | char **exts_i = NULL; 1705 | if (!glad_gl_get_extensions(version, &exts, &num_exts_i, &exts_i)) return 0; 1706 | 1707 | GLAD_GL_ARB_multisample = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_ARB_multisample"); 1708 | GLAD_GL_ARB_robustness = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_ARB_robustness"); 1709 | GLAD_GL_KHR_debug = glad_gl_has_extension(version, exts, num_exts_i, exts_i, "GL_KHR_debug"); 1710 | 1711 | glad_gl_free_extensions(exts_i, num_exts_i); 1712 | 1713 | return 1; 1714 | } 1715 | 1716 | static int glad_gl_find_core_gl(void) { 1717 | int i, major, minor; 1718 | const char* version; 1719 | const char* prefixes[] = { 1720 | "OpenGL ES-CM ", 1721 | "OpenGL ES-CL ", 1722 | "OpenGL ES ", 1723 | NULL 1724 | }; 1725 | version = (const char*) glGetString(GL_VERSION); 1726 | if (!version) return 0; 1727 | for (i = 0; prefixes[i]; i++) { 1728 | const size_t length = strlen(prefixes[i]); 1729 | if (strncmp(version, prefixes[i], length) == 0) { 1730 | version += length; 1731 | break; 1732 | } 1733 | } 1734 | 1735 | GLAD_IMPL_UTIL_SSCANF(version, "%d.%d", &major, &minor); 1736 | 1737 | GLAD_GL_VERSION_1_0 = (major == 1 && minor >= 0) || major > 1; 1738 | GLAD_GL_VERSION_1_1 = (major == 1 && minor >= 1) || major > 1; 1739 | GLAD_GL_VERSION_1_2 = (major == 1 && minor >= 2) || major > 1; 1740 | GLAD_GL_VERSION_1_3 = (major == 1 && minor >= 3) || major > 1; 1741 | GLAD_GL_VERSION_1_4 = (major == 1 && minor >= 4) || major > 1; 1742 | GLAD_GL_VERSION_1_5 = (major == 1 && minor >= 5) || major > 1; 1743 | GLAD_GL_VERSION_2_0 = (major == 2 && minor >= 0) || major > 2; 1744 | GLAD_GL_VERSION_2_1 = (major == 2 && minor >= 1) || major > 2; 1745 | GLAD_GL_VERSION_3_0 = (major == 3 && minor >= 0) || major > 3; 1746 | GLAD_GL_VERSION_3_1 = (major == 3 && minor >= 1) || major > 3; 1747 | GLAD_GL_VERSION_3_2 = (major == 3 && minor >= 2) || major > 3; 1748 | GLAD_GL_VERSION_3_3 = (major == 3 && minor >= 3) || major > 3; 1749 | 1750 | return GLAD_MAKE_VERSION(major, minor); 1751 | } 1752 | 1753 | int gladLoadGLUserPtr( GLADuserptrloadfunc load, void *userptr) { 1754 | int version; 1755 | 1756 | glGetString = (PFNGLGETSTRINGPROC) load("glGetString", userptr); 1757 | if(glGetString == NULL) return 0; 1758 | if(glGetString(GL_VERSION) == NULL) return 0; 1759 | version = glad_gl_find_core_gl(); 1760 | 1761 | glad_gl_load_GL_VERSION_1_0(load, userptr); 1762 | glad_gl_load_GL_VERSION_1_1(load, userptr); 1763 | glad_gl_load_GL_VERSION_1_2(load, userptr); 1764 | glad_gl_load_GL_VERSION_1_3(load, userptr); 1765 | glad_gl_load_GL_VERSION_1_4(load, userptr); 1766 | glad_gl_load_GL_VERSION_1_5(load, userptr); 1767 | glad_gl_load_GL_VERSION_2_0(load, userptr); 1768 | glad_gl_load_GL_VERSION_2_1(load, userptr); 1769 | glad_gl_load_GL_VERSION_3_0(load, userptr); 1770 | glad_gl_load_GL_VERSION_3_1(load, userptr); 1771 | glad_gl_load_GL_VERSION_3_2(load, userptr); 1772 | glad_gl_load_GL_VERSION_3_3(load, userptr); 1773 | 1774 | if (!glad_gl_find_extensions_gl(version)) return 0; 1775 | glad_gl_load_GL_ARB_multisample(load, userptr); 1776 | glad_gl_load_GL_ARB_robustness(load, userptr); 1777 | glad_gl_load_GL_KHR_debug(load, userptr); 1778 | 1779 | 1780 | 1781 | return version; 1782 | } 1783 | 1784 | 1785 | int gladLoadGL( GLADloadfunc load) { 1786 | return gladLoadGLUserPtr( glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load); 1787 | } 1788 | 1789 | 1790 | 1791 | 1792 | -------------------------------------------------------------------------------- /example/glad/khrplatform.h: -------------------------------------------------------------------------------- 1 | #ifndef __khrplatform_h_ 2 | #define __khrplatform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2008-2018 The Khronos Group Inc. 6 | ** 7 | ** Permission is hereby granted, free of charge, to any person obtaining a 8 | ** copy of this software and/or associated documentation files (the 9 | ** "Materials"), to deal in the Materials without restriction, including 10 | ** without limitation the rights to use, copy, modify, merge, publish, 11 | ** distribute, sublicense, and/or sell copies of the Materials, and to 12 | ** permit persons to whom the Materials are furnished to do so, subject to 13 | ** the following conditions: 14 | ** 15 | ** The above copyright notice and this permission notice shall be included 16 | ** in all copies or substantial portions of the Materials. 17 | ** 18 | ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 19 | ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20 | ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 21 | ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23 | ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24 | ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. 25 | */ 26 | 27 | /* Khronos platform-specific types and definitions. 28 | * 29 | * The master copy of khrplatform.h is maintained in the Khronos EGL 30 | * Registry repository at https://github.com/KhronosGroup/EGL-Registry 31 | * The last semantic modification to khrplatform.h was at commit ID: 32 | * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 33 | * 34 | * Adopters may modify this file to suit their platform. Adopters are 35 | * encouraged to submit platform specific modifications to the Khronos 36 | * group so that they can be included in future versions of this file. 37 | * Please submit changes by filing pull requests or issues on 38 | * the EGL Registry repository linked above. 39 | * 40 | * 41 | * See the Implementer's Guidelines for information about where this file 42 | * should be located on your system and for more details of its use: 43 | * http://www.khronos.org/registry/implementers_guide.pdf 44 | * 45 | * This file should be included as 46 | * #include 47 | * by Khronos client API header files that use its types and defines. 48 | * 49 | * The types in khrplatform.h should only be used to define API-specific types. 50 | * 51 | * Types defined in khrplatform.h: 52 | * khronos_int8_t signed 8 bit 53 | * khronos_uint8_t unsigned 8 bit 54 | * khronos_int16_t signed 16 bit 55 | * khronos_uint16_t unsigned 16 bit 56 | * khronos_int32_t signed 32 bit 57 | * khronos_uint32_t unsigned 32 bit 58 | * khronos_int64_t signed 64 bit 59 | * khronos_uint64_t unsigned 64 bit 60 | * khronos_intptr_t signed same number of bits as a pointer 61 | * khronos_uintptr_t unsigned same number of bits as a pointer 62 | * khronos_ssize_t signed size 63 | * khronos_usize_t unsigned size 64 | * khronos_float_t signed 32 bit floating point 65 | * khronos_time_ns_t unsigned 64 bit time in nanoseconds 66 | * khronos_utime_nanoseconds_t unsigned time interval or absolute time in 67 | * nanoseconds 68 | * khronos_stime_nanoseconds_t signed time interval in nanoseconds 69 | * khronos_boolean_enum_t enumerated boolean type. This should 70 | * only be used as a base type when a client API's boolean type is 71 | * an enum. Client APIs which use an integer or other type for 72 | * booleans cannot use this as the base type for their boolean. 73 | * 74 | * Tokens defined in khrplatform.h: 75 | * 76 | * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. 77 | * 78 | * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. 79 | * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. 80 | * 81 | * Calling convention macros defined in this file: 82 | * KHRONOS_APICALL 83 | * KHRONOS_APIENTRY 84 | * KHRONOS_APIATTRIBUTES 85 | * 86 | * These may be used in function prototypes as: 87 | * 88 | * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( 89 | * int arg1, 90 | * int arg2) KHRONOS_APIATTRIBUTES; 91 | */ 92 | 93 | /*------------------------------------------------------------------------- 94 | * Definition of KHRONOS_APICALL 95 | *------------------------------------------------------------------------- 96 | * This precedes the return type of the function in the function prototype. 97 | */ 98 | #if defined(_WIN32) && !defined(__SCITECH_SNAP__) 99 | # define KHRONOS_APICALL __declspec(dllimport) 100 | #elif defined (__SYMBIAN32__) 101 | # define KHRONOS_APICALL IMPORT_C 102 | #elif defined(__ANDROID__) 103 | # define KHRONOS_APICALL __attribute__((visibility("default"))) 104 | #else 105 | # define KHRONOS_APICALL 106 | #endif 107 | 108 | /*------------------------------------------------------------------------- 109 | * Definition of KHRONOS_APIENTRY 110 | *------------------------------------------------------------------------- 111 | * This follows the return type of the function and precedes the function 112 | * name in the function prototype. 113 | */ 114 | #if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) 115 | /* Win32 but not WinCE */ 116 | # define KHRONOS_APIENTRY __stdcall 117 | #else 118 | # define KHRONOS_APIENTRY 119 | #endif 120 | 121 | /*------------------------------------------------------------------------- 122 | * Definition of KHRONOS_APIATTRIBUTES 123 | *------------------------------------------------------------------------- 124 | * This follows the closing parenthesis of the function prototype arguments. 125 | */ 126 | #if defined (__ARMCC_2__) 127 | #define KHRONOS_APIATTRIBUTES __softfp 128 | #else 129 | #define KHRONOS_APIATTRIBUTES 130 | #endif 131 | 132 | /*------------------------------------------------------------------------- 133 | * basic type definitions 134 | *-----------------------------------------------------------------------*/ 135 | #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) 136 | 137 | 138 | /* 139 | * Using 140 | */ 141 | #include 142 | typedef int32_t khronos_int32_t; 143 | typedef uint32_t khronos_uint32_t; 144 | typedef int64_t khronos_int64_t; 145 | typedef uint64_t khronos_uint64_t; 146 | #define KHRONOS_SUPPORT_INT64 1 147 | #define KHRONOS_SUPPORT_FLOAT 1 148 | 149 | #elif defined(__VMS ) || defined(__sgi) 150 | 151 | /* 152 | * Using 153 | */ 154 | #include 155 | typedef int32_t khronos_int32_t; 156 | typedef uint32_t khronos_uint32_t; 157 | typedef int64_t khronos_int64_t; 158 | typedef uint64_t khronos_uint64_t; 159 | #define KHRONOS_SUPPORT_INT64 1 160 | #define KHRONOS_SUPPORT_FLOAT 1 161 | 162 | #elif defined(_WIN32) && !defined(__SCITECH_SNAP__) 163 | 164 | /* 165 | * Win32 166 | */ 167 | typedef __int32 khronos_int32_t; 168 | typedef unsigned __int32 khronos_uint32_t; 169 | typedef __int64 khronos_int64_t; 170 | typedef unsigned __int64 khronos_uint64_t; 171 | #define KHRONOS_SUPPORT_INT64 1 172 | #define KHRONOS_SUPPORT_FLOAT 1 173 | 174 | #elif defined(__sun__) || defined(__digital__) 175 | 176 | /* 177 | * Sun or Digital 178 | */ 179 | typedef int khronos_int32_t; 180 | typedef unsigned int khronos_uint32_t; 181 | #if defined(__arch64__) || defined(_LP64) 182 | typedef long int khronos_int64_t; 183 | typedef unsigned long int khronos_uint64_t; 184 | #else 185 | typedef long long int khronos_int64_t; 186 | typedef unsigned long long int khronos_uint64_t; 187 | #endif /* __arch64__ */ 188 | #define KHRONOS_SUPPORT_INT64 1 189 | #define KHRONOS_SUPPORT_FLOAT 1 190 | 191 | #elif 0 192 | 193 | /* 194 | * Hypothetical platform with no float or int64 support 195 | */ 196 | typedef int khronos_int32_t; 197 | typedef unsigned int khronos_uint32_t; 198 | #define KHRONOS_SUPPORT_INT64 0 199 | #define KHRONOS_SUPPORT_FLOAT 0 200 | 201 | #else 202 | 203 | /* 204 | * Generic fallback 205 | */ 206 | #include 207 | typedef int32_t khronos_int32_t; 208 | typedef uint32_t khronos_uint32_t; 209 | typedef int64_t khronos_int64_t; 210 | typedef uint64_t khronos_uint64_t; 211 | #define KHRONOS_SUPPORT_INT64 1 212 | #define KHRONOS_SUPPORT_FLOAT 1 213 | 214 | #endif 215 | 216 | 217 | /* 218 | * Types that are (so far) the same on all platforms 219 | */ 220 | typedef signed char khronos_int8_t; 221 | typedef unsigned char khronos_uint8_t; 222 | typedef signed short int khronos_int16_t; 223 | typedef unsigned short int khronos_uint16_t; 224 | 225 | /* 226 | * Types that differ between LLP64 and LP64 architectures - in LLP64, 227 | * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears 228 | * to be the only LLP64 architecture in current use. 229 | */ 230 | #ifdef _WIN64 231 | typedef signed long long int khronos_intptr_t; 232 | typedef unsigned long long int khronos_uintptr_t; 233 | typedef signed long long int khronos_ssize_t; 234 | typedef unsigned long long int khronos_usize_t; 235 | #else 236 | typedef signed long int khronos_intptr_t; 237 | typedef unsigned long int khronos_uintptr_t; 238 | typedef signed long int khronos_ssize_t; 239 | typedef unsigned long int khronos_usize_t; 240 | #endif 241 | 242 | #if KHRONOS_SUPPORT_FLOAT 243 | /* 244 | * Float type 245 | */ 246 | typedef float khronos_float_t; 247 | #endif 248 | 249 | #if KHRONOS_SUPPORT_INT64 250 | /* Time types 251 | * 252 | * These types can be used to represent a time interval in nanoseconds or 253 | * an absolute Unadjusted System Time. Unadjusted System Time is the number 254 | * of nanoseconds since some arbitrary system event (e.g. since the last 255 | * time the system booted). The Unadjusted System Time is an unsigned 256 | * 64 bit value that wraps back to 0 every 584 years. Time intervals 257 | * may be either signed or unsigned. 258 | */ 259 | typedef khronos_uint64_t khronos_utime_nanoseconds_t; 260 | typedef khronos_int64_t khronos_stime_nanoseconds_t; 261 | #endif 262 | 263 | /* 264 | * Dummy value used to pad enum types to 32 bits. 265 | */ 266 | #ifndef KHRONOS_MAX_ENUM 267 | #define KHRONOS_MAX_ENUM 0x7FFFFFFF 268 | #endif 269 | 270 | /* 271 | * Enumerated boolean type 272 | * 273 | * Values other than zero should be considered to be true. Therefore 274 | * comparisons should not be made against KHRONOS_TRUE. 275 | */ 276 | typedef enum { 277 | KHRONOS_FALSE = 0, 278 | KHRONOS_TRUE = 1, 279 | KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM 280 | } khronos_boolean_enum_t; 281 | 282 | #endif /* __khrplatform_h_ */ 283 | -------------------------------------------------------------------------------- /example/glad/vk_platform.h: -------------------------------------------------------------------------------- 1 | /* */ 2 | /* File: vk_platform.h */ 3 | /* */ 4 | /* 5 | ** Copyright (c) 2014-2017 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | 21 | #ifndef VK_PLATFORM_H_ 22 | #define VK_PLATFORM_H_ 23 | 24 | #ifdef __cplusplus 25 | extern "C" 26 | { 27 | #endif /* __cplusplus */ 28 | 29 | /* 30 | *************************************************************************************************** 31 | * Platform-specific directives and type declarations 32 | *************************************************************************************************** 33 | */ 34 | 35 | /* Platform-specific calling convention macros. 36 | * 37 | * Platforms should define these so that Vulkan clients call Vulkan commands 38 | * with the same calling conventions that the Vulkan implementation expects. 39 | * 40 | * VKAPI_ATTR - Placed before the return type in function declarations. 41 | * Useful for C++11 and GCC/Clang-style function attribute syntax. 42 | * VKAPI_CALL - Placed after the return type in function declarations. 43 | * Useful for MSVC-style calling convention syntax. 44 | * VKAPI_PTR - Placed between the '(' and '*' in function pointer types. 45 | * 46 | * Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void); 47 | * Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void); 48 | */ 49 | #if defined(_WIN32) 50 | /* On Windows, Vulkan commands use the stdcall convention */ 51 | #define VKAPI_ATTR 52 | #define VKAPI_CALL __stdcall 53 | #define VKAPI_PTR VKAPI_CALL 54 | #elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7 55 | #error "Vulkan isn't supported for the 'armeabi' NDK ABI" 56 | #elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE) 57 | /* On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" */ 58 | /* calling convention, i.e. float parameters are passed in registers. This */ 59 | /* is true even if the rest of the application passes floats on the stack, */ 60 | /* as it does by default when compiling for the armeabi-v7a NDK ABI. */ 61 | #define VKAPI_ATTR __attribute__((pcs("aapcs-vfp"))) 62 | #define VKAPI_CALL 63 | #define VKAPI_PTR VKAPI_ATTR 64 | #else 65 | /* On other platforms, use the default calling convention */ 66 | #define VKAPI_ATTR 67 | #define VKAPI_CALL 68 | #define VKAPI_PTR 69 | #endif 70 | 71 | #include 72 | 73 | #if !defined(VK_NO_STDINT_H) 74 | #if defined(_MSC_VER) && (_MSC_VER < 1600) 75 | typedef signed __int8 int8_t; 76 | typedef unsigned __int8 uint8_t; 77 | typedef signed __int16 int16_t; 78 | typedef unsigned __int16 uint16_t; 79 | typedef signed __int32 int32_t; 80 | typedef unsigned __int32 uint32_t; 81 | typedef signed __int64 int64_t; 82 | typedef unsigned __int64 uint64_t; 83 | #else 84 | #include 85 | #endif 86 | #endif /* !defined(VK_NO_STDINT_H) */ 87 | 88 | #ifdef __cplusplus 89 | } /* extern "C" */ 90 | #endif /* __cplusplus */ 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /example/linmath.h: -------------------------------------------------------------------------------- 1 | #ifndef LINMATH_H 2 | #define LINMATH_H 3 | 4 | #include 5 | 6 | /* 2020-03-02 Camilla Löwy 7 | * - Added inclusion of string.h for memcpy 8 | * - Replaced tan and acos with tanf and acosf 9 | * - Replaced double constants with float equivalents 10 | */ 11 | #include 12 | 13 | #ifdef LINMATH_NO_INLINE 14 | #define LINMATH_H_FUNC static 15 | #else 16 | #define LINMATH_H_FUNC static inline 17 | #endif 18 | 19 | #define LINMATH_H_DEFINE_VEC(n) \ 20 | typedef float vec##n[n]; \ 21 | LINMATH_H_FUNC void vec##n##_add(vec##n r, vec##n const a, vec##n const b) \ 22 | { \ 23 | int i; \ 24 | for(i=0; ib[i] ? a[i] : b[i]; \ 67 | } 68 | 69 | LINMATH_H_DEFINE_VEC(2) 70 | LINMATH_H_DEFINE_VEC(3) 71 | LINMATH_H_DEFINE_VEC(4) 72 | 73 | LINMATH_H_FUNC void vec3_mul_cross(vec3 r, vec3 const a, vec3 const b) 74 | { 75 | r[0] = a[1]*b[2] - a[2]*b[1]; 76 | r[1] = a[2]*b[0] - a[0]*b[2]; 77 | r[2] = a[0]*b[1] - a[1]*b[0]; 78 | } 79 | 80 | LINMATH_H_FUNC void vec3_reflect(vec3 r, vec3 const v, vec3 const n) 81 | { 82 | float p = 2.f*vec3_mul_inner(v, n); 83 | int i; 84 | for(i=0;i<3;++i) 85 | r[i] = v[i] - p*n[i]; 86 | } 87 | 88 | LINMATH_H_FUNC void vec4_mul_cross(vec4 r, vec4 a, vec4 b) 89 | { 90 | r[0] = a[1]*b[2] - a[2]*b[1]; 91 | r[1] = a[2]*b[0] - a[0]*b[2]; 92 | r[2] = a[0]*b[1] - a[1]*b[0]; 93 | r[3] = 1.f; 94 | } 95 | 96 | LINMATH_H_FUNC void vec4_reflect(vec4 r, vec4 v, vec4 n) 97 | { 98 | float p = 2.f*vec4_mul_inner(v, n); 99 | int i; 100 | for(i=0;i<4;++i) 101 | r[i] = v[i] - p*n[i]; 102 | } 103 | 104 | typedef vec4 mat4x4[4]; 105 | LINMATH_H_FUNC void mat4x4_identity(mat4x4 M) 106 | { 107 | int i, j; 108 | for(i=0; i<4; ++i) 109 | for(j=0; j<4; ++j) 110 | M[i][j] = i==j ? 1.f : 0.f; 111 | } 112 | LINMATH_H_FUNC void mat4x4_dup(mat4x4 M, mat4x4 N) 113 | { 114 | int i, j; 115 | for(i=0; i<4; ++i) 116 | for(j=0; j<4; ++j) 117 | M[i][j] = N[i][j]; 118 | } 119 | LINMATH_H_FUNC void mat4x4_row(vec4 r, mat4x4 M, int i) 120 | { 121 | int k; 122 | for(k=0; k<4; ++k) 123 | r[k] = M[k][i]; 124 | } 125 | LINMATH_H_FUNC void mat4x4_col(vec4 r, mat4x4 M, int i) 126 | { 127 | int k; 128 | for(k=0; k<4; ++k) 129 | r[k] = M[i][k]; 130 | } 131 | LINMATH_H_FUNC void mat4x4_transpose(mat4x4 M, mat4x4 N) 132 | { 133 | int i, j; 134 | for(j=0; j<4; ++j) 135 | for(i=0; i<4; ++i) 136 | M[i][j] = N[j][i]; 137 | } 138 | LINMATH_H_FUNC void mat4x4_add(mat4x4 M, mat4x4 a, mat4x4 b) 139 | { 140 | int i; 141 | for(i=0; i<4; ++i) 142 | vec4_add(M[i], a[i], b[i]); 143 | } 144 | LINMATH_H_FUNC void mat4x4_sub(mat4x4 M, mat4x4 a, mat4x4 b) 145 | { 146 | int i; 147 | for(i=0; i<4; ++i) 148 | vec4_sub(M[i], a[i], b[i]); 149 | } 150 | LINMATH_H_FUNC void mat4x4_scale(mat4x4 M, mat4x4 a, float k) 151 | { 152 | int i; 153 | for(i=0; i<4; ++i) 154 | vec4_scale(M[i], a[i], k); 155 | } 156 | LINMATH_H_FUNC void mat4x4_scale_aniso(mat4x4 M, mat4x4 a, float x, float y, float z) 157 | { 158 | int i; 159 | vec4_scale(M[0], a[0], x); 160 | vec4_scale(M[1], a[1], y); 161 | vec4_scale(M[2], a[2], z); 162 | for(i = 0; i < 4; ++i) { 163 | M[3][i] = a[3][i]; 164 | } 165 | } 166 | LINMATH_H_FUNC void mat4x4_mul(mat4x4 M, mat4x4 a, mat4x4 b) 167 | { 168 | mat4x4 temp; 169 | int k, r, c; 170 | for(c=0; c<4; ++c) for(r=0; r<4; ++r) { 171 | temp[c][r] = 0.f; 172 | for(k=0; k<4; ++k) 173 | temp[c][r] += a[k][r] * b[c][k]; 174 | } 175 | mat4x4_dup(M, temp); 176 | } 177 | LINMATH_H_FUNC void mat4x4_mul_vec4(vec4 r, mat4x4 M, vec4 v) 178 | { 179 | int i, j; 180 | for(j=0; j<4; ++j) { 181 | r[j] = 0.f; 182 | for(i=0; i<4; ++i) 183 | r[j] += M[i][j] * v[i]; 184 | } 185 | } 186 | LINMATH_H_FUNC void mat4x4_translate(mat4x4 T, float x, float y, float z) 187 | { 188 | mat4x4_identity(T); 189 | T[3][0] = x; 190 | T[3][1] = y; 191 | T[3][2] = z; 192 | } 193 | LINMATH_H_FUNC void mat4x4_translate_in_place(mat4x4 M, float x, float y, float z) 194 | { 195 | vec4 t = {x, y, z, 0}; 196 | vec4 r; 197 | int i; 198 | for (i = 0; i < 4; ++i) { 199 | mat4x4_row(r, M, i); 200 | M[3][i] += vec4_mul_inner(r, t); 201 | } 202 | } 203 | LINMATH_H_FUNC void mat4x4_from_vec3_mul_outer(mat4x4 M, vec3 a, vec3 b) 204 | { 205 | int i, j; 206 | for(i=0; i<4; ++i) for(j=0; j<4; ++j) 207 | M[i][j] = i<3 && j<3 ? a[i] * b[j] : 0.f; 208 | } 209 | LINMATH_H_FUNC void mat4x4_rotate(mat4x4 R, mat4x4 M, float x, float y, float z, float angle) 210 | { 211 | float s = sinf(angle); 212 | float c = cosf(angle); 213 | vec3 u = {x, y, z}; 214 | 215 | if(vec3_len(u) > 1e-4) { 216 | vec3_norm(u, u); 217 | mat4x4 T; 218 | mat4x4_from_vec3_mul_outer(T, u, u); 219 | 220 | mat4x4 S = { 221 | { 0, u[2], -u[1], 0}, 222 | {-u[2], 0, u[0], 0}, 223 | { u[1], -u[0], 0, 0}, 224 | { 0, 0, 0, 0} 225 | }; 226 | mat4x4_scale(S, S, s); 227 | 228 | mat4x4 C; 229 | mat4x4_identity(C); 230 | mat4x4_sub(C, C, T); 231 | 232 | mat4x4_scale(C, C, c); 233 | 234 | mat4x4_add(T, T, C); 235 | mat4x4_add(T, T, S); 236 | 237 | T[3][3] = 1.; 238 | mat4x4_mul(R, M, T); 239 | } else { 240 | mat4x4_dup(R, M); 241 | } 242 | } 243 | LINMATH_H_FUNC void mat4x4_rotate_X(mat4x4 Q, mat4x4 M, float angle) 244 | { 245 | float s = sinf(angle); 246 | float c = cosf(angle); 247 | mat4x4 R = { 248 | {1.f, 0.f, 0.f, 0.f}, 249 | {0.f, c, s, 0.f}, 250 | {0.f, -s, c, 0.f}, 251 | {0.f, 0.f, 0.f, 1.f} 252 | }; 253 | mat4x4_mul(Q, M, R); 254 | } 255 | LINMATH_H_FUNC void mat4x4_rotate_Y(mat4x4 Q, mat4x4 M, float angle) 256 | { 257 | float s = sinf(angle); 258 | float c = cosf(angle); 259 | mat4x4 R = { 260 | { c, 0.f, s, 0.f}, 261 | { 0.f, 1.f, 0.f, 0.f}, 262 | { -s, 0.f, c, 0.f}, 263 | { 0.f, 0.f, 0.f, 1.f} 264 | }; 265 | mat4x4_mul(Q, M, R); 266 | } 267 | LINMATH_H_FUNC void mat4x4_rotate_Z(mat4x4 Q, mat4x4 M, float angle) 268 | { 269 | float s = sinf(angle); 270 | float c = cosf(angle); 271 | mat4x4 R = { 272 | { c, s, 0.f, 0.f}, 273 | { -s, c, 0.f, 0.f}, 274 | { 0.f, 0.f, 1.f, 0.f}, 275 | { 0.f, 0.f, 0.f, 1.f} 276 | }; 277 | mat4x4_mul(Q, M, R); 278 | } 279 | LINMATH_H_FUNC void mat4x4_invert(mat4x4 T, mat4x4 M) 280 | { 281 | float s[6]; 282 | float c[6]; 283 | s[0] = M[0][0]*M[1][1] - M[1][0]*M[0][1]; 284 | s[1] = M[0][0]*M[1][2] - M[1][0]*M[0][2]; 285 | s[2] = M[0][0]*M[1][3] - M[1][0]*M[0][3]; 286 | s[3] = M[0][1]*M[1][2] - M[1][1]*M[0][2]; 287 | s[4] = M[0][1]*M[1][3] - M[1][1]*M[0][3]; 288 | s[5] = M[0][2]*M[1][3] - M[1][2]*M[0][3]; 289 | 290 | c[0] = M[2][0]*M[3][1] - M[3][0]*M[2][1]; 291 | c[1] = M[2][0]*M[3][2] - M[3][0]*M[2][2]; 292 | c[2] = M[2][0]*M[3][3] - M[3][0]*M[2][3]; 293 | c[3] = M[2][1]*M[3][2] - M[3][1]*M[2][2]; 294 | c[4] = M[2][1]*M[3][3] - M[3][1]*M[2][3]; 295 | c[5] = M[2][2]*M[3][3] - M[3][2]*M[2][3]; 296 | 297 | /* Assumes it is invertible */ 298 | float idet = 1.0f/( s[0]*c[5]-s[1]*c[4]+s[2]*c[3]+s[3]*c[2]-s[4]*c[1]+s[5]*c[0] ); 299 | 300 | T[0][0] = ( M[1][1] * c[5] - M[1][2] * c[4] + M[1][3] * c[3]) * idet; 301 | T[0][1] = (-M[0][1] * c[5] + M[0][2] * c[4] - M[0][3] * c[3]) * idet; 302 | T[0][2] = ( M[3][1] * s[5] - M[3][2] * s[4] + M[3][3] * s[3]) * idet; 303 | T[0][3] = (-M[2][1] * s[5] + M[2][2] * s[4] - M[2][3] * s[3]) * idet; 304 | 305 | T[1][0] = (-M[1][0] * c[5] + M[1][2] * c[2] - M[1][3] * c[1]) * idet; 306 | T[1][1] = ( M[0][0] * c[5] - M[0][2] * c[2] + M[0][3] * c[1]) * idet; 307 | T[1][2] = (-M[3][0] * s[5] + M[3][2] * s[2] - M[3][3] * s[1]) * idet; 308 | T[1][3] = ( M[2][0] * s[5] - M[2][2] * s[2] + M[2][3] * s[1]) * idet; 309 | 310 | T[2][0] = ( M[1][0] * c[4] - M[1][1] * c[2] + M[1][3] * c[0]) * idet; 311 | T[2][1] = (-M[0][0] * c[4] + M[0][1] * c[2] - M[0][3] * c[0]) * idet; 312 | T[2][2] = ( M[3][0] * s[4] - M[3][1] * s[2] + M[3][3] * s[0]) * idet; 313 | T[2][3] = (-M[2][0] * s[4] + M[2][1] * s[2] - M[2][3] * s[0]) * idet; 314 | 315 | T[3][0] = (-M[1][0] * c[3] + M[1][1] * c[1] - M[1][2] * c[0]) * idet; 316 | T[3][1] = ( M[0][0] * c[3] - M[0][1] * c[1] + M[0][2] * c[0]) * idet; 317 | T[3][2] = (-M[3][0] * s[3] + M[3][1] * s[1] - M[3][2] * s[0]) * idet; 318 | T[3][3] = ( M[2][0] * s[3] - M[2][1] * s[1] + M[2][2] * s[0]) * idet; 319 | } 320 | LINMATH_H_FUNC void mat4x4_orthonormalize(mat4x4 R, mat4x4 M) 321 | { 322 | mat4x4_dup(R, M); 323 | float s = 1.; 324 | vec3 h; 325 | 326 | vec3_norm(R[2], R[2]); 327 | 328 | s = vec3_mul_inner(R[1], R[2]); 329 | vec3_scale(h, R[2], s); 330 | vec3_sub(R[1], R[1], h); 331 | vec3_norm(R[1], R[1]); 332 | 333 | s = vec3_mul_inner(R[0], R[2]); 334 | vec3_scale(h, R[2], s); 335 | vec3_sub(R[0], R[0], h); 336 | 337 | s = vec3_mul_inner(R[0], R[1]); 338 | vec3_scale(h, R[1], s); 339 | vec3_sub(R[0], R[0], h); 340 | vec3_norm(R[0], R[0]); 341 | } 342 | 343 | LINMATH_H_FUNC void mat4x4_frustum(mat4x4 M, float l, float r, float b, float t, float n, float f) 344 | { 345 | M[0][0] = 2.f*n/(r-l); 346 | M[0][1] = M[0][2] = M[0][3] = 0.f; 347 | 348 | M[1][1] = 2.f*n/(t-b); 349 | M[1][0] = M[1][2] = M[1][3] = 0.f; 350 | 351 | M[2][0] = (r+l)/(r-l); 352 | M[2][1] = (t+b)/(t-b); 353 | M[2][2] = -(f+n)/(f-n); 354 | M[2][3] = -1.f; 355 | 356 | M[3][2] = -2.f*(f*n)/(f-n); 357 | M[3][0] = M[3][1] = M[3][3] = 0.f; 358 | } 359 | LINMATH_H_FUNC void mat4x4_ortho(mat4x4 M, float l, float r, float b, float t, float n, float f) 360 | { 361 | M[0][0] = 2.f/(r-l); 362 | M[0][1] = M[0][2] = M[0][3] = 0.f; 363 | 364 | M[1][1] = 2.f/(t-b); 365 | M[1][0] = M[1][2] = M[1][3] = 0.f; 366 | 367 | M[2][2] = -2.f/(f-n); 368 | M[2][0] = M[2][1] = M[2][3] = 0.f; 369 | 370 | M[3][0] = -(r+l)/(r-l); 371 | M[3][1] = -(t+b)/(t-b); 372 | M[3][2] = -(f+n)/(f-n); 373 | M[3][3] = 1.f; 374 | } 375 | LINMATH_H_FUNC void mat4x4_perspective(mat4x4 m, float y_fov, float aspect, float n, float f) 376 | { 377 | /* NOTE: Degrees are an unhandy unit to work with. 378 | * linmath.h uses radians for everything! */ 379 | float const a = 1.f / tanf(y_fov / 2.f); 380 | 381 | m[0][0] = a / aspect; 382 | m[0][1] = 0.f; 383 | m[0][2] = 0.f; 384 | m[0][3] = 0.f; 385 | 386 | m[1][0] = 0.f; 387 | m[1][1] = a; 388 | m[1][2] = 0.f; 389 | m[1][3] = 0.f; 390 | 391 | m[2][0] = 0.f; 392 | m[2][1] = 0.f; 393 | m[2][2] = -((f + n) / (f - n)); 394 | m[2][3] = -1.f; 395 | 396 | m[3][0] = 0.f; 397 | m[3][1] = 0.f; 398 | m[3][2] = -((2.f * f * n) / (f - n)); 399 | m[3][3] = 0.f; 400 | } 401 | LINMATH_H_FUNC void mat4x4_look_at(mat4x4 m, vec3 eye, vec3 center, vec3 up) 402 | { 403 | /* Adapted from Android's OpenGL Matrix.java. */ 404 | /* See the OpenGL GLUT documentation for gluLookAt for a description */ 405 | /* of the algorithm. We implement it in a straightforward way: */ 406 | 407 | /* TODO: The negation of of can be spared by swapping the order of 408 | * operands in the following cross products in the right way. */ 409 | vec3 f; 410 | vec3_sub(f, center, eye); 411 | vec3_norm(f, f); 412 | 413 | vec3 s; 414 | vec3_mul_cross(s, f, up); 415 | vec3_norm(s, s); 416 | 417 | vec3 t; 418 | vec3_mul_cross(t, s, f); 419 | 420 | m[0][0] = s[0]; 421 | m[0][1] = t[0]; 422 | m[0][2] = -f[0]; 423 | m[0][3] = 0.f; 424 | 425 | m[1][0] = s[1]; 426 | m[1][1] = t[1]; 427 | m[1][2] = -f[1]; 428 | m[1][3] = 0.f; 429 | 430 | m[2][0] = s[2]; 431 | m[2][1] = t[2]; 432 | m[2][2] = -f[2]; 433 | m[2][3] = 0.f; 434 | 435 | m[3][0] = 0.f; 436 | m[3][1] = 0.f; 437 | m[3][2] = 0.f; 438 | m[3][3] = 1.f; 439 | 440 | mat4x4_translate_in_place(m, -eye[0], -eye[1], -eye[2]); 441 | } 442 | 443 | typedef float quat[4]; 444 | LINMATH_H_FUNC void quat_identity(quat q) 445 | { 446 | q[0] = q[1] = q[2] = 0.f; 447 | q[3] = 1.f; 448 | } 449 | LINMATH_H_FUNC void quat_add(quat r, quat a, quat b) 450 | { 451 | int i; 452 | for(i=0; i<4; ++i) 453 | r[i] = a[i] + b[i]; 454 | } 455 | LINMATH_H_FUNC void quat_sub(quat r, quat a, quat b) 456 | { 457 | int i; 458 | for(i=0; i<4; ++i) 459 | r[i] = a[i] - b[i]; 460 | } 461 | LINMATH_H_FUNC void quat_mul(quat r, quat p, quat q) 462 | { 463 | vec3 w; 464 | vec3_mul_cross(r, p, q); 465 | vec3_scale(w, p, q[3]); 466 | vec3_add(r, r, w); 467 | vec3_scale(w, q, p[3]); 468 | vec3_add(r, r, w); 469 | r[3] = p[3]*q[3] - vec3_mul_inner(p, q); 470 | } 471 | LINMATH_H_FUNC void quat_scale(quat r, quat v, float s) 472 | { 473 | int i; 474 | for(i=0; i<4; ++i) 475 | r[i] = v[i] * s; 476 | } 477 | LINMATH_H_FUNC float quat_inner_product(quat a, quat b) 478 | { 479 | float p = 0.f; 480 | int i; 481 | for(i=0; i<4; ++i) 482 | p += b[i]*a[i]; 483 | return p; 484 | } 485 | LINMATH_H_FUNC void quat_conj(quat r, quat q) 486 | { 487 | int i; 488 | for(i=0; i<3; ++i) 489 | r[i] = -q[i]; 490 | r[3] = q[3]; 491 | } 492 | LINMATH_H_FUNC void quat_rotate(quat r, float angle, vec3 axis) { 493 | vec3 v; 494 | vec3_scale(v, axis, sinf(angle / 2)); 495 | int i; 496 | for(i=0; i<3; ++i) 497 | r[i] = v[i]; 498 | r[3] = cosf(angle / 2); 499 | } 500 | #define quat_norm vec4_norm 501 | LINMATH_H_FUNC void quat_mul_vec3(vec3 r, quat q, vec3 v) 502 | { 503 | /* 504 | * Method by Fabian 'ryg' Giessen (of Farbrausch) 505 | t = 2 * cross(q.xyz, v) 506 | v' = v + q.w * t + cross(q.xyz, t) 507 | */ 508 | vec3 t; 509 | vec3 q_xyz = {q[0], q[1], q[2]}; 510 | vec3 u = {q[0], q[1], q[2]}; 511 | 512 | vec3_mul_cross(t, q_xyz, v); 513 | vec3_scale(t, t, 2); 514 | 515 | vec3_mul_cross(u, q_xyz, t); 516 | vec3_scale(t, t, q[3]); 517 | 518 | vec3_add(r, v, t); 519 | vec3_add(r, r, u); 520 | } 521 | LINMATH_H_FUNC void mat4x4_from_quat(mat4x4 M, quat q) 522 | { 523 | float a = q[3]; 524 | float b = q[0]; 525 | float c = q[1]; 526 | float d = q[2]; 527 | float a2 = a*a; 528 | float b2 = b*b; 529 | float c2 = c*c; 530 | float d2 = d*d; 531 | 532 | M[0][0] = a2 + b2 - c2 - d2; 533 | M[0][1] = 2.f*(b*c + a*d); 534 | M[0][2] = 2.f*(b*d - a*c); 535 | M[0][3] = 0.f; 536 | 537 | M[1][0] = 2*(b*c - a*d); 538 | M[1][1] = a2 - b2 + c2 - d2; 539 | M[1][2] = 2.f*(c*d + a*b); 540 | M[1][3] = 0.f; 541 | 542 | M[2][0] = 2.f*(b*d + a*c); 543 | M[2][1] = 2.f*(c*d - a*b); 544 | M[2][2] = a2 - b2 - c2 + d2; 545 | M[2][3] = 0.f; 546 | 547 | M[3][0] = M[3][1] = M[3][2] = 0.f; 548 | M[3][3] = 1.f; 549 | } 550 | 551 | LINMATH_H_FUNC void mat4x4o_mul_quat(mat4x4 R, mat4x4 M, quat q) 552 | { 553 | /* XXX: The way this is written only works for othogonal matrices. */ 554 | /* TODO: Take care of non-orthogonal case. */ 555 | quat_mul_vec3(R[0], q, M[0]); 556 | quat_mul_vec3(R[1], q, M[1]); 557 | quat_mul_vec3(R[2], q, M[2]); 558 | 559 | R[3][0] = R[3][1] = R[3][2] = 0.f; 560 | R[3][3] = 1.f; 561 | } 562 | LINMATH_H_FUNC void quat_from_mat4x4(quat q, mat4x4 M) 563 | { 564 | float r=0.f; 565 | int i; 566 | 567 | int perm[] = { 0, 1, 2, 0, 1 }; 568 | int *p = perm; 569 | 570 | for(i = 0; i<3; i++) { 571 | float m = M[i][i]; 572 | if( m < r ) 573 | continue; 574 | m = r; 575 | p = &perm[i]; 576 | } 577 | 578 | r = sqrtf(1.f + M[p[0]][p[0]] - M[p[1]][p[1]] - M[p[2]][p[2]] ); 579 | 580 | if(r < 1e-6) { 581 | q[0] = 1.f; 582 | q[1] = q[2] = q[3] = 0.f; 583 | return; 584 | } 585 | 586 | q[0] = r/2.f; 587 | q[1] = (M[p[0]][p[1]] - M[p[1]][p[0]])/(2.f*r); 588 | q[2] = (M[p[2]][p[0]] - M[p[0]][p[2]])/(2.f*r); 589 | q[3] = (M[p[2]][p[1]] - M[p[1]][p[2]])/(2.f*r); 590 | } 591 | 592 | LINMATH_H_FUNC void mat4x4_arcball(mat4x4 R, mat4x4 M, vec2 _a, vec2 _b, float s) 593 | { 594 | vec2 a; memcpy(a, _a, sizeof(a)); 595 | vec2 b; memcpy(b, _b, sizeof(b)); 596 | 597 | float z_a = 0.; 598 | float z_b = 0.; 599 | 600 | if(vec2_len(a) < 1.f) { 601 | z_a = sqrtf(1.f - vec2_mul_inner(a, a)); 602 | } else { 603 | vec2_norm(a, a); 604 | } 605 | 606 | if(vec2_len(b) < 1.f) { 607 | z_b = sqrtf(1.f - vec2_mul_inner(b, b)); 608 | } else { 609 | vec2_norm(b, b); 610 | } 611 | 612 | vec3 a_ = {a[0], a[1], z_a}; 613 | vec3 b_ = {b[0], b[1], z_b}; 614 | 615 | vec3 c_; 616 | vec3_mul_cross(c_, a_, b_); 617 | 618 | float const angle = acosf(vec3_mul_inner(a_, b_)) * s; 619 | mat4x4_rotate(R, M, c_[0], c_[1], c_[2], angle); 620 | } 621 | #endif 622 | -------------------------------------------------------------------------------- /example/test.c: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Title: GLBoing 3 | * Desc: Tribute to Amiga Boing. 4 | * Author: Jim Brooks 5 | * Original Amiga authors were R.J. Mical and Dale Luck. 6 | * GLFW conversion by Marcus Geelnard 7 | * Notes: - 360' = 2*PI [radian] 8 | * 9 | * - Distances between objects are created by doing a relative 10 | * Z translations. 11 | * 12 | * - Although OpenGL enticingly supports alpha-blending, 13 | * the shadow of the original Boing didn't affect the color 14 | * of the grid. 15 | * 16 | * - [Marcus] Changed timing scheme from interval driven to frame- 17 | * time based animation steps (which results in much smoother 18 | * movement) 19 | * 20 | * History of Amiga Boing: 21 | * 22 | * Boing was demonstrated on the prototype Amiga (codenamed "Lorraine") in 23 | * 1985. According to legend, it was written ad-hoc in one night by 24 | * R. J. Mical and Dale Luck. Because the bouncing ball animation was so fast 25 | * and smooth, attendees did not believe the Amiga prototype was really doing 26 | * the rendering. Suspecting a trick, they began looking around the booth for 27 | * a hidden computer or VCR. 28 | *****************************************************************************/ 29 | 30 | #if defined(_MSC_VER) 31 | // Make MS math.h define M_PI 32 | #define _USE_MATH_DEFINES 33 | #endif 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | #define LSH_GLFW_IMPLEMENTATION 40 | 41 | #ifdef __APPLE__ 42 | #if 1 // glad required 43 | #define GLFW_INCLUDE_NONE 44 | #include "glad/gl.h" 45 | #else // else -framework OpenGL required 46 | #define gladLoadGL(func) 47 | #endif 48 | #define _GLFW_COCOA 49 | #include "glfw.h" 50 | #else 51 | #define GLFW_INCLUDE_NONE 52 | #define _GLFW_X11 53 | #include "glfw.h" 54 | #include "glad/gl.h" 55 | #endif 56 | 57 | #include "linmath.h" 58 | 59 | 60 | /***************************************************************************** 61 | * Various declarations and macros 62 | *****************************************************************************/ 63 | 64 | /* Prototypes */ 65 | void init( void ); 66 | void display( void ); 67 | void reshape( GLFWwindow* window, int w, int h ); 68 | void key_callback( GLFWwindow* window, int key, int scancode, int action, int mods ); 69 | void mouse_button_callback( GLFWwindow* window, int button, int action, int mods ); 70 | void cursor_position_callback( GLFWwindow* window, double x, double y ); 71 | void DrawBoingBall( void ); 72 | void BounceBall( double dt ); 73 | void DrawBoingBallBand( GLfloat long_lo, GLfloat long_hi ); 74 | void DrawGrid( void ); 75 | 76 | #define RADIUS 70.f 77 | #define STEP_LONGITUDE 22.5f /* 22.5 makes 8 bands like original Boing */ 78 | #define STEP_LATITUDE 22.5f 79 | 80 | #define DIST_BALL (RADIUS * 2.f + RADIUS * 0.1f) 81 | 82 | #define VIEW_SCENE_DIST (DIST_BALL * 3.f + 200.f)/* distance from viewer to middle of boing area */ 83 | #define GRID_SIZE (RADIUS * 4.5f) /* length (width) of grid */ 84 | #define BOUNCE_HEIGHT (RADIUS * 2.1f) 85 | #define BOUNCE_WIDTH (RADIUS * 2.1f) 86 | 87 | #define SHADOW_OFFSET_X -20.f 88 | #define SHADOW_OFFSET_Y 10.f 89 | #define SHADOW_OFFSET_Z 0.f 90 | 91 | #define WALL_L_OFFSET 0.f 92 | #define WALL_R_OFFSET 5.f 93 | 94 | /* Animation speed (50.0 mimics the original GLUT demo speed) */ 95 | #define ANIMATION_SPEED 50.f 96 | 97 | /* Maximum allowed delta time per physics iteration */ 98 | #define MAX_DELTA_T 0.02f 99 | 100 | /* Draw ball, or its shadow */ 101 | typedef enum { DRAW_BALL, DRAW_BALL_SHADOW } DRAW_BALL_ENUM; 102 | 103 | /* Vertex type */ 104 | typedef struct {float x; float y; float z;} vertex_t; 105 | 106 | /* Global vars */ 107 | int windowed_xpos, windowed_ypos, windowed_width, windowed_height; 108 | int width, height; 109 | GLfloat deg_rot_y = 0.f; 110 | GLfloat deg_rot_y_inc = 2.f; 111 | int override_pos = GLFW_FALSE; 112 | GLfloat cursor_x = 0.f; 113 | GLfloat cursor_y = 0.f; 114 | GLfloat ball_x = -RADIUS; 115 | GLfloat ball_y = -RADIUS; 116 | GLfloat ball_x_inc = 1.f; 117 | GLfloat ball_y_inc = 2.f; 118 | DRAW_BALL_ENUM drawBallHow; 119 | double t; 120 | double t_old = 0.f; 121 | double dt; 122 | 123 | /* Random number generator */ 124 | #ifndef RAND_MAX 125 | #define RAND_MAX 4095 126 | #endif 127 | 128 | 129 | /***************************************************************************** 130 | * Truncate a degree. 131 | *****************************************************************************/ 132 | GLfloat TruncateDeg( GLfloat deg ) 133 | { 134 | if ( deg >= 360.f ) 135 | return (deg - 360.f); 136 | else 137 | return deg; 138 | } 139 | 140 | /***************************************************************************** 141 | * Convert a degree (360-based) into a radian. 142 | * 360' = 2 * PI 143 | *****************************************************************************/ 144 | double deg2rad( double deg ) 145 | { 146 | return deg / 360 * (2 * M_PI); 147 | } 148 | 149 | /***************************************************************************** 150 | * 360' sin(). 151 | *****************************************************************************/ 152 | double sin_deg( double deg ) 153 | { 154 | return sin( deg2rad( deg ) ); 155 | } 156 | 157 | /***************************************************************************** 158 | * 360' cos(). 159 | *****************************************************************************/ 160 | double cos_deg( double deg ) 161 | { 162 | return cos( deg2rad( deg ) ); 163 | } 164 | 165 | /***************************************************************************** 166 | * Compute a cross product (for a normal vector). 167 | * 168 | * c = a x b 169 | *****************************************************************************/ 170 | void CrossProduct( vertex_t a, vertex_t b, vertex_t c, vertex_t *n ) 171 | { 172 | GLfloat u1, u2, u3; 173 | GLfloat v1, v2, v3; 174 | 175 | u1 = b.x - a.x; 176 | u2 = b.y - a.y; 177 | u3 = b.y - a.z; 178 | 179 | v1 = c.x - a.x; 180 | v2 = c.y - a.y; 181 | v3 = c.z - a.z; 182 | 183 | n->x = u2 * v3 - v2 * u3; 184 | n->y = u3 * v1 - v3 * u1; 185 | n->z = u1 * v2 - v1 * u2; 186 | } 187 | 188 | 189 | #define BOING_DEBUG 0 190 | 191 | 192 | /***************************************************************************** 193 | * init() 194 | *****************************************************************************/ 195 | void init( void ) 196 | { 197 | /* 198 | * Clear background. 199 | */ 200 | glClearColor( 0.55f, 0.55f, 0.55f, 0.f ); 201 | 202 | glShadeModel( GL_FLAT ); 203 | } 204 | 205 | 206 | /***************************************************************************** 207 | * display() 208 | *****************************************************************************/ 209 | void display(void) 210 | { 211 | glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); 212 | glPushMatrix(); 213 | 214 | drawBallHow = DRAW_BALL_SHADOW; 215 | DrawBoingBall(); 216 | 217 | DrawGrid(); 218 | 219 | drawBallHow = DRAW_BALL; 220 | DrawBoingBall(); 221 | 222 | glPopMatrix(); 223 | glFlush(); 224 | } 225 | 226 | 227 | /***************************************************************************** 228 | * reshape() 229 | *****************************************************************************/ 230 | void reshape( GLFWwindow* window, int w, int h ) 231 | { 232 | mat4x4 projection, view; 233 | 234 | glViewport( 0, 0, (GLsizei)w, (GLsizei)h ); 235 | 236 | glMatrixMode( GL_PROJECTION ); 237 | mat4x4_perspective( projection, 238 | 2.f * (float) atan2( RADIUS, 200.f ), 239 | (float)w / (float)h, 240 | 1.f, VIEW_SCENE_DIST ); 241 | glLoadMatrixf((const GLfloat*) projection); 242 | 243 | glMatrixMode( GL_MODELVIEW ); 244 | { 245 | vec3 eye = { 0.f, 0.f, VIEW_SCENE_DIST }; 246 | vec3 center = { 0.f, 0.f, 0.f }; 247 | vec3 up = { 0.f, -1.f, 0.f }; 248 | mat4x4_look_at( view, eye, center, up ); 249 | } 250 | glLoadMatrixf((const GLfloat*) view); 251 | } 252 | 253 | void key_callback( GLFWwindow* window, int key, int scancode, int action, int mods ) 254 | { 255 | if (action != GLFW_PRESS) 256 | return; 257 | 258 | if (key == GLFW_KEY_ESCAPE && mods == 0) 259 | glfwSetWindowShouldClose(window, GLFW_TRUE); 260 | if ((key == GLFW_KEY_ENTER && mods == GLFW_MOD_ALT) || 261 | (key == GLFW_KEY_F11 && mods == GLFW_MOD_ALT)) 262 | { 263 | if (glfwGetWindowMonitor(window)) 264 | { 265 | glfwSetWindowMonitor(window, NULL, 266 | windowed_xpos, windowed_ypos, 267 | windowed_width, windowed_height, 0); 268 | } 269 | else 270 | { 271 | GLFWmonitor* monitor = glfwGetPrimaryMonitor(); 272 | if (monitor) 273 | { 274 | const GLFWvidmode* mode = glfwGetVideoMode(monitor); 275 | glfwGetWindowPos(window, &windowed_xpos, &windowed_ypos); 276 | glfwGetWindowSize(window, &windowed_width, &windowed_height); 277 | glfwSetWindowMonitor(window, monitor, 0, 0, mode->width, mode->height, mode->refreshRate); 278 | } 279 | } 280 | } 281 | } 282 | 283 | static void set_ball_pos ( GLfloat x, GLfloat y ) 284 | { 285 | ball_x = (width / 2) - x; 286 | ball_y = y - (height / 2); 287 | } 288 | 289 | void mouse_button_callback( GLFWwindow* window, int button, int action, int mods ) 290 | { 291 | if (button != GLFW_MOUSE_BUTTON_LEFT) 292 | return; 293 | 294 | if (action == GLFW_PRESS) 295 | { 296 | override_pos = GLFW_TRUE; 297 | set_ball_pos(cursor_x, cursor_y); 298 | } 299 | else 300 | { 301 | override_pos = GLFW_FALSE; 302 | } 303 | } 304 | 305 | void cursor_position_callback( GLFWwindow* window, double x, double y ) 306 | { 307 | cursor_x = (float) x; 308 | cursor_y = (float) y; 309 | 310 | if ( override_pos ) 311 | set_ball_pos(cursor_x, cursor_y); 312 | } 313 | 314 | /***************************************************************************** 315 | * Draw the Boing ball. 316 | * 317 | * The Boing ball is sphere in which each facet is a rectangle. 318 | * Facet colors alternate between red and white. 319 | * The ball is built by stacking latitudinal circles. Each circle is composed 320 | * of a widely-separated set of points, so that each facet is noticeably large. 321 | *****************************************************************************/ 322 | void DrawBoingBall( void ) 323 | { 324 | GLfloat lon_deg; /* degree of longitude */ 325 | double dt_total, dt2; 326 | 327 | glPushMatrix(); 328 | glMatrixMode( GL_MODELVIEW ); 329 | 330 | /* 331 | * Another relative Z translation to separate objects. 332 | */ 333 | glTranslatef( 0.0, 0.0, DIST_BALL ); 334 | 335 | /* Update ball position and rotation (iterate if necessary) */ 336 | dt_total = dt; 337 | while( dt_total > 0.0 ) 338 | { 339 | dt2 = dt_total > MAX_DELTA_T ? MAX_DELTA_T : dt_total; 340 | dt_total -= dt2; 341 | BounceBall( dt2 ); 342 | deg_rot_y = TruncateDeg( deg_rot_y + deg_rot_y_inc*((float)dt2*ANIMATION_SPEED) ); 343 | } 344 | 345 | /* Set ball position */ 346 | glTranslatef( ball_x, ball_y, 0.0 ); 347 | 348 | /* 349 | * Offset the shadow. 350 | */ 351 | if ( drawBallHow == DRAW_BALL_SHADOW ) 352 | { 353 | glTranslatef( SHADOW_OFFSET_X, 354 | SHADOW_OFFSET_Y, 355 | SHADOW_OFFSET_Z ); 356 | } 357 | 358 | /* 359 | * Tilt the ball. 360 | */ 361 | glRotatef( -20.0, 0.0, 0.0, 1.0 ); 362 | 363 | /* 364 | * Continually rotate ball around Y axis. 365 | */ 366 | glRotatef( deg_rot_y, 0.0, 1.0, 0.0 ); 367 | 368 | /* 369 | * Set OpenGL state for Boing ball. 370 | */ 371 | glCullFace( GL_FRONT ); 372 | glEnable( GL_CULL_FACE ); 373 | glEnable( GL_NORMALIZE ); 374 | 375 | /* 376 | * Build a faceted latitude slice of the Boing ball, 377 | * stepping same-sized vertical bands of the sphere. 378 | */ 379 | for ( lon_deg = 0; 380 | lon_deg < 180; 381 | lon_deg += STEP_LONGITUDE ) 382 | { 383 | /* 384 | * Draw a latitude circle at this longitude. 385 | */ 386 | DrawBoingBallBand( lon_deg, 387 | lon_deg + STEP_LONGITUDE ); 388 | } 389 | 390 | glPopMatrix(); 391 | 392 | return; 393 | } 394 | 395 | 396 | /***************************************************************************** 397 | * Bounce the ball. 398 | *****************************************************************************/ 399 | void BounceBall( double delta_t ) 400 | { 401 | GLfloat sign; 402 | GLfloat deg; 403 | 404 | if ( override_pos ) 405 | return; 406 | 407 | /* Bounce on walls */ 408 | if ( ball_x > (BOUNCE_WIDTH/2 + WALL_R_OFFSET ) ) 409 | { 410 | ball_x_inc = -0.5f - 0.75f * (GLfloat)rand() / (GLfloat)RAND_MAX; 411 | deg_rot_y_inc = -deg_rot_y_inc; 412 | } 413 | if ( ball_x < -(BOUNCE_HEIGHT/2 + WALL_L_OFFSET) ) 414 | { 415 | ball_x_inc = 0.5f + 0.75f * (GLfloat)rand() / (GLfloat)RAND_MAX; 416 | deg_rot_y_inc = -deg_rot_y_inc; 417 | } 418 | 419 | /* Bounce on floor / roof */ 420 | if ( ball_y > BOUNCE_HEIGHT/2 ) 421 | { 422 | ball_y_inc = -0.75f - 1.f * (GLfloat)rand() / (GLfloat)RAND_MAX; 423 | } 424 | if ( ball_y < -BOUNCE_HEIGHT/2*0.85 ) 425 | { 426 | ball_y_inc = 0.75f + 1.f * (GLfloat)rand() / (GLfloat)RAND_MAX; 427 | } 428 | 429 | /* Update ball position */ 430 | ball_x += ball_x_inc * ((float)delta_t*ANIMATION_SPEED); 431 | ball_y += ball_y_inc * ((float)delta_t*ANIMATION_SPEED); 432 | 433 | /* 434 | * Simulate the effects of gravity on Y movement. 435 | */ 436 | if ( ball_y_inc < 0 ) sign = -1.0; else sign = 1.0; 437 | 438 | deg = (ball_y + BOUNCE_HEIGHT/2) * 90 / BOUNCE_HEIGHT; 439 | if ( deg > 80 ) deg = 80; 440 | if ( deg < 10 ) deg = 10; 441 | 442 | ball_y_inc = sign * 4.f * (float) sin_deg( deg ); 443 | } 444 | 445 | 446 | /***************************************************************************** 447 | * Draw a faceted latitude band of the Boing ball. 448 | * 449 | * Parms: long_lo, long_hi 450 | * Low and high longitudes of slice, resp. 451 | *****************************************************************************/ 452 | void DrawBoingBallBand( GLfloat long_lo, 453 | GLfloat long_hi ) 454 | { 455 | vertex_t vert_ne; /* "ne" means south-east, so on */ 456 | vertex_t vert_nw; 457 | vertex_t vert_sw; 458 | vertex_t vert_se; 459 | vertex_t vert_norm; 460 | GLfloat lat_deg; 461 | static int colorToggle = 0; 462 | 463 | /* 464 | * Iterate through the points of a latitude circle. 465 | * A latitude circle is a 2D set of X,Z points. 466 | */ 467 | for ( lat_deg = 0; 468 | lat_deg <= (360 - STEP_LATITUDE); 469 | lat_deg += STEP_LATITUDE ) 470 | { 471 | /* 472 | * Color this polygon with red or white. 473 | */ 474 | if ( colorToggle ) 475 | glColor3f( 0.8f, 0.1f, 0.1f ); 476 | else 477 | glColor3f( 0.95f, 0.95f, 0.95f ); 478 | #if 0 479 | if ( lat_deg >= 180 ) 480 | if ( colorToggle ) 481 | glColor3f( 0.1f, 0.8f, 0.1f ); 482 | else 483 | glColor3f( 0.5f, 0.5f, 0.95f ); 484 | #endif 485 | colorToggle = ! colorToggle; 486 | 487 | /* 488 | * Change color if drawing shadow. 489 | */ 490 | if ( drawBallHow == DRAW_BALL_SHADOW ) 491 | glColor3f( 0.35f, 0.35f, 0.35f ); 492 | 493 | /* 494 | * Assign each Y. 495 | */ 496 | vert_ne.y = vert_nw.y = (float) cos_deg(long_hi) * RADIUS; 497 | vert_sw.y = vert_se.y = (float) cos_deg(long_lo) * RADIUS; 498 | 499 | /* 500 | * Assign each X,Z with sin,cos values scaled by latitude radius indexed by longitude. 501 | * Eg, long=0 and long=180 are at the poles, so zero scale is sin(longitude), 502 | * while long=90 (sin(90)=1) is at equator. 503 | */ 504 | vert_ne.x = (float) cos_deg( lat_deg ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE )); 505 | vert_se.x = (float) cos_deg( lat_deg ) * (RADIUS * (float) sin_deg( long_lo )); 506 | vert_nw.x = (float) cos_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE )); 507 | vert_sw.x = (float) cos_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo )); 508 | 509 | vert_ne.z = (float) sin_deg( lat_deg ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE )); 510 | vert_se.z = (float) sin_deg( lat_deg ) * (RADIUS * (float) sin_deg( long_lo )); 511 | vert_nw.z = (float) sin_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo + STEP_LONGITUDE )); 512 | vert_sw.z = (float) sin_deg( lat_deg + STEP_LATITUDE ) * (RADIUS * (float) sin_deg( long_lo )); 513 | 514 | /* 515 | * Draw the facet. 516 | */ 517 | glBegin( GL_POLYGON ); 518 | 519 | CrossProduct( vert_ne, vert_nw, vert_sw, &vert_norm ); 520 | glNormal3f( vert_norm.x, vert_norm.y, vert_norm.z ); 521 | 522 | glVertex3f( vert_ne.x, vert_ne.y, vert_ne.z ); 523 | glVertex3f( vert_nw.x, vert_nw.y, vert_nw.z ); 524 | glVertex3f( vert_sw.x, vert_sw.y, vert_sw.z ); 525 | glVertex3f( vert_se.x, vert_se.y, vert_se.z ); 526 | 527 | glEnd(); 528 | 529 | #if BOING_DEBUG 530 | printf( "----------------------------------------------------------- \n" ); 531 | printf( "lat = %f long_lo = %f long_hi = %f \n", lat_deg, long_lo, long_hi ); 532 | printf( "vert_ne x = %.8f y = %.8f z = %.8f \n", vert_ne.x, vert_ne.y, vert_ne.z ); 533 | printf( "vert_nw x = %.8f y = %.8f z = %.8f \n", vert_nw.x, vert_nw.y, vert_nw.z ); 534 | printf( "vert_se x = %.8f y = %.8f z = %.8f \n", vert_se.x, vert_se.y, vert_se.z ); 535 | printf( "vert_sw x = %.8f y = %.8f z = %.8f \n", vert_sw.x, vert_sw.y, vert_sw.z ); 536 | #endif 537 | 538 | } 539 | 540 | /* 541 | * Toggle color so that next band will opposite red/white colors than this one. 542 | */ 543 | colorToggle = ! colorToggle; 544 | 545 | /* 546 | * This circular band is done. 547 | */ 548 | return; 549 | } 550 | 551 | 552 | /***************************************************************************** 553 | * Draw the purple grid of lines, behind the Boing ball. 554 | * When the Workbench is dropped to the bottom, Boing shows 12 rows. 555 | *****************************************************************************/ 556 | void DrawGrid( void ) 557 | { 558 | int row, col; 559 | const int rowTotal = 12; /* must be divisible by 2 */ 560 | const int colTotal = rowTotal; /* must be same as rowTotal */ 561 | const GLfloat widthLine = 2.0; /* should be divisible by 2 */ 562 | const GLfloat sizeCell = GRID_SIZE / rowTotal; 563 | const GLfloat z_offset = -40.0; 564 | GLfloat xl, xr; 565 | GLfloat yt, yb; 566 | 567 | glPushMatrix(); 568 | glDisable( GL_CULL_FACE ); 569 | 570 | /* 571 | * Another relative Z translation to separate objects. 572 | */ 573 | glTranslatef( 0.0, 0.0, DIST_BALL ); 574 | 575 | /* 576 | * Draw vertical lines (as skinny 3D rectangles). 577 | */ 578 | for ( col = 0; col <= colTotal; col++ ) 579 | { 580 | /* 581 | * Compute co-ords of line. 582 | */ 583 | xl = -GRID_SIZE / 2 + col * sizeCell; 584 | xr = xl + widthLine; 585 | 586 | yt = GRID_SIZE / 2; 587 | yb = -GRID_SIZE / 2 - widthLine; 588 | 589 | glBegin( GL_POLYGON ); 590 | 591 | glColor3f( 0.6f, 0.1f, 0.6f ); /* purple */ 592 | 593 | glVertex3f( xr, yt, z_offset ); /* NE */ 594 | glVertex3f( xl, yt, z_offset ); /* NW */ 595 | glVertex3f( xl, yb, z_offset ); /* SW */ 596 | glVertex3f( xr, yb, z_offset ); /* SE */ 597 | 598 | glEnd(); 599 | } 600 | 601 | /* 602 | * Draw horizontal lines (as skinny 3D rectangles). 603 | */ 604 | for ( row = 0; row <= rowTotal; row++ ) 605 | { 606 | /* 607 | * Compute co-ords of line. 608 | */ 609 | yt = GRID_SIZE / 2 - row * sizeCell; 610 | yb = yt - widthLine; 611 | 612 | xl = -GRID_SIZE / 2; 613 | xr = GRID_SIZE / 2 + widthLine; 614 | 615 | glBegin( GL_POLYGON ); 616 | 617 | glColor3f( 0.6f, 0.1f, 0.6f ); /* purple */ 618 | 619 | glVertex3f( xr, yt, z_offset ); /* NE */ 620 | glVertex3f( xl, yt, z_offset ); /* NW */ 621 | glVertex3f( xl, yb, z_offset ); /* SW */ 622 | glVertex3f( xr, yb, z_offset ); /* SE */ 623 | 624 | glEnd(); 625 | } 626 | 627 | glPopMatrix(); 628 | 629 | return; 630 | } 631 | 632 | 633 | /*======================================================================* 634 | * main() 635 | *======================================================================*/ 636 | 637 | int main( void ) 638 | { 639 | GLFWwindow* window; 640 | 641 | /* Init GLFW */ 642 | if( !glfwInit() ) 643 | exit( EXIT_FAILURE ); 644 | 645 | window = glfwCreateWindow( 400, 400, "Boing (classic Amiga demo)", NULL, NULL ); 646 | if (!window) 647 | { 648 | glfwTerminate(); 649 | exit( EXIT_FAILURE ); 650 | } 651 | 652 | glfwSetWindowAspectRatio(window, 1, 1); 653 | 654 | glfwSetFramebufferSizeCallback(window, reshape); 655 | glfwSetKeyCallback(window, key_callback); 656 | glfwSetMouseButtonCallback(window, mouse_button_callback); 657 | glfwSetCursorPosCallback(window, cursor_position_callback); 658 | 659 | glfwMakeContextCurrent(window); 660 | gladLoadGL(glfwGetProcAddress); 661 | glfwSwapInterval( 1 ); 662 | 663 | glfwGetFramebufferSize(window, &width, &height); 664 | reshape(window, width, height); 665 | 666 | glfwSetTime( 0.0 ); 667 | 668 | init(); 669 | 670 | /* Main loop */ 671 | for (;;) 672 | { 673 | /* Timing */ 674 | t = glfwGetTime(); 675 | dt = t - t_old; 676 | t_old = t; 677 | 678 | /* Draw one frame */ 679 | display(); 680 | 681 | /* Swap buffers */ 682 | glfwSwapBuffers(window); 683 | glfwPollEvents(); 684 | 685 | /* Check if we are still running */ 686 | if (glfwWindowShouldClose(window)) 687 | break; 688 | } 689 | 690 | glfwTerminate(); 691 | exit( EXIT_SUCCESS ); 692 | } 693 | 694 | -------------------------------------------------------------------------------- /generate_glfw_single_header.py: -------------------------------------------------------------------------------- 1 | # forked from https://github.com/SasLuca/glfw-single-header (CC0-1.0 licensed) 2 | # _GLFW_COCOA 3 | # _GLFW_WIN32 4 | # _GLFW_X11 5 | # _GLFW_WAYLAND 6 | # _GLFW_OSMESA 7 | 8 | import os 9 | 10 | win32_defines = [ 11 | "#ifdef _MSC_VER\n#define _CRT_SECURE_NO_WARNINGS\n#endif", 12 | "#ifndef _GLFW_USE_HYBRID_HPG\n#define _GLFW_USE_HYBRID_HPG 1\n#endif", 13 | "#define _UNICODE", 14 | "#ifdef MINGW\n#define UNICODE\n#define WINVER 0x0501\n#endif", ] 15 | 16 | win32_sources = [ "win32_init.c", "win32_joystick.c", "win32_monitor.c", "win32_time.c", "win32_thread.c", "win32_window.c", "wgl_context.c", ] 17 | osmesa_sources = [ "null_init.c", "null_monitor.c", "null_window.c", "null_joystick.c", ] 18 | x11_sources = [ "x11_init.c", "x11_monitor.c", "x11_window.c", "glx_context.c", ] 19 | wayland_sources = [ "wl_init.c", "wl_monitor.c", "wl_window.c", ] 20 | cocoa_sources = [ "cocoa_init.m", "nsgl_context.m", "cocoa_joystick.m", "cocoa_monitor.m", "cocoa_window.m", "cocoa_time.c", ] 21 | time_sources = [ "posix_time.c", ] 22 | thread_sources = [ "posix_thread.c", ] 23 | linux_sources = [ "linux_joystick.c", "xkb_unicode.c", ] 24 | 25 | headers = list([ 26 | "cocoa_joystick.h", 27 | "cocoa_platform.h", 28 | "egl_context.h", 29 | "glx_context.h", 30 | "linux_joystick.h", 31 | "mappings.h", 32 | "nsgl_context.h", 33 | "null_joystick.h", 34 | "null_platform.h", 35 | "osmesa_context.h", 36 | "posix_thread.h", 37 | "posix_time.h", 38 | "wgl_context.h", 39 | "win32_joystick.h", 40 | "win32_platform.h", 41 | "wl_platform.h", 42 | "x11_platform.h", 43 | "xkb_unicode.h", 44 | ]) 45 | shared_sources = [ "internal.h", "osmesa_context.c", "egl_context.c", "context.c", "init.c", "input.c", "monitor.c", "vulkan.c", "window.c", ] 46 | 47 | # Get the file using this function since it might be cached 48 | files_cache = {} 49 | def lsh_get_file(it: str) -> str: 50 | global files_cache 51 | if it in files_cache.keys(): 52 | return files_cache[it] 53 | 54 | guard = f"HEADER_GUARD_{it.replace('.', '_').upper()}" 55 | code = open(f"./glfw/src/{it}").read() 56 | files_cache[it] = f"\n#line 1 \"{it}\"\n" 57 | files_cache[it]+= f"\n#ifndef {guard}\n#define {guard}\n{code}\n#endif\n" 58 | 59 | return files_cache[it] 60 | 61 | # Include the headers into a source 62 | def include_headers(headers, source: str) -> str: 63 | if len(headers) == 0: 64 | return source 65 | 66 | for it in headers: 67 | if source.find(f"#include \"{it}\"") != -1: 68 | h = include_headers([i for i in headers if i != it], lsh_get_file(it)) 69 | source = source.replace(f"#include \"{it}\"", f"\n{h}\n") 70 | return source 71 | 72 | # Add shared code 73 | shared_source_result = "" 74 | for it in shared_sources: 75 | shared_source_result += include_headers(headers, lsh_get_file(it)) 76 | 77 | # Add win32 code 78 | win32_source_result = "\n#ifdef _GLFW_WIN32\n" 79 | for it in win32_defines: 80 | win32_source_result += "\n" + it + "\n" 81 | for it in win32_sources: 82 | win32_source_result += include_headers(headers, lsh_get_file(it)) 83 | win32_source_result += "\n#endif\n" 84 | 85 | # Add osmesa code 86 | osmesa_source_result = "\n#ifdef _GLFW_OSMESA\n" 87 | for it in osmesa_sources: 88 | osmesa_source_result += include_headers(headers, lsh_get_file(it)) 89 | osmesa_source_result += "\n#endif\n" 90 | 91 | # Add x11 code 92 | x11_source_result = "\n#ifdef _GLFW_X11\n" 93 | for it in x11_sources: 94 | x11_source_result += include_headers(headers, lsh_get_file(it)) 95 | x11_source_result += "\n#endif\n" 96 | 97 | # Add wayland code 98 | wayland_source_result = "\n#ifdef _GLFW_WAYLAND\n" 99 | for it in wayland_sources: 100 | wayland_source_result += include_headers(headers, lsh_get_file(it)) 101 | wayland_source_result += "\n#endif\n" 102 | 103 | # Add cocoa code 104 | cocoa_source_result = "\n#ifdef _GLFW_COCOA\n" 105 | for it in cocoa_sources: 106 | cocoa_source_result += include_headers(headers, lsh_get_file(it)) 107 | cocoa_source_result += "\n#endif\n" 108 | 109 | # Add posix_time code (if linux) 110 | time_source_result = "\n#if !defined _GLFW_COCOA && !defined _GLFW_WIN32\n" 111 | for it in time_sources: 112 | time_source_result += include_headers(headers, lsh_get_file(it)) 113 | time_source_result += "\n#endif\n" 114 | 115 | # Add posix_thread code (if linux+osx) (if !win32) 116 | thread_source_result = "\n#if !defined _GLFW_WIN32\n" 117 | for it in thread_sources: 118 | thread_source_result += include_headers(headers, lsh_get_file(it)) 119 | thread_source_result += "\n#endif\n" 120 | 121 | # Add linux code (if !osx && !win32 && !mesa) 122 | linux_source_result = "\n#if !defined _GLFW_COCOA && !defined _GLFW_WIN32 && !defined _GLFW_OSMESA\n" 123 | for it in linux_sources: 124 | linux_source_result += include_headers(headers, lsh_get_file(it)) 125 | linux_source_result += "\n#endif\n" 126 | 127 | # Get the glfw headers 128 | headers_result = open("./glfw/include/GLFW/glfw3.h").read() + "\n" + open("./glfw/include/GLFW/glfw3native.h").read() + "\n" 129 | 130 | # Add single header 131 | source_result = "\n#ifdef _GLFW_IMPLEMENTATION\n" 132 | source_result += shared_source_result + win32_source_result + osmesa_source_result + x11_source_result + wayland_source_result + cocoa_source_result 133 | source_result += time_source_result + thread_source_result + linux_source_result 134 | source_result += "\n#endif\n" 135 | 136 | # Comment out options macro error 137 | source_result = source_result.replace("#error \"You must not define any header option macros when compiling GLFW\"", 138 | "//#error \"You must not define any header option macros when compiling GLFW\"") 139 | 140 | # for it in win32_headers + osmesa_headers + x11_headers + wayland_headers + cocoa_headers: 141 | # source_result = source_result.replace(f"#include \"{it}\"", f"//#include \"{it}\"") 142 | 143 | source_result = source_result.replace("#include \"../include/GLFW/glfw3.h\"", "//#include \"../include/GLFW/glfw3.h\"") 144 | source_result = source_result.replace("#include \"internal.h\"", "\n") 145 | 146 | # for glad 147 | opengl_defines = [ "GL_VERSION", "GL_EXTENSIONS", "GL_NUM_EXTENSIONS", "GL_CONTEXT_FLAGS", "GL_CONTEXT_RELEASE_BEHAVIOR", "GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH", ] 148 | for it in opengl_defines: 149 | source_result = source_result.replace(f"#define {it}", f"//#define {it}") 150 | 151 | # Make dirs 152 | if not os.path.exists("./source"): 153 | os.makedirs("./source") 154 | 155 | # Make single header 156 | open("./glfw.h", "w+").write(headers_result + source_result) 157 | 158 | # Make single header + single source 159 | open("./source/glfw.h", "w+").write(headers_result) 160 | open("./source/glfw.c", "w+").write( 161 | headers_result + "\n#define _GLFW_IMPLEMENTATION\n" + source_result) 162 | --------------------------------------------------------------------------------