├── .gitignore ├── .travis.yml ├── README.md ├── dub.sdl └── source └── derelict └── opengl ├── extensions ├── arb_a.d ├── arb_b.d ├── arb_c.d ├── arb_d.d ├── arb_e.d ├── arb_f.d ├── arb_g.d ├── arb_h.d ├── arb_i.d ├── arb_m.d ├── arb_o.d ├── arb_p.d ├── arb_q.d ├── arb_r.d ├── arb_s.d ├── arb_t.d ├── arb_u.d ├── arb_v.d ├── core_30.d ├── core_31.d ├── core_32.d ├── core_33.d ├── core_40.d ├── core_41.d ├── core_42.d ├── core_43.d ├── core_44.d ├── core_45.d ├── internal.d └── khr.d ├── gl.d ├── glloader.d ├── impl.d ├── package.d ├── types.d └── versions ├── base.d ├── base_dep.d ├── gl1x.d ├── gl1x_dep.d ├── gl2x.d ├── gl2x_dep.d ├── gl3x.d ├── gl3x_dep.d └── gl4x.d /.gitignore: -------------------------------------------------------------------------------- 1 | lib 2 | bin 3 | update.txt 4 | .dub 5 | dub.selections.* -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: d 2 | 3 | sudo: false 4 | 5 | d: 6 | - dmd 7 | - dmd-2.073.2 8 | - dmd-2.072.2 9 | - dmd-2.071.2 10 | - ldc 11 | - gdc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DerelictGL3 2 | =========== 3 | 4 | A dynamic binding to OpenGL for the D Programming Language. 5 | 6 | Please see the sections on [Compiling and Linking][1] in the Derelict documentation for information on how to build DerelictGL3. DerelictGL3 differs from the other Derelict packages in that there is a two-step load process which is used to mask some platform differences in how the graphics drivers are managed. Everything in the section [The Derelict Loader][2] in the Derelict documentation still applies. The difference is that `DerelictGL3.load()`, unlike its behavior in the other bindings, does not load the entire library; it only loads the functions for OpenGL versions 1.0 and 1.1. Once a context has been created, `DerelictGL3.reload()` should be called. This will load all available versions 1.2+ and all supported ARB and EXT extensions. `reload` should also be called any time the OpenGL context is switched. The `load` method can be called before or after creating a context, but should always be called before the first call to `reload` and does not need to be called on a context switch. 7 | 8 | By default, the DerelictGL3 loader will only load core OpenGL functions and will not load any of the deprecated API or extensions. Here's some sample code. 9 | 10 | ```D 11 | // For core API functions. 12 | import derelict.opengl; 13 | 14 | void main() { 15 | // Load OpenGL versions 1.0 and 1.1. 16 | DerelictGL3.load(); 17 | 18 | // Create an OpenGL context with another library (like SDL 2 or GLFW 3) 19 | ... 20 | 21 | // Load versions 1.2+ and all supported ARB and EXT extensions. 22 | DerelictGL3.reload(); 23 | 24 | // Now OpenGL functions can be called. 25 | ... 26 | } 27 | ``` 28 | 29 | DerelictGL3 supports a compile-time configurable API. It can be used to restrict compiled OpenGL symbols to a specific version. For example, the above snippet compiles all supported core OpenGL symbols up to version 4.5 into the binary and the loader will attempt to load them all, but with the compile-time configuration options can be restricted to OpenGL 2.1, or 3.3, or any other supported version. It is also the only way to make deprecated symbols and extensions available. See the [DerelictGL3 documentation][3] for details. 30 | 31 | [1]: http://derelictorg.github.io/building/overview/ 32 | [2]: http://derelictorg.github.io/loading/loader/ 33 | [3]: http://derelictorg.github.io/packages/gl3/ 34 | -------------------------------------------------------------------------------- /dub.sdl: -------------------------------------------------------------------------------- 1 | name "derelict-gl3" 2 | description "A dynamic binding to the OpenGL library." 3 | homepage "https://github.com/DerelictOrg/DerelictGL3" 4 | authors "Mike Parker" 5 | license "Boost" 6 | targetPath "lib" 7 | targetName "DerelictGL3" 8 | dependency "derelict-util" version="~>3.0.0-beta.1" -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_a.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_a; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_array_of_arrays <-- Core in GL 4.3 34 | enum ARB_array_of_arrays = "GL_ARB_array_of_arrays"; 35 | enum arbArrayOfArraysLoader = makeLoader(ARB_array_of_arrays, "", "gl43"); 36 | static if(!usingContexts) enum arbArrayOfArrays = arbArrayOfArraysLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_b.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_b; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_base_instance <-- Core in GL 4.2 34 | enum ARB_base_instance = "GL_ARB_base_instance"; 35 | enum arbBaseInstanceDecls = 36 | q{ 37 | extern(System) @nogc nothrow { 38 | alias da_glDrawArraysInstancedBaseInstance = void function(GLenum, GLint, GLsizei, GLsizei, GLuint); 39 | alias da_glDrawElementsInstancedBaseInstance = void function(GLenum, GLsizei, GLenum, const(void)*, GLsizei, GLuint); 40 | alias da_glDrawElementsInstancedBaseVertexBaseInstance = void function(GLenum, GLsizei, GLenum, const(void)*, GLsizei, GLint, GLuint); 41 | }}; 42 | 43 | enum arbBaseInstanceFuncs = 44 | q{ 45 | da_glDrawArraysInstancedBaseInstance glDrawArraysInstancedBaseInstance; 46 | da_glDrawElementsInstancedBaseInstance glDrawElementsInstancedBaseInstance; 47 | da_glDrawElementsInstancedBaseVertexBaseInstance glDrawElementsInstancedBaseVertexBaseInstance; 48 | }; 49 | 50 | enum arbBaseInstanceLoaderImpl = 51 | q{ 52 | bindGLFunc(cast(void**)&glDrawArraysInstancedBaseInstance, "glDrawArraysInstancedBaseInstance"); 53 | bindGLFunc(cast(void**)&glDrawElementsInstancedBaseInstance, "glDrawElementsInstancedBaseInstance"); 54 | bindGLFunc(cast(void**)&glDrawElementsInstancedBaseVertexBaseInstance, "glDrawElementsInstancedBaseVertexBaseInstance"); 55 | }; 56 | 57 | enum arbBaseInstanceLoader = makeLoader(ARB_base_instance, arbBaseInstanceLoaderImpl, "gl42"); 58 | static if(!usingContexts) enum arbBaseInstance = arbBaseInstanceDecls ~ arbBaseInstanceFuncs.makeGShared() ~ arbBaseInstanceLoader; 59 | 60 | // ARB_bindless_texture 61 | enum ARB_bindless_texture = "GL_ARB_bindless_texture"; 62 | enum arbBindlessTextureDecls = 63 | q{ 64 | enum uint GL_UNSIGNED_INT64_ARB = 0x140F; 65 | extern(System) @nogc nothrow { 66 | alias da_glGetTextureHandleARB = GLuint64 function(GLuint); 67 | alias da_glGetTextureSamplerHandleARB = GLuint64 function(GLuint,GLuint); 68 | alias da_glMakeTextureHandleResidentARB = void function(GLuint64); 69 | alias da_glMakeTextureHandleNonResidentARB = void function(GLuint64); 70 | alias da_glGetImageHandleARB = GLuint64 function(GLuint,GLint,GLboolean,GLint,GLenum); 71 | alias da_glMakeImageHandleResidentARB = void function(GLuint64,GLenum); 72 | alias da_glMakeImageHandleNonResidentARB = void function(GLuint64); 73 | alias da_glUniformHandleui64ARB = void function(GLint,GLuint64); 74 | alias da_glUniformHandleui64vARB = void function(GLint,GLsizei,const(GLuint64)*); 75 | alias da_glProgramUniformHandleui64ARB = void function(GLuint,GLint,GLuint64); 76 | alias da_glProgramUniformHandleui64vARB = void function(GLuint,GLint,GLsizei,const(GLuint64)*); 77 | alias da_glIsTextureHandleResidentARB = GLboolean function(GLuint64); 78 | alias da_glIsImageHandleResidentARB = GLboolean function(GLuint64); 79 | alias da_glVertexAttribL1ui64ARB = void function(GLuint,GLuint64); 80 | alias da_glVertexAttribL1ui64vARB = void function(GLuint,const(GLuint64)*); 81 | alias da_glGetVertexAttribLui64vARB = void function(GLuint,GLenum,GLuint64*); 82 | }}; 83 | 84 | enum arbBindlessTextureFuncs = 85 | q{ 86 | da_glGetTextureHandleARB glGetTextureHandleARB; 87 | da_glGetTextureSamplerHandleARB glGetTextureSamplerHandleARB; 88 | da_glMakeTextureHandleResidentARB glMakeTextureHandleResidentARB; 89 | da_glMakeTextureHandleNonResidentARB glMakeTextureHandleNonResidentARB; 90 | da_glGetImageHandleARB glGetImageHandleARB; 91 | da_glMakeImageHandleResidentARB glMakeImageHandleResidentARB; 92 | da_glMakeImageHandleNonResidentARB glMakeImageHandleNonResidentARB; 93 | da_glUniformHandleui64ARB glUniformHandleui64ARB; 94 | da_glUniformHandleui64vARB glUniformHandleui64vARB; 95 | da_glProgramUniformHandleui64ARB glProgramUniformHandleui64ARB; 96 | da_glProgramUniformHandleui64vARB glProgramUniformHandleui64vARB; 97 | da_glIsTextureHandleResidentARB glIsTextureHandleResidentARB; 98 | da_glIsImageHandleResidentARB glIsImageHandleResidentARB; 99 | da_glVertexAttribL1ui64ARB glVertexAttribL1ui64ARB; 100 | da_glVertexAttribL1ui64vARB glVertexAttribL1ui64vARB; 101 | da_glGetVertexAttribLui64vARB glGetVertexAttribLui64vARB; 102 | }; 103 | 104 | enum arbBindlessTextureLoaderImpl = 105 | q{ 106 | bindGLFunc(cast(void**)&glGetTextureHandleARB, "glGetTextureHandleARB"); 107 | bindGLFunc(cast(void**)&glGetTextureSamplerHandleARB, "glGetTextureSamplerHandleARB"); 108 | bindGLFunc(cast(void**)&glMakeTextureHandleResidentARB, "glMakeTextureHandleResidentARB"); 109 | bindGLFunc(cast(void**)&glMakeTextureHandleNonResidentARB, "glMakeTextureHandleNonResidentARB"); 110 | bindGLFunc(cast(void**)&glGetImageHandleARB, "glGetImageHandleARB"); 111 | bindGLFunc(cast(void**)&glMakeImageHandleResidentARB, "glMakeImageHandleResidentARB"); 112 | bindGLFunc(cast(void**)&glMakeImageHandleNonResidentARB, "glMakeImageHandleNonResidentARB"); 113 | bindGLFunc(cast(void**)&glUniformHandleui64ARB, "glUniformHandleui64ARB"); 114 | bindGLFunc(cast(void**)&glUniformHandleui64vARB, "glUniformHandleui64vARB"); 115 | bindGLFunc(cast(void**)&glProgramUniformHandleui64ARB, "glProgramUniformHandleui64ARB"); 116 | bindGLFunc(cast(void**)&glProgramUniformHandleui64vARB, "glProgramUniformHandleui64vARB"); 117 | bindGLFunc(cast(void**)&glIsTextureHandleResidentARB, "glIsTextureHandleResidentARB"); 118 | bindGLFunc(cast(void**)&glIsImageHandleResidentARB, "glIsImageHandleResidentARB"); 119 | bindGLFunc(cast(void**)&glVertexAttribL1ui64ARB, "glVertexAttribL1ui64ARB"); 120 | bindGLFunc(cast(void**)&glVertexAttribL1ui64vARB, "glVertexAttribL1ui64vARB"); 121 | bindGLFunc(cast(void**)&glGetVertexAttribLui64vARB, "glGetVertexAttribLui64vARB"); 122 | }; 123 | 124 | enum arbBindlessTextureLoader = makeExtLoader(ARB_bindless_texture, arbBindlessTextureLoaderImpl); 125 | static if(!usingContexts) enum arbBindlessTexture = arbBindlessTextureDecls ~ arbBindlessTextureFuncs.makeGShared() ~ arbBindlessTextureLoader; 126 | 127 | // ARB_blend_func_extended <-- Core in GL 3.3 128 | enum ARB_blend_func_extended = "GL_ARB_blend_func_extended"; 129 | enum arbBlendFuncExtendedDecls = 130 | q{ 131 | enum : uint 132 | { 133 | GL_SRC1_COLOR = 0x88F9, 134 | GL_ONE_MINUS_SRC1_COLOR = 0x88FA, 135 | GL_ONE_MINUS_SRC1_ALPHA = 0x88FB, 136 | GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC, 137 | } 138 | extern(System) @nogc nothrow { 139 | alias da_glBindFragDataLocationIndexed = void function(GLuint, GLuint, GLuint, const(GLchar)*); 140 | alias da_glGetFragDataIndex = GLint function(GLuint, const(GLchar)*); 141 | }}; 142 | 143 | enum arbBlendFuncExtendedFuncs = 144 | q{ 145 | da_glBindFragDataLocationIndexed glBindFragDataLocationIndexed; 146 | da_glGetFragDataIndex glGetFragDataIndex; 147 | }; 148 | 149 | enum arbBlendFuncExtendedLoaderImpl = 150 | q{ 151 | bindGLFunc(cast(void**)&glBindFragDataLocationIndexed, "glBindFragDataLocationIndexed"); 152 | bindGLFunc(cast(void**)&glGetFragDataIndex, "glGetFragDataIndex"); 153 | }; 154 | 155 | enum arbBlendFuncExtendedLoader = makeLoader(ARB_blend_func_extended, arbBlendFuncExtendedLoaderImpl, "gl33"); 156 | static if(!usingContexts) enum arbBlendFuncExtended = arbBlendFuncExtendedDecls ~ arbBlendFuncExtendedFuncs.makeGShared() ~ arbBlendFuncExtendedLoader; 157 | 158 | // ARB_buffer_storage <-- Core in GL 4.4 159 | enum ARB_buffer_storage = "GL_ARB_buffer_storage"; 160 | enum arbBufferStorageDecls = 161 | q{ 162 | enum : uint 163 | { 164 | GL_MAP_PERSISTENT_BIT = 0x0040, 165 | GL_MAP_COHERENT_BIT = 0x0080, 166 | GL_DYNAMIC_STORAGE_BIT = 0x0100, 167 | GL_CLIENT_STORAGE_BIT = 0x0200, 168 | GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x00004000, 169 | GL_BUFFER_IMMUTABLE_STORAGE = 0x821F, 170 | GL_BUFFER_STORAGE_FLAGS = 0x8220, 171 | } 172 | extern(System) @nogc nothrow { 173 | alias da_glBufferStorage = void function(GLenum,GLsizeiptr,const(void)*,GLbitfield); 174 | alias da_glNamedBufferStorageEXT = void function(GLuint,GLsizeiptr,const(void)*,GLbitfield); 175 | }}; 176 | 177 | enum arbBufferStorageFuncs = 178 | q{ 179 | da_glBufferStorage glBufferStorage; 180 | da_glNamedBufferStorageEXT glNamedBufferStorageEXT; 181 | }; 182 | 183 | enum arbBufferStorageLoaderImpl = 184 | q{ 185 | bindGLFunc(cast(void**)&glBufferStorage, "glBufferStorage"); 186 | try { bindGLFunc(cast(void**)&glNamedBufferStorageEXT, "glNamedBufferStorageEXT"); } 187 | catch(Exception e) {} 188 | }; 189 | 190 | enum arbBufferStorageLoader = makeLoader(ARB_buffer_storage, arbBufferStorageLoaderImpl, "gl44"); 191 | static if(!usingContexts) enum arbBufferStorage = arbBufferStorageDecls ~ arbBufferStorageFuncs.makeGShared() ~ arbBufferStorageLoader; 192 | -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_c.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_c; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_cl_event 34 | enum ARB_cl_event = "GL_ARB_cl_event"; 35 | enum arbCLEventDecls = 36 | q{ 37 | struct _cl_context; 38 | struct _cl_event; 39 | enum : uint 40 | { 41 | GL_SYNC_CL_EVENT_ARB = 0x8240, 42 | GL_SYNC_CL_EVENT_COMPLETE_ARB = 0x8241, 43 | } 44 | extern(System) @nogc nothrow alias da_glCreateSyncFromCLeventARB = GLsync function(_cl_context*, _cl_event*, GLbitfield); 45 | }; 46 | 47 | enum arbCLEventFuncs = `da_glCreateSyncFromCLeventARB glCreateSyncFromCLeventARB;`; 48 | enum arbCLEventLoaderImpl = `bindGLFunc(cast(void**)&glCreateSyncFromCLeventARB, "glCreateSyncFromCLeventARB");`; 49 | enum arbCLEventLoader = makeExtLoader(ARB_cl_event, arbCLEventLoaderImpl); 50 | static if(!usingContexts) enum arbCLEvent = arbCLEventDecls ~ arbCLEventFuncs.makeGShared() ~ arbCLEventLoader; 51 | 52 | // ARB_clear_buffer_object <-- Core in GL 4.3 53 | enum ARB_clear_buffer_object = "GL_ARB_clear_buffer_object"; 54 | enum arbClearBufferObjectDecls = 55 | q{ 56 | extern(System) @nogc nothrow { 57 | alias da_glClearBufferData = void function(GLenum,GLenum,GLenum,GLenum,const(void)*); 58 | alias da_glClearBufferSubData = void function(GLenum,GLenum,GLintptr,GLsizeiptr,GLenum,GLenum,const(void)*); 59 | alias da_glClearNamedBufferDataEXT = void function(GLuint,GLenum,GLenum,GLenum,const(void)*); 60 | alias da_glClearNamedBufferSubDataEXT = void function(GLuint,GLenum,GLenum,GLenum,GLsizeiptr,GLsizeiptr,const(void)*); 61 | }}; 62 | 63 | enum arbClearBufferObjectFuncs = 64 | q{ 65 | da_glClearBufferData glClearBufferData; 66 | da_glClearBufferSubData glClearBufferSubData; 67 | da_glClearNamedBufferDataEXT glClearNamedBufferDataEXT; 68 | da_glClearNamedBufferSubDataEXT glClearNamedBufferSubDataEXT; 69 | }; 70 | 71 | enum arbClearBufferObjectLoaderImpl = 72 | q{ 73 | bindGLFunc(cast(void**)&glClearBufferData, "glClearBufferData"); 74 | bindGLFunc(cast(void**)&glClearBufferSubData, "glClearBufferSubData"); 75 | try { 76 | bindGLFunc(cast(void**)&glClearNamedBufferDataEXT, "glClearNamedBufferDataEXT"); 77 | bindGLFunc(cast(void**)&glClearNamedBufferSubDataEXT, "glClearNamedBufferSubDataEXT"); 78 | } 79 | catch(Exception e) {} 80 | }; 81 | 82 | enum arbClearBufferObjectLoader = makeLoader(ARB_clear_buffer_object, arbClearBufferObjectLoaderImpl, "gl43"); 83 | static if(!usingContexts) enum arbClearBufferObject = arbClearBufferObjectDecls ~ arbClearBufferObjectFuncs.makeGShared() ~ arbClearBufferObjectLoader; 84 | 85 | // ARB_clear_texture <-- Core in GL 4.4 86 | enum ARB_clear_texture = "GL_ARB_clear_texture"; 87 | enum arbClearTextureDecls = 88 | q{ 89 | enum uint GL_CLEAR_TEXTURE = 0x9365; 90 | extern(System) @nogc nothrow 91 | { 92 | alias da_glClearTexImage = void function(GLuint,GLint,GLenum,GLenum,const(void)*); 93 | alias da_glClearTexSubImage = void function(GLuint,GLint,GLint,GLint,GLint,GLsizei,GLsizei,GLsizei,GLenum,GLenum,const(void)*); 94 | }}; 95 | 96 | enum arbClearTextureFuncs = 97 | q{ 98 | da_glClearTexImage glClearTexImage; 99 | da_glClearTexSubImage glClearTexSubImage; 100 | }; 101 | 102 | enum arbClearTextureLoaderImpl = 103 | q{ 104 | bindGLFunc(cast(void**)&glClearTexImage, "glClearTexImage"); 105 | bindGLFunc(cast(void**)&glClearTexSubImage, "glClearTexSubImage"); 106 | }; 107 | 108 | enum arbClearTextureLoader = makeLoader(ARB_clear_texture, arbClearTextureLoaderImpl, "gl44"); 109 | static if(!usingContexts) enum arbClearTexture = arbClearTextureDecls ~ arbClearTextureFuncs.makeGShared() ~ arbClearTextureLoader; 110 | 111 | // ARB_clip_control <-- Core in GL 4.5 112 | enum ARB_clip_control = "GL_ARB_clip_control"; 113 | enum arbClipControlDecls = 114 | q{ 115 | enum : uint 116 | { 117 | GL_NEGATIVE_ONE_TO_ONE = 0x935E, 118 | GL_ZERO_TO_ONE = 0x935F, 119 | GL_CLIP_ORIGIN = 0x935C, 120 | GL_CLIP_DEPTH_MODE = 0x935D, 121 | } 122 | extern(System) @nogc nothrow alias da_glClipControl = void function(GLenum,GLenum); 123 | }; 124 | 125 | enum arbClipControlFuncs = `da_glClipControl glClipControl;`; 126 | enum arbClipControlLoaderImpl = `bindGLFunc(cast(void**)&glClipControl, "glClipControl");`; 127 | enum arbClipControlLoader = makeLoader(ARB_clip_control, arbClipControlLoaderImpl, "gl45"); 128 | static if(!usingContexts) enum arbClipControl = arbClipControlDecls ~ arbClipControlFuncs.makeGShared() ~ arbClipControlLoader; 129 | 130 | // ARB_compressed_texture_pixel_storage <-- Core in GL 4.2 131 | enum ARB_compressed_texture_pixel_storage = "GL_ARB_compressed_texture_pixel_storage"; 132 | enum arbCompressedTexturePixelStorageDecls = 133 | q{ 134 | enum : uint 135 | { 136 | GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, 137 | GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, 138 | GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, 139 | GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, 140 | GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, 141 | GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, 142 | GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, 143 | GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E, 144 | }}; 145 | 146 | enum arbCompressedTexturePixelStorageLoader = makeLoader(ARB_compressed_texture_pixel_storage, "", "gl42"); 147 | static if(!usingContexts) enum arbCompressedTexturePixelStorage = arbCompressedTexturePixelStorageDecls ~ arbCompressedTexturePixelStorageLoader; 148 | 149 | // ARB_compute_shader <-- Core in GL 4.3 150 | enum ARB_compute_shader = "GL_ARB_compute_shader"; 151 | enum arbComputeShaderDecls = 152 | q{ 153 | enum : uint 154 | { 155 | GL_COMPUTE_SHADER = 0x91B9, 156 | GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, 157 | GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, 158 | GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, 159 | GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, 160 | GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, 161 | GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, 162 | GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, 163 | GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, 164 | GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB, 165 | GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, 166 | GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF, 167 | GL_COMPUTE_WORK_GROUP_SIZE = 0x8267, 168 | GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC, 169 | GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED, 170 | GL_DISPATCH_INDIRECT_BUFFER = 0x90EE, 171 | GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF, 172 | GL_COMPUTE_SHADER_BIT = 0x00000020, 173 | } 174 | extern(System) @nogc nothrow { 175 | alias da_glDispatchCompute = void function(GLuint,GLuint,GLuint); 176 | alias da_glDispatchComputeIndirect = void function(GLintptr); 177 | }}; 178 | 179 | enum arbComputeShaderFuncs = 180 | q{ 181 | da_glDispatchCompute glDispatchCompute; 182 | da_glDispatchComputeIndirect glDispatchComputeIndirect; 183 | }; 184 | enum arbComputeShaderLoaderImpl = 185 | q{ 186 | bindGLFunc(cast(void**)&glDispatchCompute, "glDispatchCompute"); 187 | bindGLFunc(cast(void**)&glDispatchComputeIndirect, "glDispatchComputeIndirect"); 188 | }; 189 | 190 | enum arbComputeShaderLoader = makeLoader(ARB_compute_shader, arbComputeShaderLoaderImpl, "gl43"); 191 | static if(!usingContexts) enum arbComputeShader = arbComputeShaderDecls ~ arbComputeShaderFuncs.makeGShared() ~ arbComputeShaderLoader; 192 | 193 | // ARB_compute_variable_group_size 194 | enum ARB_compute_variable_group_size = "GL_ARB_compute_variable_group_size"; 195 | enum arbComputeVariableGroupSizeDecls = 196 | q{ 197 | enum : uint 198 | { 199 | GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = 0x9344, 200 | GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = 0x90EB, 201 | GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = 0x9345, 202 | GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = 0x91BF, 203 | } 204 | extern(System) @nogc nothrow alias da_glDispatchComputeGroupSizeARB = void function(GLuint,GLuint,GLuint,GLuint,GLuint,GLuint); 205 | }; 206 | 207 | enum arbComputeVariableGroupSizeFuncs = `da_glDispatchComputeGroupSizeARB glDispatchComputeGroupSizeARB;`; 208 | enum arbComputeVariableGroupSizeLoaderImpl = `bindGLFunc(cast(void**)&glDispatchComputeGroupSizeARB, "glDispatchComputeGroupSizeARB");`; 209 | enum arbComputeVariableGroupSizeLoader = makeLoader(ARB_compute_variable_group_size, arbComputeVariableGroupSizeLoaderImpl, "gl45"); 210 | static if(!usingContexts) enum arbComputeVariableGroupSize = arbComputeVariableGroupSizeDecls ~ arbComputeVariableGroupSizeFuncs.makeGShared() ~ arbComputeVariableGroupSizeLoader; 211 | 212 | // ARB_conditional_render_inverted <-- Core in GL 4.5 213 | enum ARB_conditional_render_inverted = "GL_ARB_conditional_render_inverted"; 214 | enum arbConditionalRenderInvertedDecls = 215 | q{ 216 | enum : uint 217 | { 218 | GL_QUERY_WAIT_INVERTED = 0x8E17, 219 | GL_QUERY_NO_WAIT_INVERTED = 0x8E18, 220 | GL_QUERY_BY_REGION_WAIT_INVERTED = 0x8E19, 221 | GL_QUERY_BY_REGION_NO_WAIT_INVERTED = 0x8E1A, 222 | }}; 223 | 224 | enum arbConditionalRenderInvertedLoader = makeLoader(ARB_conditional_render_inverted, "", "gl45"); 225 | static if(!usingContexts) enum arbConditionalRenderInverted = arbConditionalRenderInvertedDecls ~ arbConditionalRenderInvertedLoader; 226 | 227 | // ARB_conservative_depth <-- Core in GL 4.2 228 | enum ARB_conservative_depth = "GL_ARB_conservative_depth"; 229 | enum arbConservativeDepthLoader = makeLoader(ARB_conservative_depth, "", "gl42"); 230 | static if(!usingContexts) enum arbConservativeDepth = arbConservativeDepthLoader; 231 | 232 | // ARB_copy_buffer <-- Core in Gl 3.1 233 | enum ARB_copy_buffer = "GL_ARB_copy_buffer"; 234 | enum arbCopyBufferDecls = 235 | q{ 236 | enum : uint 237 | { 238 | GL_COPY_READ_BUFFER = 0x8F36, 239 | GL_COPY_WRITE_BUFFER = 0x8F37, 240 | } 241 | 242 | extern(System) @nogc nothrow alias da_glCopyBufferSubData = void function(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr); 243 | }; 244 | 245 | enum arbCopyBufferFuncs = 246 | q{ 247 | da_glCopyBufferSubData glCopyBufferSubData; 248 | }; 249 | 250 | enum arbCopyBufferLoaderImpl = `bindGLFunc(cast(void**)&glCopyBufferSubData, "glCopyBufferSubData");`; 251 | enum arbCopyBufferLoader = makeLoader(ARB_copy_buffer, arbCopyBufferLoaderImpl, "gl31"); 252 | static if(!usingContexts) enum arbCopyBuffer = arbCopyBufferDecls ~ arbCopyBufferFuncs.makeGShared() ~ arbCopyBufferLoader; 253 | 254 | // ARB_copy_image <-- Core in GL 4.3 255 | enum ARB_copy_image = "GL_ARB_copy_image"; 256 | enum arbCopyImageDecls = `extern(System) @nogc nothrow alias da_glCopyImageSubData = void function(GLuint,GLenum,GLint,GLint,GLint,GLint,GLuint,GLenum,GLint,GLint,GLint,GLint,GLsizei,GLsizei,GLsizei);`; 257 | enum arbCopyImageFuncs = `da_glCopyImageSubData glCopyImageSubData;`; 258 | enum arbCopyImageLoaderImpl = `bindGLFunc(cast(void**)&glCopyImageSubData, "glCopyImageSubData");`; 259 | enum arbCopyImageLoader = makeLoader(ARB_copy_image, arbCopyImageLoaderImpl, "gl43"); 260 | static if(!usingContexts) enum arbCopyImage = arbCopyImageDecls ~ arbCopyImageFuncs.makeGShared() ~ arbCopyImageLoader; 261 | 262 | // ARB_cull_distance <-- Core in GL 4.5 263 | enum ARB_cull_distance = "GL_ARB_cull_distance"; 264 | enum arbCullDistanceDecls = 265 | q{ 266 | enum : uint 267 | { 268 | GL_MAX_CULL_DISTANCES = 0x82F9, 269 | GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES = 0x82FA, 270 | }}; 271 | 272 | enum arbCullDistanceLoader = makeLoader(ARB_cull_distance, "", "gl45"); 273 | static if(!usingContexts) enum arbCullDistance = arbCullDistanceDecls ~ arbCullDistanceLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_e.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_e; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_enhanced_layouts <-- Core in GL 4.4 34 | enum ARB_enhanced_layouts = "GL_ARB_enhanced_layouts"; 35 | enum arbEnhancedLayoutsDecls = 36 | q{ 37 | enum : uint 38 | { 39 | GL_LOCATION_COMPONENT = 0x934A, 40 | GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B, 41 | GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C, 42 | }}; 43 | enum arbEnhancedLayoutsLoader = makeLoader(ARB_enhanced_layouts, "", "gl44"); 44 | static if(!usingContexts) enum arbEnhancedLayouts = arbEnhancedLayoutsDecls ~ arbEnhancedLayoutsLoader; 45 | 46 | // ARB_ES2_compatibility <-- Core in GL 4.1 47 | enum ARB_ES2_compatibility = "GL_ARB_ES2_compatibility"; 48 | enum arbES2CompatibilityDecls = 49 | q{ 50 | enum : uint 51 | { 52 | GL_FIXED = 0x140C, 53 | GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, 54 | GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B, 55 | GL_LOW_FLOAT = 0x8DF0, 56 | GL_MEDIUM_FLOAT = 0x8DF1, 57 | GL_HIGH_FLOAT = 0x8DF2, 58 | GL_LOW_INT = 0x8DF3, 59 | GL_MEDIUM_INT = 0x8DF4, 60 | GL_HIGH_INT = 0x8DF5, 61 | GL_SHADER_COMPILER = 0x8DFA, 62 | GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, 63 | GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, 64 | GL_MAX_VARYING_VECTORS = 0x8DFC, 65 | GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, 66 | } 67 | extern(System) @nogc nothrow { 68 | alias da_glReleaseShaderCompiler = void function(); 69 | alias da_glShaderBinary = void function(GLsizei, const(GLuint)*, GLenum, const(GLvoid)*, GLsizei); 70 | alias da_glGetShaderPrecisionFormat = void function(GLenum, GLenum, GLint*, GLint*); 71 | alias da_glDepthRangef = void function(GLclampf, GLclampf); 72 | alias da_glClearDepthf = void function(GLclampf); 73 | }}; 74 | 75 | enum arbES2CompatibilityFuncs = 76 | q{ 77 | da_glReleaseShaderCompiler glReleaseShaderCompiler; 78 | da_glShaderBinary glShaderBinary; 79 | da_glGetShaderPrecisionFormat glGetShaderPrecisionFormat; 80 | da_glDepthRangef glDepthRangef; 81 | da_glClearDepthf glClearDepthf; 82 | }; 83 | 84 | enum arbES2CompatibilityLoaderImpl = 85 | q{ 86 | bindGLFunc(cast(void**)&glReleaseShaderCompiler, "glReleaseShaderCompiler"); 87 | bindGLFunc(cast(void**)&glShaderBinary, "glShaderBinary"); 88 | bindGLFunc(cast(void**)&glGetShaderPrecisionFormat, "glGetShaderPrecisionFormat"); 89 | bindGLFunc(cast(void**)&glDepthRangef, "glDepthRangef"); 90 | bindGLFunc(cast(void**)&glClearDepthf, "glClearDepthf"); 91 | }; 92 | 93 | enum arbES2CompatibilityLoader = makeLoader(ARB_ES2_compatibility, arbES2CompatibilityLoaderImpl, "gl41"); 94 | static if(!usingContexts) enum arbES2Compatibility = arbES2CompatibilityDecls ~ arbES2CompatibilityFuncs.makeGShared() ~ arbES2CompatibilityLoader; 95 | 96 | // ARB_ES3_compatibility <-- Core in GL 4.3 97 | enum ARB_ES3_compatibility = "GL_ARB_ES3_compatibility"; 98 | enum arbES3CompatibilityDecls = 99 | q{ 100 | enum : uint 101 | { 102 | GL_COMPRESSED_RGB8_ETC2 = 0x9274, 103 | GL_COMPRESSED_SRGB8_ETC2 = 0x9275, 104 | GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, 105 | GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, 106 | GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, 107 | GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, 108 | GL_COMPRESSED_R11_EAC = 0x9270, 109 | GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, 110 | GL_COMPRESSED_RG11_EAC = 0x9272, 111 | GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273, 112 | GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69, 113 | GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A, 114 | GL_MAX_ELEMENT_INDEX = 0x8D6B, 115 | }}; 116 | 117 | enum arbES3CompatibilityLoader = makeLoader(ARB_ES3_compatibility, "", "gl43"); 118 | static if(!usingContexts) enum arbES3Compatibility = arbES3CompatibilityDecls ~ arbES3CompatibilityLoader; 119 | 120 | // ARB_ES3_1_compatibility <-- Core in GL 4.5 121 | enum ARB_ES3_1_compatibility = "GL_ARB_ES3_1_compatibility"; 122 | enum arbES31CompatibilityDecls = `extern(System) @nogc nothrow alias da_glMemoryBarrierByRegion = void function(GLbitfield);`; 123 | enum arbES31CompatibilityFuncs = `da_glMemoryBarrierByRegion glMemoryBarrierByRegion;`; 124 | enum arbES31CompatibilityLoaderImpl = `bindGLFunc(cast(void**)&glMemoryBarrierByRegion, "glMemoryBarrierByRegion");`; 125 | enum arbES31CompatibilityLoader = makeLoader(ARB_ES3_1_compatibility, arbES31CompatibilityLoaderImpl, "gl45"); 126 | static if(!usingContexts) enum arbES31Compatibility = arbES31CompatibilityDecls ~ arbES31CompatibilityFuncs.makeGShared() ~ arbES31CompatibilityLoader; 127 | 128 | // ARB_explicit_attrib_location <-- Core in GL 3.3 129 | enum ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location"; 130 | enum arbExplicitAttribLocationLoader = makeLoader(ARB_explicit_attrib_location, "", "gl33"); 131 | static if(!usingContexts) enum arbExplicitAttribLocation = arbExplicitAttribLocationLoader; 132 | 133 | // ARB_explicit_uniform_location <-- Core in GL 4.3 134 | enum ARB_explicit_uniform_location = "GL_ARB_explicit_uniform_location"; 135 | enum arbExplicitUniformLocationDecls = `enum uint GL_MAX_UNIFORM_LOCATIONS = 0x826E;`; 136 | enum arbExplicitUniformLocationLoader = makeLoader(ARB_explicit_uniform_location, "", "gl43"); 137 | static if(!usingContexts) enum arbExplicitUniformLocation = arbExplicitUniformLocationDecls ~ arbExplicitUniformLocationLoader; 138 | 139 | -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_f.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_f; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_fragment_coord_conventions <-- Core in GL 3.2 34 | enum ARB_fragment_coord_conventions = "GL_ARB_fragment_coord_conventions"; 35 | enum arbFragmentCoordConventionsLoader = makeLoader(ARB_fragment_coord_conventions, "", "gl32"); 36 | static if(!usingContexts) enum arbFragmentCoordConventions = arbFragmentCoordConventionsLoader; 37 | 38 | // ARB_fragment_layer_viewport <-- Core in GL 4.3 39 | enum ARB_fragment_layer_viewport = "GL_ARB_fragment_layer_viewport"; 40 | enum arbFragmentLayerViewportLoader = makeLoader(ARB_fragment_layer_viewport, "", "gl43"); 41 | static if(!usingContexts) enum arbFragmentLayerViewport = arbFragmentLayerViewportLoader; 42 | 43 | // ARB_framebuffer_no_attachments <-- Core in GL 4.3 44 | enum ARB_framebuffer_no_attachments = "GL_ARB_framebuffer_no_attachments"; 45 | enum arbFramebufferNoAttachmentsDecls = 46 | q{ 47 | enum : uint 48 | { 49 | GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, 50 | GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, 51 | GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, 52 | GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, 53 | GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314, 54 | GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, 55 | GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, 56 | GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, 57 | GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318, 58 | } 59 | extern(System) @nogc nothrow 60 | { 61 | alias da_glFramebufferParameteri = void function(GLenum,GLenum,GLint); 62 | alias da_glGetFramebufferParameteriv = void function(GLenum,GLenum,GLint*); 63 | alias da_glNamedFramebufferParameteriEXT = void function(GLuint,GLenum,GLint); 64 | alias da_glGetNamedFramebufferParameterivEXT = void function(GLuint,GLenum,GLint*); 65 | }}; 66 | 67 | enum arbFramebufferNoAttachmentsFuncs = 68 | q{ 69 | da_glFramebufferParameteri glFramebufferParameteri; 70 | da_glGetFramebufferParameteriv glGetFramebufferParameteriv; 71 | da_glNamedFramebufferParameteriEXT glNamedFramebufferParameteriEXT; 72 | da_glGetNamedFramebufferParameterivEXT glGetNamedFramebufferParameterivEXT; 73 | }; 74 | 75 | enum arbFramebufferNoAttachmentsLoaderImpl = 76 | q{ 77 | bindGLFunc(cast(void**)&glFramebufferParameteri, "glFramebufferParameteri"); 78 | bindGLFunc(cast(void**)&glGetFramebufferParameteriv, "glGetFramebufferParameteriv"); 79 | try { 80 | bindGLFunc(cast(void**)&glNamedFramebufferParameteriEXT, "glNamedFramebufferParameteriEXT"); 81 | bindGLFunc(cast(void**)&glGetNamedFramebufferParameterivEXT, "glGetNamedFramebufferParameterivEXT"); 82 | } 83 | catch(Exception e) {} 84 | }; 85 | 86 | enum arbFramebufferNoAttachmentsLoader = makeLoader(ARB_framebuffer_no_attachments, arbFramebufferNoAttachmentsLoaderImpl, "gl43"); 87 | static if(!usingContexts) enum arbFramebufferNoAttachments = arbFramebufferNoAttachmentsDecls ~ arbFramebufferNoAttachmentsFuncs.makeGShared() ~ arbFramebufferNoAttachmentsLoader; 88 | 89 | // ARB_framebuffer_object <-- Core in GL 3.0 90 | enum ARB_framebuffer_object = "GL_ARB_framebuffer_object"; 91 | enum arbFramebufferObjectDecls = 92 | q{ 93 | enum : uint 94 | { 95 | GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506, 96 | GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, 97 | GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, 98 | GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, 99 | GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, 100 | GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, 101 | GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, 102 | GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, 103 | GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217, 104 | GL_FRAMEBUFFER_DEFAULT = 0x8218, 105 | GL_FRAMEBUFFER_UNDEFINED = 0x8219, 106 | GL_DEPTH_STENCIL_ATTACHMENT = 0x821A, 107 | GL_MAX_RENDERBUFFER_SIZE = 0x84E8, 108 | GL_DEPTH_STENCIL = 0x84F9, 109 | GL_UNSIGNED_INT_24_8 = 0x84FA, 110 | GL_DEPTH24_STENCIL8 = 0x88F0, 111 | GL_TEXTURE_STENCIL_SIZE = 0x88F1, 112 | GL_TEXTURE_RED_TYPE = 0x8C10, 113 | GL_TEXTURE_GREEN_TYPE = 0x8C11, 114 | GL_TEXTURE_BLUE_TYPE = 0x8C12, 115 | GL_TEXTURE_ALPHA_TYPE = 0x8C13, 116 | GL_TEXTURE_DEPTH_TYPE = 0x8C16, 117 | GL_UNSIGNED_NORMALIZED = 0x8C17, 118 | GL_FRAMEBUFFER_BINDING = 0x8CA6, 119 | GL_DRAW_FRAMEBUFFER_BINDING = GL_FRAMEBUFFER_BINDING, 120 | GL_RENDERBUFFER_BINDING = 0x8CA7, 121 | GL_READ_FRAMEBUFFER = 0x8CA8, 122 | GL_DRAW_FRAMEBUFFER = 0x8CA9, 123 | GL_READ_FRAMEBUFFER_BINDING = 0x8CAA, 124 | GL_RENDERBUFFER_SAMPLES = 0x8CAB, 125 | GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, 126 | GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, 127 | GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, 128 | GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, 129 | GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4, 130 | GL_FRAMEBUFFER_COMPLETE = 0x8CD5, 131 | GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, 132 | GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, 133 | GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB, 134 | GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC, 135 | GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, 136 | GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, 137 | GL_COLOR_ATTACHMENT0 = 0x8CE0, 138 | GL_COLOR_ATTACHMENT1 = 0x8CE1, 139 | GL_COLOR_ATTACHMENT2 = 0x8CE2, 140 | GL_COLOR_ATTACHMENT3 = 0x8CE3, 141 | GL_COLOR_ATTACHMENT4 = 0x8CE4, 142 | GL_COLOR_ATTACHMENT5 = 0x8CE5, 143 | GL_COLOR_ATTACHMENT6 = 0x8CE6, 144 | GL_COLOR_ATTACHMENT7 = 0x8CE7, 145 | GL_COLOR_ATTACHMENT8 = 0x8CE8, 146 | GL_COLOR_ATTACHMENT9 = 0x8CE9, 147 | GL_COLOR_ATTACHMENT10 = 0x8CEA, 148 | GL_COLOR_ATTACHMENT11 = 0x8CEB, 149 | GL_COLOR_ATTACHMENT12 = 0x8CEC, 150 | GL_COLOR_ATTACHMENT13 = 0x8CED, 151 | GL_COLOR_ATTACHMENT14 = 0x8CEE, 152 | GL_COLOR_ATTACHMENT15 = 0x8CEF, 153 | GL_DEPTH_ATTACHMENT = 0x8D00, 154 | GL_STENCIL_ATTACHMENT = 0x8D20, 155 | GL_FRAMEBUFFER = 0x8D40, 156 | GL_RENDERBUFFER = 0x8D41, 157 | GL_RENDERBUFFER_WIDTH = 0x8D42, 158 | GL_RENDERBUFFER_HEIGHT = 0x8D43, 159 | GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, 160 | GL_STENCIL_INDEX1 = 0x8D46, 161 | GL_STENCIL_INDEX4 = 0x8D47, 162 | GL_STENCIL_INDEX8 = 0x8D48, 163 | GL_STENCIL_INDEX16 = 0x8D49, 164 | GL_RENDERBUFFER_RED_SIZE = 0x8D50, 165 | GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, 166 | GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, 167 | GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, 168 | GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, 169 | GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, 170 | GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56, 171 | GL_MAX_SAMPLES = 0x8D57, 172 | } 173 | 174 | extern(System) @nogc nothrow { 175 | alias da_glIsRenderbuffer = GLboolean function(GLuint); 176 | alias da_glBindRenderbuffer = void function(GLenum, GLuint); 177 | alias da_glDeleteRenderbuffers = void function(GLsizei, const(GLuint)*); 178 | alias da_glGenRenderbuffers = void function(GLsizei, GLuint*); 179 | alias da_glRenderbufferStorage = void function(GLenum, GLenum, GLsizei, GLsizei); 180 | alias da_glGetRenderbufferParameteriv = void function(GLenum, GLenum, GLint*); 181 | alias da_glIsFramebuffer = GLboolean function(GLuint); 182 | alias da_glBindFramebuffer = void function(GLenum, GLuint); 183 | alias da_glDeleteFramebuffers = void function(GLsizei, const(GLuint)*); 184 | alias da_glGenFramebuffers = void function(GLsizei, GLuint*); 185 | alias da_glCheckFramebufferStatus = GLenum function(GLenum); 186 | alias da_glFramebufferTexture1D = void function(GLenum, GLenum, GLenum, GLuint, GLint); 187 | alias da_glFramebufferTexture2D = void function(GLenum, GLenum, GLenum, GLuint, GLint); 188 | alias da_glFramebufferTexture3D = void function(GLenum, GLenum, GLenum, GLuint, GLint, GLint); 189 | alias da_glFramebufferRenderbuffer = void function(GLenum, GLenum, GLenum, GLuint); 190 | alias da_glGetFramebufferAttachmentParameteriv = void function(GLenum, GLenum, GLenum, GLint*); 191 | alias da_glGenerateMipmap = void function(GLenum); 192 | alias da_glBlitFramebuffer = void function(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); 193 | alias da_glRenderbufferStorageMultisample = void function(GLenum, GLsizei, GLenum, GLsizei, GLsizei); 194 | alias da_glFramebufferTextureLayer = void function(GLenum, GLenum, GLuint, GLint, GLint); 195 | }}; 196 | 197 | enum arbFramebufferObjectFuncs = 198 | q{ 199 | da_glIsRenderbuffer glIsRenderbuffer; 200 | da_glBindRenderbuffer glBindRenderbuffer; 201 | da_glDeleteRenderbuffers glDeleteRenderbuffers; 202 | da_glGenRenderbuffers glGenRenderbuffers; 203 | da_glRenderbufferStorage glRenderbufferStorage; 204 | da_glGetRenderbufferParameteriv glGetRenderbufferParameteriv; 205 | da_glIsFramebuffer glIsFramebuffer; 206 | da_glBindFramebuffer glBindFramebuffer; 207 | da_glDeleteFramebuffers glDeleteFramebuffers; 208 | da_glGenFramebuffers glGenFramebuffers; 209 | da_glCheckFramebufferStatus glCheckFramebufferStatus; 210 | da_glFramebufferTexture1D glFramebufferTexture1D; 211 | da_glFramebufferTexture2D glFramebufferTexture2D; 212 | da_glFramebufferTexture3D glFramebufferTexture3D; 213 | da_glFramebufferRenderbuffer glFramebufferRenderbuffer; 214 | da_glGetFramebufferAttachmentParameteriv glGetFramebufferAttachmentParameteriv; 215 | da_glGenerateMipmap glGenerateMipmap; 216 | da_glBlitFramebuffer glBlitFramebuffer; 217 | da_glRenderbufferStorageMultisample glRenderbufferStorageMultisample; 218 | da_glFramebufferTextureLayer glFramebufferTextureLayer; 219 | }; 220 | 221 | enum arbFramebufferObjectLoaderImpl = 222 | q{ 223 | bindGLFunc(cast(void**)&glIsRenderbuffer, "glIsRenderbuffer"); 224 | bindGLFunc(cast(void**)&glBindRenderbuffer, "glBindRenderbuffer"); 225 | bindGLFunc(cast(void**)&glDeleteRenderbuffers, "glDeleteRenderbuffers"); 226 | bindGLFunc(cast(void**)&glGenRenderbuffers, "glGenRenderbuffers"); 227 | bindGLFunc(cast(void**)&glRenderbufferStorage, "glRenderbufferStorage"); 228 | bindGLFunc(cast(void**)&glGetRenderbufferParameteriv, "glGetRenderbufferParameteriv"); 229 | bindGLFunc(cast(void**)&glIsFramebuffer, "glIsFramebuffer"); 230 | bindGLFunc(cast(void**)&glBindFramebuffer, "glBindFramebuffer"); 231 | bindGLFunc(cast(void**)&glDeleteFramebuffers, "glDeleteFramebuffers"); 232 | bindGLFunc(cast(void**)&glGenFramebuffers, "glGenFramebuffers"); 233 | bindGLFunc(cast(void**)&glCheckFramebufferStatus, "glCheckFramebufferStatus"); 234 | bindGLFunc(cast(void**)&glFramebufferTexture1D, "glFramebufferTexture1D"); 235 | bindGLFunc(cast(void**)&glFramebufferTexture2D, "glFramebufferTexture2D"); 236 | bindGLFunc(cast(void**)&glFramebufferTexture3D, "glFramebufferTexture3D"); 237 | bindGLFunc(cast(void**)&glFramebufferRenderbuffer, "glFramebufferRenderbuffer"); 238 | bindGLFunc(cast(void**)&glGetFramebufferAttachmentParameteriv, "glGetFramebufferAttachmentParameteriv"); 239 | bindGLFunc(cast(void**)&glGenerateMipmap, "glGenerateMipmap"); 240 | bindGLFunc(cast(void**)&glBlitFramebuffer, "glBlitFramebuffer"); 241 | bindGLFunc(cast(void**)&glRenderbufferStorageMultisample, "glRenderbufferStorageMultisample"); 242 | bindGLFunc(cast(void**)&glFramebufferTextureLayer, "glFramebufferTextureLayer"); 243 | }; 244 | 245 | enum arbFramebufferObjectLoader = makeLoader(ARB_framebuffer_object, arbFramebufferObjectLoaderImpl, "gl30"); 246 | static if(!usingContexts) enum arbFramebufferObject = arbFramebufferObjectDecls ~ arbFramebufferObjectFuncs.makeGShared() ~ arbFramebufferObjectLoader; 247 | 248 | // ARB_framebuffer_sRGB 249 | enum ARB_framebuffer_sRGB = "GL_ARB_framebuffer_sRGB"; 250 | enum arbFramebufferSRGBDecls = `enum uint GL_FRAMEBUFFER_SRGB = 0x8DB9;`; 251 | enum arbFramebufferSRGBLoader = makeExtLoader(ARB_framebuffer_sRGB); 252 | static if(!usingContexts) enum arbFramebufferSRGB = arbFramebufferSRGBDecls ~ arbFramebufferSRGBLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_g.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th,2003 4 | 5 | Permission is hereby granted,free of charge,to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use,reproduce,display,distribute, 8 | execute,and transmit the Software,and to prepare derivative works of the 9 | Software,and to permit third-parties to whom the Software is furnished to 10 | do so,all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement,including 13 | the above license grant,this restriction and the following disclaimer, 14 | must be included in all copies of the Software,in whole or in part,and 15 | all derivative works of the Software,unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS",WITHOUT WARRANTY OF ANY KIND,EXPRESS OR 20 | IMPLIED,INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE,TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY,WHETHER IN CONTRACT,TORT OR OTHERWISE, 24 | ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_g; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_geometry_shader4 34 | enum ARB_geometry_shader4 = "GL_ARB_geometry_shader4"; 35 | enum arbGeometryShader4Decls = 36 | q{ 37 | enum : uint 38 | { 39 | GL_LINES_ADJACENCY_ARB = 0x000A, 40 | GL_LINE_STRIP_ADJACENCY_ARB = 0x000B, 41 | GL_TRIANGLES_ADJACENCY_ARB = 0x000C, 42 | GL_TRIANGLE_STRIP_ADJACENCY_ARB = 0x000D, 43 | GL_PROGRAM_POINT_SIZE_ARB = 0x8642, 44 | GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29, 45 | GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7, 46 | GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8, 47 | GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9, 48 | GL_GEOMETRY_SHADER_ARB = 0x8DD9, 49 | GL_GEOMETRY_VERTICES_OUT_ARB = 0x8DDA, 50 | GL_GEOMETRY_INPUT_TYPE_ARB = 0x8DDB, 51 | GL_GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC, 52 | GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD, 53 | GL_MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE, 54 | GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF, 55 | GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0, 56 | GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1, 57 | } 58 | extern(System) @nogc nothrow { 59 | alias da_glProgramParameteriARB = void function(GLuint,GLenum,GLint); 60 | alias da_glFramebufferTextureARB = void function(GLuint,GLenum,GLuint,GLint); 61 | alias da_glFramebufferTextureLayerARB = void function(GLuint,GLenum,GLuint,GLint,GLint); 62 | alias da_glFramebufferTextureFaceARB = void function(GLuint,GLenum,GLuint,GLint,GLenum); 63 | }}; 64 | 65 | enum arbGeometryShader4Funcs = 66 | q{ 67 | da_glProgramParameteriARB glProgramParameteriARB; 68 | da_glFramebufferTextureARB glFramebufferTextureARB; 69 | da_glFramebufferTextureLayerARB glFramebufferTextureLayerARB; 70 | da_glFramebufferTextureFaceARB glFramebufferTextureFaceARB; 71 | }; 72 | 73 | enum arbGeometryShader4LoaderImpl = 74 | q{ 75 | bindGLFunc(cast(void**)&glProgramParameteriARB,"glProgramParameteriARB"); 76 | bindGLFunc(cast(void**)&glFramebufferTextureARB,"glFramebufferTextureARB"); 77 | bindGLFunc(cast(void**)&glFramebufferTextureLayerARB,"glFramebufferTextureLayerARB"); 78 | bindGLFunc(cast(void**)&glFramebufferTextureFaceARB,"glFramebufferTextureFaceARB"); 79 | }; 80 | 81 | enum arbGeometryShader4Loader = makeExtLoader(ARB_geometry_shader4, arbGeometryShader4LoaderImpl); 82 | static if(!usingContexts) enum arbGeometryShader4 = arbGeometryShader4Decls ~ arbGeometryShader4Funcs.makeGShared() ~ arbGeometryShader4Loader; 83 | 84 | // ARB_get_program_binary <-- Core in GL 4.1 85 | enum ARB_get_program_binary = "GL_ARB_get_program_binary"; 86 | enum arbGetProgramBinaryDecls = 87 | q{ 88 | enum : uint 89 | { 90 | GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257, 91 | GL_PROGRAM_BINARY_LENGTH = 0x8741, 92 | GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, 93 | GL_PROGRAM_BINARY_FORMATS = 0x87FF, 94 | } 95 | extern(System) @nogc nothrow { 96 | alias da_glGetProgramBinary = void function(GLuint,GLsizei,GLsizei*,GLenum*,GLvoid*); 97 | alias da_glProgramBinary = void function(GLuint,GLenum,const(GLvoid)*,GLsizei); 98 | alias da_glProgramParameteri = void function(GLuint,GLenum,GLint); 99 | }}; 100 | 101 | enum arbGetProgramBinaryFuncs = 102 | q{ 103 | da_glGetProgramBinary glGetProgramBinary; 104 | da_glProgramBinary glProgramBinary; 105 | da_glProgramParameteri glProgramParameteri; 106 | }; 107 | 108 | enum arbGetProgramBinaryLoaderImpl = 109 | q{ 110 | bindGLFunc(cast(void**)&glGetProgramBinary,"glGetProgramBinary"); 111 | bindGLFunc(cast(void**)&glProgramBinary,"glProgramBinary"); 112 | bindGLFunc(cast(void**)&glProgramParameteri,"glProgramParameteri"); 113 | }; 114 | 115 | enum arbGetProgramBinaryLoader = makeLoader(ARB_get_program_binary,arbGetProgramBinaryLoaderImpl,"gl41"); 116 | static if(!usingContexts) enum arbGetProgramBinary = arbGetProgramBinaryDecls ~ arbGetProgramBinaryFuncs.makeGShared() ~ arbGetProgramBinaryLoader; 117 | 118 | // ARB_get_texture_sub_image <-- Core in GL 4.5 119 | enum ARB_get_texture_sub_image = "GL_ARB_get_texture_sub_image"; 120 | enum arbGetTextureSubImageDecls = 121 | q{ 122 | extern(System) @nogc nothrow 123 | { 124 | alias da_glGetTextureSubImage = void function(GLuint,GLint,GLint,GLint,GLint,GLsizei,GLsizei,GLsizei,GLenum,GLenum,GLsizei,void*); 125 | alias da_glGetCompressedTextureSubImage = void function(GLuint,GLint,GLint,GLint,GLint,GLsizei,GLsizei,GLsizei,GLsizei,void*); 126 | }}; 127 | 128 | enum arbGetTextureSubImageFuncs = 129 | q{ 130 | da_glGetTextureSubImage glGetTextureSubImage; 131 | da_glGetCompressedTextureSubImage glGetCompressedTextureSubImage; 132 | }; 133 | 134 | enum arbGetTextureSubImageLoaderImpl = 135 | q{ 136 | bindGLFunc(cast(void**)&glGetTextureSubImage,"glGetTextureSubImage"); 137 | bindGLFunc(cast(void**)&glGetCompressedTextureSubImage,"glGetCompressedTextureSubImage"); 138 | }; 139 | 140 | enum arbGetTextureSubImageLoader = makeLoader(ARB_get_texture_sub_image,arbGetTextureSubImageLoaderImpl,"gl45"); 141 | static if(!usingContexts) enum arbGetTextureSubImage = arbGetTextureSubImageDecls ~ arbGetTextureSubImageFuncs.makeGShared() ~ arbGetTextureSubImageLoader; 142 | 143 | // ARB_gpu_shader5 <-- Core in GL 4.0 144 | enum ARB_gpu_shader5 = "GL_ARB_gpu_shader5"; 145 | enum arbGPUShader5Decls = 146 | q{ 147 | enum : uint 148 | { 149 | GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F, 150 | GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, 151 | GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, 152 | GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, 153 | GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D, 154 | }}; 155 | 156 | enum arbGPUShader5Loader = makeLoader(ARB_gpu_shader5,"","gl40"); 157 | static if(!usingContexts) enum arbGPUShader5 = arbGPUShader5Decls ~ arbGPUShader5Loader; 158 | 159 | // ARB_gpu_shader_fp64 <-- Core in GL 4.0 160 | enum ARB_gpu_shader_fp64 = "GL_ARB_gpu_shader_fp64"; 161 | enum arbGPUShaderFP64Decls = 162 | q{ 163 | enum : uint 164 | { 165 | GL_DOUBLE_VEC2 = 0x8FFC, 166 | GL_DOUBLE_VEC3 = 0x8FFD, 167 | GL_DOUBLE_VEC4 = 0x8FFE, 168 | GL_DOUBLE_MAT2 = 0x8F46, 169 | GL_DOUBLE_MAT3 = 0x8F47, 170 | GL_DOUBLE_MAT4 = 0x8F48, 171 | GL_DOUBLE_MAT2x3 = 0x8F49, 172 | GL_DOUBLE_MAT2x4 = 0x8F4A, 173 | GL_DOUBLE_MAT3x2 = 0x8F4B, 174 | GL_DOUBLE_MAT3x4 = 0x8F4C, 175 | GL_DOUBLE_MAT4x2 = 0x8F4D, 176 | GL_DOUBLE_MAT4x3 = 0x8F4E, 177 | } 178 | extern(System) @nogc nothrow { 179 | alias da_glUniform1d = void function(GLint,GLdouble); 180 | alias da_glUniform2d = void function(GLint,GLdouble,GLdouble); 181 | alias da_glUniform3d = void function(GLint,GLdouble,GLdouble,GLdouble); 182 | alias da_glUniform4d = void function(GLint,GLdouble,GLdouble,GLdouble,GLdouble); 183 | alias da_glUniform1dv = void function(GLint,GLsizei,const(GLdouble)*); 184 | alias da_glUniform2dv = void function(GLint,GLsizei,const(GLdouble)*); 185 | alias da_glUniform3dv = void function(GLint,GLsizei,const(GLdouble)*); 186 | alias da_glUniform4dv = void function(GLint,GLsizei,const(GLdouble)*); 187 | alias da_glUniformMatrix2dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 188 | alias da_glUniformMatrix3dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 189 | alias da_glUniformMatrix4dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 190 | alias da_glUniformMatrix2x3dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 191 | alias da_glUniformMatrix2x4dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 192 | alias da_glUniformMatrix3x2dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 193 | alias da_glUniformMatrix3x4dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 194 | alias da_glUniformMatrix4x2dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 195 | alias da_glUniformMatrix4x3dv = void function(GLint,GLsizei,GLboolean,const(GLdouble)*); 196 | alias da_glGetUniformdv = void function(GLuint,GLint,GLdouble*); 197 | }}; 198 | 199 | enum arbGPUShaderFP64Funcs = 200 | q{ 201 | da_glUniform1d glUniform1d; 202 | da_glUniform2d glUniform2d; 203 | da_glUniform3d glUniform3d; 204 | da_glUniform4d glUniform4d; 205 | da_glUniform1dv glUniform1dv; 206 | da_glUniform2dv glUniform2dv; 207 | da_glUniform3dv glUniform3dv; 208 | da_glUniform4dv glUniform4dv; 209 | da_glUniformMatrix2dv glUniformMatrix2dv; 210 | da_glUniformMatrix3dv glUniformMatrix3dv; 211 | da_glUniformMatrix4dv glUniformMatrix4dv; 212 | da_glUniformMatrix2x3dv glUniformMatrix2x3dv; 213 | da_glUniformMatrix2x4dv glUniformMatrix2x4dv; 214 | da_glUniformMatrix3x2dv glUniformMatrix3x2dv; 215 | da_glUniformMatrix3x4dv glUniformMatrix3x4dv; 216 | da_glUniformMatrix4x2dv glUniformMatrix4x2dv; 217 | da_glUniformMatrix4x3dv glUniformMatrix4x3dv; 218 | da_glGetUniformdv glGetUniformdv; 219 | }; 220 | 221 | enum arbGPUShaderFP64LoaderImpl = 222 | q{ 223 | bindGLFunc(cast(void**)&glUniform1d,"glUniform1d"); 224 | bindGLFunc(cast(void**)&glUniform2d,"glUniform2d"); 225 | bindGLFunc(cast(void**)&glUniform3d,"glUniform3d"); 226 | bindGLFunc(cast(void**)&glUniform4d,"glUniform4d"); 227 | bindGLFunc(cast(void**)&glUniform1dv,"glUniform1dv"); 228 | bindGLFunc(cast(void**)&glUniform2dv,"glUniform2dv"); 229 | bindGLFunc(cast(void**)&glUniform3dv,"glUniform3dv"); 230 | bindGLFunc(cast(void**)&glUniform4dv,"glUniform4dv"); 231 | bindGLFunc(cast(void**)&glUniformMatrix2dv,"glUniformMatrix2dv"); 232 | bindGLFunc(cast(void**)&glUniformMatrix3dv,"glUniformMatrix3dv"); 233 | bindGLFunc(cast(void**)&glUniformMatrix4dv,"glUniformMatrix4dv"); 234 | bindGLFunc(cast(void**)&glUniformMatrix2x3dv,"glUniformMatrix2x3dv"); 235 | bindGLFunc(cast(void**)&glUniformMatrix2x4dv,"glUniformMatrix2x4dv"); 236 | bindGLFunc(cast(void**)&glUniformMatrix3x2dv,"glUniformMatrix3x2dv"); 237 | bindGLFunc(cast(void**)&glUniformMatrix3x4dv,"glUniformMatrix3x4dv"); 238 | bindGLFunc(cast(void**)&glUniformMatrix4x2dv,"glUniformMatrix4x2dv"); 239 | bindGLFunc(cast(void**)&glUniformMatrix4x3dv,"glUniformMatrix4x3dv"); 240 | bindGLFunc(cast(void**)&glGetUniformdv,"glGetUniformdv"); 241 | }; 242 | 243 | enum arbGPUShaderFP64Loader = makeLoader(ARB_gpu_shader_fp64,arbGPUShaderFP64LoaderImpl,"gl40"); 244 | static if(!usingContexts) enum arbGPUShaderFP64 = arbGPUShaderFP64Decls ~ arbGPUShaderFP64Funcs.makeGShared() ~ arbGPUShaderFP64Loader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_h.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_h; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_half_float_vertex <-- Core in GL 3.0 34 | enum ARB_half_float_vertex = "GL_ARB_half_float_vertex"; 35 | enum arbHalfFloatVertexDecls = "enum uint GL_HALF_FLOAT = 0x140B;"; 36 | enum arbHalfFloatVertexLoader = makeLoader(ARB_half_float_vertex, "", "gl30"); 37 | static if(!usingContexts) enum arbHalfFloatVertex = arbHalfFloatVertexDecls ~ arbHalfFloatVertexLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_i.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_i; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_imaging 34 | enum ARB_imaging = "GL_ARB_imaging"; 35 | enum arbImagingDecls = 36 | q{ 37 | enum : uint 38 | { 39 | GL_BLEND_COLOR = 0x8005, 40 | GL_BLEND_EQUATION = 0x8009, 41 | }}; 42 | 43 | enum arbImagingLoader = makeExtLoader(ARB_imaging); 44 | static if(!usingContexts) enum arbImaging = arbImagingDecls ~ arbImagingLoader; 45 | 46 | // ARB_internalformat_query <-- Core in GL 4.2 47 | enum ARB_internalformat_query = "GL_ARB_internalformat_query"; 48 | enum arbInternalFormatQueryDecls = 49 | q{ 50 | enum uint GL_NUM_SAMPLE_COUNTS = 0x9380; 51 | extern(System) @nogc nothrow alias da_glGetInternalformativ = void function(GLenum, GLenum, GLenum, GLsizei, GLint*); 52 | }; 53 | 54 | enum arbInternalFormatQueryFuncs = `da_glGetInternalformativ glGetInternalformativ;`; 55 | enum arbInternalFormatQueryLoaderImpl = `bindGLFunc(cast(void**)&glGetInternalformativ, "glGetInternalformativ");`; 56 | enum arbInternalFormatQueryLoader = makeLoader(ARB_internalformat_query, arbInternalFormatQueryLoaderImpl, "gl42"); 57 | static if(!usingContexts) enum arbInternalFormatQuery = arbInternalFormatQueryDecls ~ arbInternalFormatQueryFuncs.makeGShared() ~ arbInternalFormatQueryLoader; 58 | 59 | // ARB_internalformat_query2 <-- Core in GL 4.3 60 | enum ARB_internalformat_query2 = "GL_ARB_internalformat_query2"; 61 | enum arbInternalFormatQuery2Decls = 62 | q{ 63 | enum : uint 64 | { 65 | GL_INTERNALFORMAT_SUPPORTED = 0x826F, 66 | GL_INTERNALFORMAT_PREFERRED = 0x8270, 67 | GL_INTERNALFORMAT_RED_SIZE = 0x8271, 68 | GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, 69 | GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, 70 | GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, 71 | GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, 72 | GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, 73 | GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, 74 | GL_INTERNALFORMAT_RED_TYPE = 0x8278, 75 | GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, 76 | GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, 77 | GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, 78 | GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, 79 | GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, 80 | GL_MAX_WIDTH = 0x827E, 81 | GL_MAX_HEIGHT = 0x827F, 82 | GL_MAX_DEPTH = 0x8280, 83 | GL_MAX_LAYERS = 0x8281, 84 | GL_MAX_COMBINED_DIMENSIONS = 0x8282, 85 | GL_COLOR_COMPONENTS = 0x8283, 86 | GL_DEPTH_COMPONENTS = 0x8284, 87 | GL_STENCIL_COMPONENTS = 0x8285, 88 | GL_COLOR_RENDERABLE = 0x8286, 89 | GL_DEPTH_RENDERABLE = 0x8287, 90 | GL_STENCIL_RENDERABLE = 0x8288, 91 | GL_FRAMEBUFFER_RENDERABLE = 0x8289, 92 | GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, 93 | GL_FRAMEBUFFER_BLEND = 0x828B, 94 | GL_READ_PIXELS = 0x828C, 95 | GL_READ_PIXELS_FORMAT = 0x828D, 96 | GL_READ_PIXELS_TYPE = 0x828E, 97 | GL_TEXTURE_IMAGE_FORMAT = 0x828F, 98 | GL_TEXTURE_IMAGE_TYPE = 0x8290, 99 | GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, 100 | GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, 101 | GL_MIPMAP = 0x8293, 102 | GL_MANUAL_GENERATE_MIPMAP = 0x8294, 103 | GL_AUTO_GENERATE_MIPMAP = 0x8295, 104 | GL_COLOR_ENCODING = 0x8296, 105 | GL_SRGB_READ = 0x8297, 106 | GL_SRGB_WRITE = 0x8298, 107 | GL_SRGB_DECODE_ARB = 0x8299, 108 | GL_FILTER = 0x829A, 109 | GL_VERTEX_TEXTURE = 0x829B, 110 | GL_TESS_CONTROL_TEXTURE = 0x829C, 111 | GL_TESS_EVALUATION_TEXTURE = 0x829D, 112 | GL_GEOMETRY_TEXTURE = 0x829E, 113 | GL_FRAGMENT_TEXTURE = 0x829F, 114 | GL_COMPUTE_TEXTURE = 0x82A0, 115 | GL_TEXTURE_SHADOW = 0x82A1, 116 | GL_TEXTURE_GATHER = 0x82A2, 117 | GL_TEXTURE_GATHER_SHADOW = 0x82A3, 118 | GL_SHADER_IMAGE_LOAD = 0x82A4, 119 | GL_SHADER_IMAGE_STORE = 0x82A5, 120 | GL_SHADER_IMAGE_ATOMIC = 0x82A6, 121 | GL_IMAGE_TEXEL_SIZE = 0x82A7, 122 | GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, 123 | GL_IMAGE_PIXEL_FORMAT = 0x82A9, 124 | GL_IMAGE_PIXEL_TYPE = 0x82AA, 125 | GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, 126 | GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, 127 | GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, 128 | GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, 129 | GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, 130 | GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, 131 | GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, 132 | GL_CLEAR_BUFFER = 0x82B4, 133 | GL_TEXTURE_VIEW = 0x82B5, 134 | GL_VIEW_COMPATIBILITY_CLASS = 0x82B6, 135 | GL_FULL_SUPPORT = 0x82B7, 136 | GL_CAVEAT_SUPPORT = 0x82B8, 137 | GL_IMAGE_CLASS_4_X_32 = 0x82B9, 138 | GL_IMAGE_CLASS_2_X_32 = 0x82BA, 139 | GL_IMAGE_CLASS_1_X_32 = 0x82BB, 140 | GL_IMAGE_CLASS_4_X_16 = 0x82BC, 141 | GL_IMAGE_CLASS_2_X_16 = 0x82BD, 142 | GL_IMAGE_CLASS_1_X_16 = 0x82BE, 143 | GL_IMAGE_CLASS_4_X_8 = 0x82BF, 144 | GL_IMAGE_CLASS_2_X_8 = 0x82C0, 145 | GL_IMAGE_CLASS_1_X_8 = 0x82C1, 146 | GL_IMAGE_CLASS_11_11_10 = 0x82C2, 147 | GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, 148 | GL_VIEW_CLASS_128_BITS = 0x82C4, 149 | GL_VIEW_CLASS_96_BITS = 0x82C5, 150 | GL_VIEW_CLASS_64_BITS = 0x82C6, 151 | GL_VIEW_CLASS_48_BITS = 0x82C7, 152 | GL_VIEW_CLASS_32_BITS = 0x82C8, 153 | GL_VIEW_CLASS_24_BITS = 0x82C9, 154 | GL_VIEW_CLASS_16_BITS = 0x82CA, 155 | GL_VIEW_CLASS_8_BITS = 0x82CB, 156 | GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, 157 | GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, 158 | GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, 159 | GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, 160 | GL_VIEW_CLASS_RGTC1_RED = 0x82D0, 161 | GL_VIEW_CLASS_RGTC2_RG = 0x82D1, 162 | GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, 163 | GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3, 164 | } 165 | extern(System) @nogc nothrow alias da_glGetInternalformati64v = void function(GLenum,GLenum,GLenum,GLsizei,GLint64*); 166 | }; 167 | 168 | enum arbInternalFormatQuery2Funcs = `da_glGetInternalformati64v glGetInternalformati64v;`; 169 | enum arbInternalFormatQuery2LoaderImpl = `bindGLFunc(cast(void**)&glGetInternalformati64v, "glGetInternalformati64v");`; 170 | enum arbInternalFormatQuery2Loader = makeLoader(ARB_internalformat_query2, arbInternalFormatQuery2LoaderImpl, "gl43"); 171 | static if(!usingContexts) enum arbInternalFormatQuery2 = arbInternalFormatQuery2Decls ~ arbInternalFormatQuery2Funcs.makeGShared() ~ arbInternalFormatQuery2Loader; 172 | 173 | // ARB_invalidate_subdata <-- Core in GL 4.3 174 | enum ARB_invalidate_subdata = "GL_ARB_invalidate_subdata"; 175 | enum arbInvalidateSubdataDecls = 176 | q{ 177 | extern(System) @nogc nothrow { 178 | alias da_glInvalidateTexSubImage = void function(GLuint,GLint,GLint,GLint,GLint,GLsizei,GLsizei,GLsizei); 179 | alias da_glInvalidateTexImage = void function(GLuint,GLint); 180 | alias da_glInvalidateBufferSubData = void function(GLuint,GLintptr,GLsizeiptr); 181 | alias da_glInvalidateBufferData = void function(GLuint); 182 | alias da_glInvalidateFramebuffer = void function(GLenum,GLsizei,const(GLenum)*); 183 | alias da_glInvalidateSubFramebuffer = void function(GLenum,GLsizei,const(GLenum)*,GLint,GLint,GLsizei,GLsizei); 184 | }}; 185 | 186 | enum arbInvalidateSubdataFuncs = 187 | q{ 188 | da_glInvalidateTexSubImage glInvalidateTexSubImage; 189 | da_glInvalidateTexImage glInvalidateTexImage; 190 | da_glInvalidateBufferSubData glInvalidateBufferSubData; 191 | da_glInvalidateBufferData glInvalidateBufferData; 192 | da_glInvalidateFramebuffer glInvalidateFramebuffer; 193 | da_glInvalidateSubFramebuffer glInvalidateSubFramebuffer; 194 | }; 195 | 196 | enum arbInvalidateSubdataLoaderImpl = 197 | q{ 198 | bindGLFunc(cast(void**)&glInvalidateTexSubImage, "glInvalidateTexSubImage"); 199 | bindGLFunc(cast(void**)&glInvalidateTexImage, "glInvalidateTexImage"); 200 | bindGLFunc(cast(void**)&glInvalidateBufferSubData, "glInvalidateBufferSubData"); 201 | bindGLFunc(cast(void**)&glInvalidateBufferData, "glInvalidateBufferData"); 202 | bindGLFunc(cast(void**)&glInvalidateFramebuffer, "glInvalidateFramebuffer"); 203 | bindGLFunc(cast(void**)&glInvalidateSubFramebuffer, "glInvalidateSubFramebuffer"); 204 | }; 205 | 206 | enum arbInvalidateSubdataLoader = makeLoader(ARB_invalidate_subdata, arbInvalidateSubdataLoaderImpl, "gl43"); 207 | static if(!usingContexts) enum arbInvalidateSubdata = arbInvalidateSubdataDecls ~ arbInvalidateSubdataFuncs.makeGShared() ~ arbInvalidateSubdataLoader; 208 | 209 | -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_m.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_m; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_map_buffer_alignment <-- Core in GL 4.2 34 | enum ARB_map_buffer_alignment = "GL_ARB_map_buffer_alignment"; 35 | enum arbMapBufferAlignmentDecls = `enum uint GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC;`; 36 | enum arbMapBufferAlignmentLoader = makeLoader(ARB_map_buffer_alignment, "", "gl42"); 37 | static if(!usingContexts) enum arbMapBufferAlignment = arbMapBufferAlignmentDecls ~ arbMapBufferAlignmentLoader; 38 | 39 | // ARB_map_buffer_range <-- Core in GL 3.0 40 | enum ARB_map_buffer_range = "GL_ARB_map_buffer_range"; 41 | enum arbMapBufferRangeDecls = 42 | q{ 43 | enum : uint 44 | { 45 | GL_MAP_READ_BIT = 0x0001, 46 | GL_MAP_WRITE_BIT = 0x0002, 47 | GL_MAP_INVALIDATE_RANGE_BIT = 0x0004, 48 | GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008, 49 | GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010, 50 | GL_MAP_UNSYNCHRONIZED_BIT = 0x0020, 51 | } 52 | 53 | extern(System) @nogc nothrow { 54 | alias da_glMapBufferRange = GLvoid* function(GLenum, GLintptr, GLsizeiptr, GLbitfield); 55 | alias da_glFlushMappedBufferRange = void function(GLenum, GLintptr, GLsizeiptr); 56 | }}; 57 | 58 | enum arbMapBufferRangeFuncs = 59 | q{ 60 | da_glMapBufferRange glMapBufferRange; 61 | da_glFlushMappedBufferRange glFlushMappedBufferRange; 62 | }; 63 | 64 | enum arbMapBufferRangeLoaderImpl = 65 | q{ 66 | bindGLFunc(cast(void**)&glMapBufferRange, "glMapBufferRange"); 67 | bindGLFunc(cast(void**)&glFlushMappedBufferRange, "glFlushMappedBufferRange"); 68 | }; 69 | 70 | enum arbMapBufferRangeLoader = makeLoader(ARB_map_buffer_range, arbMapBufferRangeLoaderImpl, "gl30"); 71 | static if(!usingContexts) enum arbMapBufferRange = arbMapBufferRangeDecls ~ arbMapBufferRangeFuncs.makeGShared() ~ arbMapBufferRangeLoader; 72 | 73 | // ARB_multi_bind <-- Core in GL 4.4 74 | enum ARB_multi_bind = "GL_ARB_multi_bind"; 75 | enum arbMultBindDecls = 76 | q{ 77 | extern(System) @nogc nothrow { 78 | alias da_glBindBuffersBase = void function(GLenum,GLuint,GLsizei,const(GLuint)*); 79 | alias da_glBindBuffersRange = void function(GLenum,GLuint,GLsizei,const(GLuint)*,const(GLintptr)*,const(GLsizeiptr)*); 80 | alias da_glBindTextures = void function(GLuint,GLsizei,const(GLuint)*); 81 | alias da_glBindSamplers = void function(GLuint,GLsizei,const(GLuint)*); 82 | alias da_glBindImageTextures = void function(GLuint,GLsizei,const(GLuint)*); 83 | alias da_glBindVertexBuffers = void function(GLuint,GLsizei,const(GLuint)*,const(GLintptr)*,const(GLsizei)*); 84 | }}; 85 | 86 | enum arbMultBindFuncs = 87 | q{ 88 | da_glBindBuffersBase glBindBuffersBase; 89 | da_glBindBuffersRange glBindBuffersRange; 90 | da_glBindTextures glBindTextures; 91 | da_glBindSamplers glBindSamplers; 92 | da_glBindImageTextures glBindImageTextures; 93 | da_glBindVertexBuffers glBindVertexBuffers; 94 | }; 95 | 96 | enum arbMultBindLoaderImpl = 97 | q{ 98 | bindGLFunc(cast(void**)&glBindBuffersBase, "glBindBuffersBase"); 99 | bindGLFunc(cast(void**)&glBindBuffersRange, "glBindBuffersRange"); 100 | bindGLFunc(cast(void**)&glBindTextures, "glBindTextures"); 101 | bindGLFunc(cast(void**)&glBindSamplers, "glBindSamplers"); 102 | bindGLFunc(cast(void**)&glBindImageTextures, "glBindImageTextures"); 103 | bindGLFunc(cast(void**)&glBindVertexBuffers, "glBindVertexBuffers"); 104 | }; 105 | 106 | enum arbMultBindLoader = makeLoader(ARB_multi_bind, arbMultBindLoaderImpl, "gl44"); 107 | static if(!usingContexts) enum arbMultBind = arbMultBindDecls ~ arbMultBindFuncs.makeGShared() ~ arbMultBindLoader; 108 | 109 | // ARB_multi_draw_indirect <-- Core in GL 4.3 110 | enum ARB_multi_draw_indirect = "GL_ARB_multi_draw_indirect"; 111 | enum arbMultiDrawIndirectDecls = 112 | q{ 113 | extern(System) @nogc nothrow { 114 | alias da_glMultiDrawArraysIndirect = void function(GLenum,const(void)*,GLsizei,GLsizei); 115 | alias da_glMultiDrawElementsIndirect = void function(GLenum,GLenum,const(void)*,GLsizei,GLsizei); 116 | }}; 117 | 118 | enum arbMultiDrawIndirectFuncs = 119 | q{ 120 | da_glMultiDrawArraysIndirect glMultiDrawArraysIndirect; 121 | da_glMultiDrawElementsIndirect glMultiDrawElementsIndirect; 122 | }; 123 | 124 | enum arbMultiDrawIndirectLoaderImpl = 125 | q{ 126 | bindGLFunc(cast(void**)&glMultiDrawArraysIndirect, "glMultiDrawArraysIndirect"); 127 | bindGLFunc(cast(void**)&glMultiDrawElementsIndirect, "glMultiDrawElementsIndirect"); 128 | }; 129 | 130 | enum arbMultiDrawIndirectLoader = makeLoader(ARB_multi_draw_indirect, arbMultiDrawIndirectLoaderImpl, "gl43"); 131 | static if(!usingContexts) enum arbMultiDrawIndirect = arbMultiDrawIndirectDecls ~ arbMultiDrawIndirectFuncs.makeGShared() ~ arbMultiDrawIndirectLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_o.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_o; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_occlusion_query2 <-- Core in GL 3.3 34 | enum ARB_occlusion_query2 = "GL_ARB_occlusion_query2"; 35 | enum arbOcclusionQuery2Decls = `enum uint GL_ANY_SAMPLES_PASSED = 0x8C2F;`; 36 | enum arbOcclusionQuery2Loader = makeLoader(ARB_occlusion_query2, "", "gl33"); 37 | static if(!usingContexts) enum arbOcclusionQuery2 = arbOcclusionQuery2Decls ~ arbOcclusionQuery2Loader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_p.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_p; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_pipeline_statistics_query 34 | enum ARB_pipeline_statistics_query = "GL_ARB_pipeline_statistics_query"; 35 | enum arbPipelineStatisticsQueryDecls = 36 | q{ 37 | enum : uint 38 | { 39 | GL_VERTICES_SUBMITTED_ARB = 0x82EE, 40 | GL_PRIMITIVES_SUBMITTED_ARB = 0x82EF, 41 | GL_VERTEX_SHADER_INVOCATIONS_ARB = 0x82F0, 42 | GL_TESS_CONTROL_SHADER_PATCHES_ARB = 0x82F1, 43 | GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB = 0x82F2, 44 | GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB = 0x82F3, 45 | GL_FRAGMENT_SHADER_INVOCATIONS_ARB = 0x82F4, 46 | GL_COMPUTE_SHADER_INVOCATIONS_ARB = 0x82F5, 47 | GL_CLIPPING_INPUT_PRIMITIVES_ARB = 0x82F6, 48 | GL_CLIPPING_OUTPUT_PRIMITIVES_ARB = 0x82F7, 49 | }}; 50 | 51 | enum arbPipelineStatisticsQueryLoader = makeExtLoader(ARB_pipeline_statistics_query); 52 | static if(!usingContexts) enum arbPipelineStatisticsQuery = arbPipelineStatisticsQueryDecls ~ arbPipelineStatisticsQueryLoader; 53 | 54 | // ARB_program_interface_query <-- Core in GL 4.3 55 | enum ARB_program_interface_query = "GL_ARB_program_interface_query"; 56 | enum arbProgramInterfaceQueryDecls = 57 | q{ 58 | enum : uint 59 | { 60 | GL_UNIFORM = 0x92E1, 61 | GL_UNIFORM_BLOCK = 0x92E2, 62 | GL_PROGRAM_INPUT = 0x92E3, 63 | GL_PROGRAM_OUTPUT = 0x92E4, 64 | GL_BUFFER_VARIABLE = 0x92E5, 65 | GL_SHADER_STORAGE_BLOCK = 0x92E6, 66 | GL_VERTEX_SUBROUTINE = 0x92E8, 67 | GL_TESS_CONTROL_SUBROUTINE = 0x92E9, 68 | GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, 69 | GL_GEOMETRY_SUBROUTINE = 0x92EB, 70 | GL_FRAGMENT_SUBROUTINE = 0x92EC, 71 | GL_COMPUTE_SUBROUTINE = 0x92ED, 72 | GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, 73 | GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, 74 | GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, 75 | GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, 76 | GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, 77 | GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, 78 | GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4, 79 | GL_ACTIVE_RESOURCES = 0x92F5, 80 | GL_MAX_NAME_LENGTH = 0x92F6, 81 | GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, 82 | GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8, 83 | GL_NAME_LENGTH = 0x92F9, 84 | GL_TYPE = 0x92FA, 85 | GL_ARRAY_SIZE = 0x92FB, 86 | GL_OFFSET = 0x92FC, 87 | GL_BLOCK_INDEX = 0x92FD, 88 | GL_ARRAY_STRIDE = 0x92FE, 89 | GL_MATRIX_STRIDE = 0x92FF, 90 | GL_IS_ROW_MAJOR = 0x9300, 91 | GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, 92 | GL_BUFFER_BINDING = 0x9302, 93 | GL_BUFFER_DATA_SIZE = 0x9303, 94 | GL_NUM_ACTIVE_VARIABLES = 0x9304, 95 | GL_ACTIVE_VARIABLES = 0x9305, 96 | GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, 97 | GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, 98 | GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, 99 | GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, 100 | GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, 101 | GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, 102 | GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, 103 | GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, 104 | GL_LOCATION = 0x930E, 105 | GL_LOCATION_INDEX = 0x930F, 106 | GL_IS_PER_PATCH = 0x92E7, 107 | } 108 | extern(System) @nogc nothrow 109 | { 110 | alias da_glGetProgramInterfaceiv = void function(GLuint,GLenum,GLenum,GLint*); 111 | alias da_glGetProgramResourceIndex = GLuint function(GLuint,GLenum,const(GLchar)*); 112 | alias da_glGetProgramResourceName = void function(GLuint,GLenum,GLuint,GLsizei,GLsizei*,GLchar*); 113 | alias da_glGetProgramResourceiv = void function(GLuint,GLenum,GLuint,GLsizei,const(GLenum)*,GLsizei,GLsizei*,GLint*); 114 | alias da_glGetProgramResourceLocation = GLint function(GLuint,GLenum,const(GLchar)*); 115 | alias da_glGetProgramResourceLocationIndex = GLint function(GLuint,GLenum,const(GLchar)*); 116 | }}; 117 | 118 | enum arbProgramInterfaceQueryFuncs = 119 | q{ 120 | da_glGetProgramInterfaceiv glGetProgramInterfaceiv; 121 | da_glGetProgramResourceIndex glGetProgramResourceIndex; 122 | da_glGetProgramResourceName glGetProgramResourceName; 123 | da_glGetProgramResourceiv glGetProgramResourceiv; 124 | da_glGetProgramResourceLocation glGetProgramResourceLocation; 125 | da_glGetProgramResourceLocationIndex glGetProgramResourceLocationIndex; 126 | }; 127 | 128 | enum arbProgramInterfaceQueryLoaderImpl = 129 | q{ 130 | bindGLFunc(cast(void**)&glGetProgramInterfaceiv, "glGetProgramInterfaceiv"); 131 | bindGLFunc(cast(void**)&glGetProgramResourceIndex, "glGetProgramResourceIndex"); 132 | bindGLFunc(cast(void**)&glGetProgramResourceName, "glGetProgramResourceName"); 133 | bindGLFunc(cast(void**)&glGetProgramResourceiv, "glGetProgramResourceiv"); 134 | bindGLFunc(cast(void**)&glGetProgramResourceLocation, "glGetProgramResourceLocation"); 135 | bindGLFunc(cast(void**)&glGetProgramResourceLocationIndex, "glGetProgramResourceLocationIndex"); 136 | }; 137 | 138 | enum arbProgramInterfaceQueryLoader = makeLoader(ARB_program_interface_query, arbProgramInterfaceQueryLoaderImpl, "gl43"); 139 | static if(!usingContexts) enum arbProgramInterfaceQuery = arbProgramInterfaceQueryDecls ~ arbProgramInterfaceQueryFuncs.makeGShared() ~ arbProgramInterfaceQueryLoader; 140 | 141 | // ARB_provoking_vertex <-- Core in GL 3.2 142 | enum ARB_provoking_vertex = "GL_ARB_provoking_vertex"; 143 | enum arbProvokingVertexDecls = 144 | q{ 145 | enum : uint 146 | { 147 | GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C, 148 | GL_FIRST_VERTEX_CONVENTION = 0x8E4D, 149 | GL_LAST_VERTEX_CONVENTION = 0x8E4E, 150 | GL_PROVOKING_VERTEX = 0x8E4F, 151 | } 152 | 153 | extern(System) @nogc nothrow alias da_glProvokingVertex = void function(GLenum); 154 | }; 155 | 156 | enum arbProvokingVertexFuncs = `da_glProvokingVertex glProvokingVertex;`; 157 | enum arbProvokingVertexLoaderImpl = `bindGLFunc(cast(void**)&glProvokingVertex, "glProvokingVertex");`; 158 | enum arbProvokingVertexLoader = makeLoader(ARB_provoking_vertex, arbProvokingVertexLoaderImpl, "gl32"); 159 | static if(!usingContexts) enum arbProvokingVertex = arbProvokingVertexDecls ~ arbProvokingVertexFuncs.makeGShared() ~ arbProvokingVertexLoader; 160 | -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_q.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_q; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_query_buffer_object <-- Core in GL 4.4 34 | enum ARB_query_buffer_object = "GL_ARB_query_buffer_object"; 35 | enum arbQueryBufferObjectDecls = 36 | q{ 37 | enum : uint { 38 | GL_QUERY_BUFFER = 0x9192, 39 | GL_QUERY_BUFFER_BARRIER_BIT = 0x00008000, 40 | GL_QUERY_BUFFER_BINDING = 0x9193, 41 | GL_QUERY_RESULT_NO_WAIT = 0x9194, 42 | }}; 43 | 44 | enum arbQueryBufferObjectLoader = makeLoader(ARB_query_buffer_object, "", "gl44"); 45 | static if(!usingContexts) enum arbQueryBufferObject = arbQueryBufferObjectDecls ~ arbQueryBufferObjectLoader; 46 | -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_r.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_r; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_robust_buffer_access_behavior <-- Core in GL 4.3 34 | enum ARB_robust_buffer_access_behavior = "GL_ARB_robust_buffer_access_behavior"; 35 | enum arbRobustBufferAccessBehaviorLoader = makeLoader(ARB_robust_buffer_access_behavior, "", "gl43"); 36 | static if(!usingContexts) enum arbRobustBufferAccessBehavior = arbRobustBufferAccessBehaviorLoader; 37 | 38 | // ARB_robustness 39 | enum ARB_robustness = "GL_ARB_robustness"; 40 | enum arbRobustnessDecls = 41 | q{ 42 | enum : uint 43 | { 44 | GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x00000004, 45 | GL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252, 46 | GL_GUILTY_CONTEXT_RESET_ARB = 0x8253, 47 | GL_INNOCENT_CONTEXT_RESET_ARB = 0x8254, 48 | GL_UNKNOWN_CONTEXT_RESET_ARB = 0x8255, 49 | GL_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256, 50 | GL_NO_RESET_NOTIFICATION_ARB = 0x8261, 51 | } 52 | extern(System) @nogc nothrow { 53 | alias da_glGetGraphicsResetStatusARB = GLenum function(); 54 | alias da_glGetnMapdvARB = void function(GLenum, GLenum, GLsizei, GLdouble*); 55 | alias da_glGetnMapfvARB = void function(GLenum, GLenum, GLsizei, GLfloat*); 56 | alias da_glGetnMapivARB = void function(GLenum, GLenum, GLsizei, GLint*); 57 | alias da_glGetnPixelMapfvARB = void function(GLenum, GLsizei, GLfloat*); 58 | alias da_glGetnPixelMapuivARB = void function(GLenum, GLsizei, GLuint*); 59 | alias da_glGetnPixelMapusvARB = void function(GLenum, GLsizei, GLushort*); 60 | alias da_glGetnPolygonStippleARB = void function(GLsizei, GLubyte*); 61 | alias da_glGetnColorTableARB = void function(GLenum, GLenum, GLenum, GLsizei, GLvoid*); 62 | alias da_glGetnConvolutionFilterARB = void function(GLenum, GLenum, GLenum, GLsizei, GLvoid*); 63 | alias da_glGetnSeparableFilterARB = void function(GLenum, GLenum, GLenum, GLsizei, GLvoid*, GLsizei, GLvoid*, GLvoid*); 64 | alias da_glGetnHistogramARB = void function(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid*); 65 | alias da_glGetnMinmaxARB = void function(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid*); 66 | alias da_glGetnTexImageARB = void function(GLenum, GLint, GLenum, GLenum, GLsizei, GLvoid*); 67 | alias da_glReadnPixelsARB = void function(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, GLvoid*); 68 | alias da_glGetnCompressedTexImageARB = void function(GLenum, GLint, GLsizei, GLvoid*); 69 | alias da_glGetnUniformfvARB = void function(GLuint, GLint, GLsizei, GLfloat*); 70 | alias da_glGetnUniformivARB = void function(GLuint, GLint, GLsizei, GLint*); 71 | alias da_glGetnUniformuivARB = void function(GLuint, GLint, GLsizei, GLuint*); 72 | alias da_glGetnUniformdvARB = void function(GLuint, GLint, GLsizei, GLdouble*); 73 | }}; 74 | 75 | enum arbRobustnessFuncs = 76 | q{ 77 | da_glGetGraphicsResetStatusARB glGetGraphicsResetStatusARB; 78 | da_glGetnMapdvARB glGetnMapdvARB; 79 | da_glGetnMapfvARB glGetnMapfvARB; 80 | da_glGetnMapivARB glGetnMapivARB; 81 | da_glGetnPixelMapfvARB glGetnPixelMapfvARB; 82 | da_glGetnPixelMapuivARB glGetnPixelMapuivARB; 83 | da_glGetnPixelMapusvARB glGetnPixelMapusvARB; 84 | da_glGetnPolygonStippleARB glGetnPolygonStippleARB; 85 | da_glGetnColorTableARB glGetnColorTableARB; 86 | da_glGetnConvolutionFilterARB glGetnConvolutionFilterARB; 87 | da_glGetnSeparableFilterARB glGetnSeparableFilterARB; 88 | da_glGetnHistogramARB glGetnHistogramARB; 89 | da_glGetnMinmaxARB glGetnMinmaxARB; 90 | da_glGetnTexImageARB glGetnTexImageARB; 91 | da_glReadnPixelsARB glReadnPixelsARB; 92 | da_glGetnCompressedTexImageARB glGetnCompressedTexImageARB; 93 | da_glGetnUniformfvARB glGetnUniformfvARB; 94 | da_glGetnUniformivARB glGetnUniformivARB; 95 | da_glGetnUniformuivARB glGetnUniformuivARB; 96 | da_glGetnUniformdvARB glGetnUniformdvARB; 97 | }; 98 | 99 | enum arbRobustnessLoaderImpl = 100 | q{ 101 | bindGLFunc(cast(void**)&glGetGraphicsResetStatusARB, "glGetGraphicsResetStatusARB"); 102 | bindGLFunc(cast(void**)&glGetnMapdvARB, "glGetnMapdvARB"); 103 | bindGLFunc(cast(void**)&glGetnMapfvARB, "glGetnMapfvARB"); 104 | bindGLFunc(cast(void**)&glGetnMapivARB, "glGetnMapivARB"); 105 | bindGLFunc(cast(void**)&glGetnPixelMapfvARB, "glGetnPixelMapfvARB"); 106 | bindGLFunc(cast(void**)&glGetnPixelMapuivARB, "glGetnPixelMapuivARB"); 107 | bindGLFunc(cast(void**)&glGetnPixelMapusvARB, "glGetnPixelMapusvARB"); 108 | bindGLFunc(cast(void**)&glGetnPolygonStippleARB, "glGetnPolygonStippleARB"); 109 | bindGLFunc(cast(void**)&glGetnColorTableARB, "glGetnColorTableARB"); 110 | bindGLFunc(cast(void**)&glGetnConvolutionFilterARB, "glGetnConvolutionFilterARB"); 111 | bindGLFunc(cast(void**)&glGetnSeparableFilterARB, "glGetnSeparableFilterARB"); 112 | bindGLFunc(cast(void**)&glGetnHistogramARB, "glGetnHistogramARB"); 113 | bindGLFunc(cast(void**)&glGetnMinmaxARB, "glGetnMinmaxARB"); 114 | bindGLFunc(cast(void**)&glGetnTexImageARB, "glGetnTexImageARB"); 115 | bindGLFunc(cast(void**)&glReadnPixelsARB, "glReadnPixelsARB"); 116 | bindGLFunc(cast(void**)&glGetnCompressedTexImageARB, "glGetnCompressedTexImageARB"); 117 | bindGLFunc(cast(void**)&glGetnCompressedTexImageARB, "glGetnCompressedTexImageARB"); 118 | bindGLFunc(cast(void**)&glGetnUniformfvARB, "glGetnUniformfvARB"); 119 | bindGLFunc(cast(void**)&glGetnUniformivARB, "glGetnUniformivARB"); 120 | bindGLFunc(cast(void**)&glGetnUniformuivARB, "glGetnUniformuivARB"); 121 | bindGLFunc(cast(void**)&glGetnUniformdvARB, "glGetnUniformdvARB"); 122 | }; 123 | 124 | enum arbRobustnessLoader = makeExtLoader(ARB_robustness, arbRobustnessLoaderImpl); 125 | static if(!usingContexts) enum arbRobustness = arbRobustnessDecls ~ arbRobustnessFuncs.makeGShared() ~ arbRobustnessLoader; 126 | 127 | // ARB_robustness_isolation 128 | enum ARB_robustness_isolation = "GL_ARB_robustness_isolation"; 129 | enum arbRobustnessIsolationLoader = makeExtLoader(ARB_robustness_isolation); 130 | static if(!usingContexts) enum arbRobustnessIsolation = arbRobustnessIsolationLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/arb_u.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.arb_u; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // ARB_uniform_buffer_object <-- Core in GL 3.1 34 | enum ARB_uniform_buffer_object = "GL_ARB_uniform_buffer_object"; 35 | enum arbUniformBufferObjectDecls = 36 | q{ 37 | enum : uint 38 | { 39 | GL_UNIFORM_BUFFER = 0x8A11, 40 | GL_UNIFORM_BUFFER_BINDING = 0x8A28, 41 | GL_UNIFORM_BUFFER_START = 0x8A29, 42 | GL_UNIFORM_BUFFER_SIZE = 0x8A2A, 43 | GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, 44 | GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, 45 | GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, 46 | GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, 47 | GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, 48 | GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, 49 | GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, 50 | GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32, 51 | GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, 52 | GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34, 53 | GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, 54 | GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36, 55 | GL_UNIFORM_TYPE = 0x8A37, 56 | GL_UNIFORM_SIZE = 0x8A38, 57 | GL_UNIFORM_NAME_LENGTH = 0x8A39, 58 | GL_UNIFORM_BLOCK_INDEX = 0x8A3A, 59 | GL_UNIFORM_OFFSET = 0x8A3B, 60 | GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, 61 | GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, 62 | GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E, 63 | GL_UNIFORM_BLOCK_BINDING = 0x8A3F, 64 | GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, 65 | GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, 66 | GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, 67 | GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, 68 | GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, 69 | GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45, 70 | GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46, 71 | GL_INVALID_INDEX = 0xFFFFFFFFu, 72 | } 73 | 74 | extern(System) @nogc nothrow { 75 | alias da_glGetUniformIndices = void function(GLuint, GLsizei, const(GLchar*)*, GLuint*); 76 | alias da_glGetActiveUniformsiv = void function(GLuint, GLsizei, const(GLuint)*, GLenum, GLint*); 77 | alias da_glGetActiveUniformName = void function(GLuint, GLuint, GLsizei, GLsizei*, GLchar*); 78 | alias da_glGetUniformBlockIndex = GLuint function(GLuint, const(GLchar)*); 79 | alias da_glGetActiveUniformBlockiv = void function(GLuint, GLuint, GLenum, GLint*); 80 | alias da_glGetActiveUniformBlockName = void function(GLuint, GLuint, GLsizei, GLsizei*, GLchar*); 81 | alias da_glUniformBlockBinding = void function(GLuint, GLuint, GLuint); 82 | }}; 83 | 84 | enum arbUniformBufferObjectFuncs = 85 | q{ 86 | da_glGetUniformIndices glGetUniformIndices; 87 | da_glGetActiveUniformsiv glGetActiveUniformsiv; 88 | da_glGetActiveUniformName glGetActiveUniformName; 89 | da_glGetUniformBlockIndex glGetUniformBlockIndex; 90 | da_glGetActiveUniformBlockiv glGetActiveUniformBlockiv; 91 | da_glGetActiveUniformBlockName glGetActiveUniformBlockName; 92 | da_glUniformBlockBinding glUniformBlockBinding; 93 | }; 94 | 95 | enum arbUniformBufferObjectLoaderImpl = 96 | q{ 97 | bindGLFunc(cast(void**)&glGetUniformIndices, "glGetUniformIndices"); 98 | bindGLFunc(cast(void**)&glGetActiveUniformsiv, "glGetActiveUniformsiv"); 99 | bindGLFunc(cast(void**)&glGetActiveUniformName, "glGetActiveUniformName"); 100 | bindGLFunc(cast(void**)&glGetUniformBlockIndex, "glGetUniformBlockIndex"); 101 | bindGLFunc(cast(void**)&glGetActiveUniformBlockiv, "glGetActiveUniformBlockiv"); 102 | bindGLFunc(cast(void**)&glGetActiveUniformBlockName, "glGetActiveUniformBlockName"); 103 | bindGLFunc(cast(void**)&glUniformBlockBinding, "glUniformBlockBinding"); 104 | }; 105 | 106 | enum arbUniformBufferObjectLoader = makeLoader(ARB_uniform_buffer_object, arbUniformBufferObjectLoaderImpl, "gl31"); 107 | static if(!usingContexts) enum arbUniformBufferObject = arbUniformBufferObjectDecls ~ arbUniformBufferObjectFuncs.makeGShared() ~ arbUniformBufferObjectLoader; 108 | -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_30.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_30; 29 | 30 | import derelict.opengl.extensions.arb_d, 31 | derelict.opengl.extensions.arb_f, 32 | derelict.opengl.extensions.arb_h, 33 | derelict.opengl.extensions.arb_m, 34 | derelict.opengl.extensions.arb_t, 35 | derelict.opengl.extensions.arb_v; 36 | 37 | enum corearb30Decls = arbDepthBufferFloatDecls 38 | ~ arbFramebufferObjectDecls 39 | ~ arbHalfFloatVertexDecls 40 | ~ arbMapBufferRangeDecls 41 | ~ arbTextureCompressionRGTCDecls 42 | ~ arbTextureRGDecls 43 | ~ arbVertexArrayObjectDecls; 44 | enum corearb30Funcs = arbFramebufferObjectFuncs 45 | ~ arbMapBufferRangeFuncs 46 | ~ arbVertexArrayObjectFuncs; 47 | version(DerelictGL3_Contexts) 48 | enum corearb30Loader = arbFramebufferObjectLoaderImpl 49 | ~ arbMapBufferRangeLoaderImpl 50 | ~ arbVertexArrayObjectLoaderImpl; 51 | else 52 | enum corearb30Loader = arbFramebufferObjectLoader 53 | ~ arbMapBufferRangeLoader 54 | ~ arbVertexArrayObjectLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_31.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_31; 29 | 30 | import derelict.opengl.extensions.arb_c, 31 | derelict.opengl.extensions.arb_u; 32 | 33 | enum corearb31Decls = arbCopyBufferDecls 34 | ~ arbUniformBufferObjectDecls; 35 | enum corearb31Funcs = arbCopyBufferFuncs 36 | ~ arbUniformBufferObjectFuncs; 37 | version(DerelictGL3_Contexts) 38 | enum corearb31Loader = arbCopyBufferLoaderImpl 39 | ~ arbUniformBufferObjectLoaderImpl; 40 | else 41 | enum corearb31Loader = arbCopyBufferLoader 42 | ~ arbUniformBufferObjectLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_32.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_32; 29 | 30 | import derelict.opengl.extensions.arb_d, 31 | derelict.opengl.extensions.arb_g, 32 | derelict.opengl.extensions.arb_p, 33 | derelict.opengl.extensions.arb_s, 34 | derelict.opengl.extensions.arb_t; 35 | 36 | enum corearb32Decls = arbDepthClampDecls 37 | ~ arbDrawElementsBaseVertexDecls 38 | ~ arbGeometryShader4Decls 39 | ~ arbProvokingVertexDecls 40 | ~ arbSeamlessCubeMapDecls 41 | ~ arbSyncDecls 42 | ~ arbTextureMultiSampleDecls; 43 | enum corearb32Funcs = arbDrawElementsBaseVertexFuncs 44 | ~ arbProvokingVertexFuncs 45 | ~ arbSyncFuncs 46 | ~ arbTextureMultiSampleFuncs; 47 | version(DerelictGL3_Contexts) 48 | enum corearb32Loader = arbDrawElementsBaseVertexLoaderImpl 49 | ~ arbProvokingVertexLoaderImpl 50 | ~ arbSyncLoaderImpl 51 | ~ arbTextureMultiSampleLoaderImpl; 52 | else 53 | enum corearb32Loader = arbDrawElementsBaseVertexLoader 54 | ~ arbProvokingVertexLoader 55 | ~ arbSyncLoader 56 | ~ arbTextureMultiSampleLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_33.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_33; 29 | 30 | import derelict.opengl.extensions.arb_b, 31 | derelict.opengl.extensions.arb_o, 32 | derelict.opengl.extensions.arb_s, 33 | derelict.opengl.extensions.arb_t, 34 | derelict.opengl.extensions.arb_v; 35 | 36 | enum corearb33Decls = arbBlendFuncExtendedDecls 37 | ~ arbOcclusionQuery2Decls 38 | ~ arbSamplerObjectsDecls 39 | ~ arbTextureSwizzleDecls 40 | ~ arbTimerQueryDecls 41 | ~ arbVertexType2101010RevDecls; 42 | enum corearb33Funcs = arbBlendFuncExtendedFuncs 43 | ~ arbSamplerObjectsFuncs 44 | ~ arbTimerQueryFuncs 45 | ~ arbVertexType2101010RevFuncs; 46 | version(DerelictGL3_Contexts) 47 | enum corearb33Loader = arbBlendFuncExtendedLoaderImpl 48 | ~ arbSamplerObjectsLoaderImpl 49 | ~ arbTimerQueryLoaderImpl 50 | ~ arbVertexType2101010RevLoaderImpl; 51 | else 52 | enum corearb33Loader = arbBlendFuncExtendedLoader 53 | ~ arbSamplerObjectsLoader 54 | ~ arbTimerQueryLoader 55 | ~ arbVertexType2101010RevLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_40.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_40; 29 | 30 | import derelict.opengl.extensions.arb_d, 31 | derelict.opengl.extensions.arb_g, 32 | derelict.opengl.extensions.arb_s, 33 | derelict.opengl.extensions.arb_t; 34 | 35 | enum corearb40Decls = arbDrawBuffersBlendDecls 36 | ~ arbDrawIndirectDecls 37 | ~ arbGPUShader5Decls 38 | ~ arbGPUShaderFP64Decls 39 | ~ arbSampleShadingDecls 40 | ~ arbShaderSubroutineDecls 41 | ~ arbTesselationShaderDecls 42 | ~ arbTransformFeedback2Decls 43 | ~ arbTransformFeedback3Decls; 44 | enum corearb40Funcs = arbDrawBuffersBlendFuncs 45 | ~ arbDrawIndirectFuncs 46 | ~ arbGPUShaderFP64Funcs 47 | ~ arbSampleShadingFuncs 48 | ~ arbShaderSubroutineFuncs 49 | ~ arbTesselationShaderFuncs 50 | ~ arbTransformFeedback2Funcs 51 | ~ arbTransformFeedback3Funcs; 52 | version(DerelictGL3_Contexts) 53 | enum corearb40Loader = arbDrawBuffersBlendLoaderImpl 54 | ~ arbDrawIndirectLoaderImpl 55 | ~ arbGPUShaderFP64LoaderImpl 56 | ~ arbSampleShadingLoaderImpl 57 | ~ arbShaderSubroutineLoaderImpl 58 | ~ arbTesselationShaderLoaderImpl 59 | ~ arbTransformFeedback2LoaderImpl 60 | ~ arbTransformFeedback3LoaderImpl; 61 | else 62 | enum corearb40Loader = arbDrawBuffersBlendLoader 63 | ~ arbDrawIndirectLoader 64 | ~ arbGPUShaderFP64Loader 65 | ~ arbSampleShadingLoader 66 | ~ arbShaderSubroutineLoader 67 | ~ arbTesselationShaderLoader 68 | ~ arbTransformFeedback2Loader 69 | ~ arbTransformFeedback3Loader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_41.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_41; 29 | 30 | import derelict.opengl.extensions.arb_e, 31 | derelict.opengl.extensions.arb_g, 32 | derelict.opengl.extensions.arb_s, 33 | derelict.opengl.extensions.arb_v; 34 | 35 | enum corearb41Decls = arbES2CompatibilityDecls 36 | ~ arbGetProgramBinaryDecls 37 | ~ arbSeparateShaderObjectsDecls 38 | ~ arbVertexAttrib64BitDecls 39 | ~ arbViewportArrayDecls; 40 | enum corearb41Funcs = arbES2CompatibilityFuncs 41 | ~ arbGetProgramBinaryFuncs 42 | ~ arbSeparateShaderObjectsFuncs 43 | ~ arbVertexAttrib64BitFuncs 44 | ~ arbViewportArrayFuncs; 45 | version(DerelictGL3_Contexts) 46 | enum corearb41Loader = arbES2CompatibilityLoaderImpl 47 | ~ arbGetProgramBinaryLoaderImpl 48 | ~ arbSeparateShaderObjectsLoaderImpl 49 | ~ arbVertexAttrib64BitLoaderImpl 50 | ~ arbViewportArrayLoaderImpl; 51 | else 52 | enum corearb41Loader = arbES2CompatibilityLoader 53 | ~ arbGetProgramBinaryLoader 54 | ~ arbSeparateShaderObjectsLoader 55 | ~ arbVertexAttrib64BitLoader 56 | ~ arbViewportArrayLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_42.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_42; 29 | 30 | import derelict.opengl.extensions.arb_b, 31 | derelict.opengl.extensions.arb_c, 32 | derelict.opengl.extensions.arb_i, 33 | derelict.opengl.extensions.arb_m, 34 | derelict.opengl.extensions.arb_s, 35 | derelict.opengl.extensions.arb_t; 36 | 37 | enum corearb42Decls = arbBaseInstanceDecls 38 | ~ arbCompressedTexturePixelStorageDecls 39 | ~ arbMapBufferAlignmentDecls 40 | ~ arbInternalFormatQueryDecls 41 | ~ arbShaderAtomicCountersDecls 42 | ~ arbShaderImageLoadStoreDecls 43 | ~ arbTextureStorageDecls 44 | ~ arbTransformFeedbackInstancedDecls ; 45 | enum corearb42Funcs = arbBaseInstanceFuncs 46 | ~ arbInternalFormatQueryFuncs 47 | ~ arbShaderAtomicCountersFuncs 48 | ~ arbShaderImageLoadStoreFuncs 49 | ~ arbTextureStorageFuncs 50 | ~ arbTransformFeedbackInstancedFuncs; 51 | version(DerelictGL3_Contexts) 52 | enum corearb42Loader = arbBaseInstanceLoaderImpl 53 | ~ arbInternalFormatQueryLoaderImpl 54 | ~ arbShaderAtomicCountersLoaderImpl 55 | ~ arbShaderImageLoadStoreLoaderImpl 56 | ~ arbTextureStorageLoaderImpl 57 | ~ arbTransformFeedbackInstancedLoaderImpl; 58 | else 59 | enum corearb42Loader = arbBaseInstanceLoader 60 | ~ arbInternalFormatQueryLoader 61 | ~ arbShaderAtomicCountersLoader 62 | ~ arbShaderImageLoadStoreLoader 63 | ~ arbTextureStorageLoader 64 | ~ arbTransformFeedbackInstancedLoader; 65 | -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_43.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_43; 29 | 30 | import derelict.opengl.extensions.arb_c, 31 | derelict.opengl.extensions.arb_d, 32 | derelict.opengl.extensions.arb_e, 33 | derelict.opengl.extensions.arb_f, 34 | derelict.opengl.extensions.arb_i, 35 | derelict.opengl.extensions.arb_m, 36 | derelict.opengl.extensions.arb_p, 37 | derelict.opengl.extensions.arb_s, 38 | derelict.opengl.extensions.arb_t, 39 | derelict.opengl.extensions.arb_v, 40 | derelict.opengl.extensions.khr; 41 | 42 | enum corearb43Decls = arbClearBufferObjectDecls 43 | ~ arbComputeShaderDecls 44 | ~ arbCopyImageDecls 45 | ~ arbDebugOutputDecls 46 | ~ arbES3CompatibilityDecls 47 | ~ arbExplicitUniformLocationDecls 48 | ~ arbFramebufferNoAttachmentsDecls 49 | ~ arbInternalFormatQuery2Decls 50 | ~ arbInvalidateSubdataDecls 51 | ~ arbMultiDrawIndirectDecls 52 | ~ arbProgramInterfaceQueryDecls 53 | ~ arbShaderStorageBufferObjectDecls 54 | ~ arbStencilTexturingDecls 55 | ~ arbTextureBufferRangeDecls 56 | ~ arbTextureStorageMultisampleDecls 57 | ~ arbTextureViewDecls 58 | ~ arbVertexAttribBindingDecls 59 | ~ khrDebugDecls; 60 | enum corearb43Funcs = arbClearBufferObjectFuncs 61 | ~ arbComputeShaderFuncs 62 | ~ arbCopyImageFuncs 63 | ~ arbDebugOutputFuncs 64 | ~ arbFramebufferNoAttachmentsFuncs 65 | ~ arbInternalFormatQuery2Funcs 66 | ~ arbInvalidateSubdataFuncs 67 | ~ arbMultiDrawIndirectFuncs 68 | ~ arbProgramInterfaceQueryFuncs 69 | ~ arbShaderStorageBufferObjectFuncs 70 | ~ arbTextureBufferRangeFuncs 71 | ~ arbTextureStorageMultisampleFuncs 72 | ~ arbTextureViewFuncs 73 | ~ arbVertexAttribBindingFuncs 74 | ~ khrDebugFuncs; 75 | version(DerelictGL3_Contexts) 76 | enum corearb43Loader = arbClearBufferObjectLoaderImpl 77 | ~ arbComputeShaderLoaderImpl 78 | ~ arbCopyImageLoaderImpl 79 | ~ arbDebugOutputLoaderImpl 80 | ~ arbFramebufferNoAttachmentsLoaderImpl 81 | ~ arbInternalFormatQuery2LoaderImpl 82 | ~ arbInvalidateSubdataLoaderImpl 83 | ~ arbMultiDrawIndirectLoaderImpl 84 | ~ arbProgramInterfaceQueryLoaderImpl 85 | ~ arbShaderStorageBufferObjectLoaderImpl 86 | ~ arbTextureBufferRangeLoaderImpl 87 | ~ arbTextureStorageMultisampleLoaderImpl 88 | ~ arbTextureViewLoaderImpl 89 | ~ arbVertexAttribBindingLoaderImpl 90 | ~ khrDebugLoaderImpl; 91 | else 92 | enum corearb43Loader = arbClearBufferObjectLoader 93 | ~ arbComputeShaderLoader 94 | ~ arbCopyImageLoader 95 | ~ arbDebugOutputLoader 96 | ~ arbFramebufferNoAttachmentsLoader 97 | ~ arbInternalFormatQuery2Loader 98 | ~ arbInvalidateSubdataLoader 99 | ~ arbMultiDrawIndirectLoader 100 | ~ arbProgramInterfaceQueryLoader 101 | ~ arbShaderStorageBufferObjectLoader 102 | ~ arbTextureBufferRangeLoader 103 | ~ arbTextureStorageMultisampleLoader 104 | ~ arbTextureViewLoader 105 | ~ arbVertexAttribBindingLoader 106 | ~ khrDebugLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_44.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_44; 29 | 30 | import derelict.opengl.extensions.arb_b, 31 | derelict.opengl.extensions.arb_c, 32 | derelict.opengl.extensions.arb_e, 33 | derelict.opengl.extensions.arb_m, 34 | derelict.opengl.extensions.arb_q, 35 | derelict.opengl.extensions.arb_t; 36 | 37 | enum corearb44Decls = arbBufferStorageDecls 38 | ~ arbClearTextureDecls 39 | ~ arbEnhancedLayoutsDecls 40 | ~ arbMultBindDecls 41 | ~ arbQueryBufferObjectDecls 42 | ~ arbTextureMirrorClampToEdgeDecls; 43 | enum corearb44Funcs = arbBufferStorageFuncs 44 | ~ arbClearTextureFuncs 45 | ~ arbMultBindFuncs; 46 | version(DerelictGL3_Contexts) 47 | enum corearb44Loader = arbBufferStorageLoaderImpl 48 | ~ arbClearTextureLoaderImpl 49 | ~ arbMultBindLoaderImpl; 50 | else 51 | enum corearb44Loader = arbBufferStorageLoader 52 | ~ arbClearTextureLoader 53 | ~ arbMultBindLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/core_45.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.core_45; 29 | 30 | import derelict.opengl.extensions.arb_c, 31 | derelict.opengl.extensions.arb_d, 32 | derelict.opengl.extensions.arb_e, 33 | derelict.opengl.extensions.arb_g, 34 | derelict.opengl.extensions.arb_t, 35 | derelict.opengl.extensions.khr; 36 | 37 | enum corearb45Decls = arbClipControlDecls 38 | ~ arbCullDistanceDecls 39 | ~ arbConditionalRenderInvertedDecls 40 | ~ arbDirectStateAccessDecls 41 | ~ arbES31CompatibilityDecls 42 | ~ arbGetTextureSubImageDecls 43 | ~ arbTextureBarrierDecls 44 | ~ khrContextFlushControlDecls 45 | ~ khrRobustnessDecls; 46 | enum corearb45Funcs = arbClipControlFuncs 47 | ~ arbDirectStateAccessFuncs 48 | ~ arbES31CompatibilityFuncs 49 | ~ arbGetTextureSubImageFuncs 50 | ~ arbTextureBarrierFuncs 51 | ~ khrRobustnessFuncs; 52 | version(DerelictGL3_Contexts) 53 | enum corearb45Loader = arbClipControlLoaderImpl 54 | ~ arbDirectStateAccessLoaderImpl 55 | ~ arbES31CompatibilityLoaderImpl 56 | ~ arbGetTextureSubImageLoaderImpl 57 | ~ arbTextureBarrierLoaderImpl 58 | ~ khrRobustnessLoaderImpl; 59 | else 60 | enum corearb45Loader = arbClipControlLoader 61 | ~ arbDirectStateAccessLoader 62 | ~ arbES31CompatibilityLoader 63 | ~ arbGetTextureSubImageLoader 64 | ~ arbTextureBarrierLoader 65 | ~ khrRobustnessLoader; -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/internal.d: -------------------------------------------------------------------------------- 1 | module derelict.opengl.extensions.internal; 2 | 3 | package: 4 | string makeGShared(string funcs) { return "__gshared{" ~ funcs ~ "}"; } 5 | 6 | version(DerelictGL3_Contexts) { 7 | string makeLoader(string name, string impl, string glVersion) 8 | { 9 | if(impl == "") { 10 | return 11 | `if(contextVersion < GLVersion.` ~ glVersion ~ `) 12 | setExtensionState("` ~ name ~ `", isExtensionSupported("` ~ name ~ `"));`; 13 | } 14 | else return 15 | `if(contextVersion >= GLVersion.` ~ glVersion ~ `|| isExtensionSupported("` ~ name ~ `")) { 16 | try {` 17 | ~ impl ~ 18 | `setExtensionState("` ~ name ~ `", true); 19 | } catch(Exception e) { 20 | if(contextVersion < GLVersion.`~ glVersion ~ `) 21 | setExtensionState("` ~ name ~ `", false); 22 | else throw e; 23 | } 24 | }`; 25 | } 26 | 27 | string makeExtLoader(string name, string impl = "") 28 | { 29 | if(impl == "") { 30 | return `setExtensionState("` ~ name ~ `", isExtensionSupported("` ~ name ~ `"));`; 31 | } 32 | else return 33 | `if(isExtensionSupported("` ~ name ~ `")) { 34 | try {` 35 | ~ impl ~ 36 | `setExtensionState("` ~ name ~ `", true); 37 | } catch(Exception e) { 38 | setExtensionState("` ~ name ~ `", false); 39 | } 40 | }`; 41 | } 42 | } 43 | else { 44 | string makeLoader(string name, string impl, string glVersion) 45 | { 46 | auto front = `struct ` ~ name ~ 47 | ` 48 | { 49 | import derelict.opengl.glloader; 50 | static this() 51 | { 52 | GLLoader.registerExtensionLoader("` ~ name ~ `", &load, GLVersion.` ~ glVersion ~`); 53 | } 54 | static bool load(ref GLLoader loader, bool doThrow) 55 | {`; 56 | 57 | if(impl == "") return front ~ 58 | `if(!doThrow) return loader.isExtensionSupported("` ~ name ~ `"); 59 | else return true; }}`; 60 | else return front ~ 61 | `if(!doThrow && !loader.isExtensionSupported("` ~ name ~ `")) return false; 62 | with(loader) try {` 63 | ~ impl ~ 64 | `} catch(Exception e) { 65 | if(doThrow) throw e; 66 | else return false; 67 | } 68 | return true; }}`; 69 | } 70 | 71 | string makeExtLoader(string name, string impl = "") 72 | { 73 | auto front = 74 | `struct ` ~ name ~ 75 | ` 76 | { 77 | import derelict.opengl.glloader; 78 | static this() 79 | { 80 | GLLoader.registerExtensionLoader("` ~ name ~ `", &load, GLVersion.none); 81 | } 82 | static bool load(ref GLLoader loader, bool doThrow) 83 | {`; 84 | 85 | if(impl == "") return front ~ 86 | `return loader.isExtensionSupported("` ~ name ~ `"); }}`; 87 | else return front ~ 88 | `if(!loader.isExtensionSupported("` ~ name ~ `")) return false; 89 | with(loader) try {` 90 | ~ impl ~ 91 | `} catch(Exception e) { 92 | if(doThrow) throw e; 93 | else return false; 94 | } 95 | return true; }}`; 96 | } 97 | } -------------------------------------------------------------------------------- /source/derelict/opengl/extensions/khr.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.extensions.khr; 29 | 30 | import derelict.opengl.types : usingContexts; 31 | import derelict.opengl.extensions.internal; 32 | 33 | // KHR_context_flush_control <-- Core in GL 4.5 34 | enum KHR_context_flush_control = "GL_KHR_context_flush_control"; 35 | enum khrContextFlushControlDecls = 36 | q{ 37 | enum : uint 38 | { 39 | GL_CONTEXT_RELEASE_BEHAVIOR = 0x82FB, 40 | GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x82FC, 41 | }}; 42 | 43 | enum khrContextFlushControlLoader = makeLoader(KHR_context_flush_control, "", "gl45"); 44 | static if(!usingContexts) enum khrContextFlushControl = khrContextFlushControlDecls ~ khrContextFlushControlLoader; 45 | 46 | // KHR_debug <-- Core in GL 4.3 47 | enum KHR_debug = "GL_KHR_debug"; 48 | enum khrDebugDecls = 49 | q{ 50 | enum : uint 51 | { 52 | GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242, 53 | GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, 54 | GL_DEBUG_CALLBACK_FUNCTION = 0x8244, 55 | GL_DEBUG_CALLBACK_USER_PARAM = 0x8245, 56 | GL_DEBUG_SOURCE_API = 0x8246, 57 | GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, 58 | GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, 59 | GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, 60 | GL_DEBUG_SOURCE_APPLICATION = 0x824A, 61 | GL_DEBUG_SOURCE_OTHER = 0x824B, 62 | GL_DEBUG_TYPE_ERROR = 0x824C, 63 | GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, 64 | GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, 65 | GL_DEBUG_TYPE_PORTABILITY = 0x824F, 66 | GL_DEBUG_TYPE_PERFORMANCE = 0x8250, 67 | GL_DEBUG_TYPE_OTHER = 0x8251, 68 | GL_DEBUG_TYPE_MARKER = 0x8268, 69 | GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, 70 | GL_DEBUG_TYPE_POP_GROUP = 0x826A, 71 | GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B, 72 | GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, 73 | GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, 74 | GL_BUFFER = 0x82E0, 75 | GL_SHADER = 0x82E1, 76 | GL_PROGRAM = 0x82E2, 77 | GL_QUERY = 0x82E3, 78 | GL_PROGRAM_PIPELINE = 0x82E4, 79 | GL_SAMPLER = 0x82E6, 80 | GL_DISPLAY_LIST = 0x82E7, 81 | GL_MAX_LABEL_LENGTH = 0x82E8, 82 | GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, 83 | GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, 84 | GL_DEBUG_LOGGED_MESSAGES = 0x9145, 85 | GL_DEBUG_SEVERITY_HIGH = 0x9146, 86 | GL_DEBUG_SEVERITY_MEDIUM = 0x9147, 87 | GL_DEBUG_SEVERITY_LOW = 0x9148, 88 | GL_DEBUG_OUTPUT = 0x92E0, 89 | GL_CONTEXT_FLAG_DEBUG_BIT = 0x00000002, 90 | } 91 | extern(System) nothrow alias GLDEBUGPROC = void function(GLenum,GLenum,GLuint,GLenum,GLsizei,const(GLchar)*,GLvoid*); 92 | extern(System) @nogc nothrow { 93 | alias da_glDebugMessageControl = void function(GLenum,GLenum,GLenum,GLsizei,const(GLuint*),GLboolean); 94 | alias da_glDebugMessageInsert = void function(GLenum,GLenum,GLuint,GLenum,GLsizei,const(GLchar)*); 95 | alias da_glDebugMessageCallback = void function(GLDEBUGPROC,const(void)*); 96 | alias da_glGetDebugMessageLog = GLuint function(GLuint,GLsizei,GLenum*,GLenum*,GLuint*,GLenum*,GLsizei*,GLchar*); 97 | alias da_glPushDebugGroup = void function(GLenum,GLuint,GLsizei,const(GLchar)*); 98 | alias da_glPopDebugGroup = void function(); 99 | alias da_glObjectLabel = void function(GLenum,GLuint,GLsizei,const(GLchar)*); 100 | alias da_glGetObjectLabel = void function(GLenum,GLuint,GLsizei,GLsizei*,GLchar*); 101 | alias da_glObjectPtrLabel = void function(const(void)*,GLsizei,const(GLchar)*); 102 | alias da_glGetObjectPtrLabel = void function(const(void)*,GLsizei,GLsizei*,GLchar*); 103 | }}; 104 | 105 | enum khrDebugFuncs = 106 | q{ 107 | da_glDebugMessageControl glDebugMessageControl; 108 | da_glDebugMessageInsert glDebugMessageInsert; 109 | da_glDebugMessageCallback glDebugMessageCallback; 110 | da_glGetDebugMessageLog glGetDebugMessageLog; 111 | da_glPushDebugGroup glPushDebugGroup; 112 | da_glPopDebugGroup glPopDebugGroup; 113 | da_glObjectLabel glObjectLabel; 114 | da_glGetObjectLabel glGetObjectLabel; 115 | da_glObjectPtrLabel glObjectPtrLabel; 116 | da_glGetObjectPtrLabel glGetObjectPtrLabel; 117 | }; 118 | 119 | enum khrDebugLoaderImpl = 120 | q{ 121 | bindGLFunc(cast(void**)&glDebugMessageControl, "glDebugMessageControl"); 122 | bindGLFunc(cast(void**)&glDebugMessageInsert, "glDebugMessageInsert"); 123 | bindGLFunc(cast(void**)&glDebugMessageCallback, "glDebugMessageCallback"); 124 | bindGLFunc(cast(void**)&glGetDebugMessageLog, "glGetDebugMessageLog"); 125 | bindGLFunc(cast(void**)&glPushDebugGroup, "glPushDebugGroup"); 126 | bindGLFunc(cast(void**)&glPopDebugGroup, "glPopDebugGroup"); 127 | bindGLFunc(cast(void**)&glObjectLabel, "glObjectLabel"); 128 | bindGLFunc(cast(void**)&glGetObjectLabel, "glGetObjectLabel"); 129 | bindGLFunc(cast(void**)&glObjectPtrLabel, "glObjectPtrLabel"); 130 | bindGLFunc(cast(void**)&glGetObjectPtrLabel, "glGetObjectPtrLabel"); 131 | }; 132 | 133 | enum khrDebugLoader = makeLoader(KHR_debug, khrDebugLoaderImpl, "gl43"); 134 | static if(!usingContexts) enum khrDebug = khrDebugDecls ~ khrDebugFuncs.makeGShared() ~ khrDebugLoader; 135 | 136 | // KHR_no_error 137 | enum KHR_no_error = "GL_KHR_no_error"; 138 | enum khrNoErrorDecls = `enum uint GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR = 0x00000008;`; 139 | enum khrNoErrorLoader = makeExtLoader(KHR_no_error); 140 | static if(!usingContexts) enum khrNoError = khrNoErrorDecls ~ khrNoErrorLoader; 141 | 142 | // KHR_robustness <-- Core in GL 4.5 143 | enum KHR_robustness = "GL_KHR_robustness"; 144 | enum khrRobustnessDecls = 145 | q{ 146 | enum : uint 147 | { 148 | GL_GUILTY_CONTEXT_RESET = 0x8253, 149 | GL_INNOCENT_CONTEXT_RESET = 0x8254, 150 | GL_UNKNOWN_CONTEXT_RESET = 0x8255, 151 | GL_RESET_NOTIFICATION_STRATEGY = 0x8256, 152 | GL_LOSE_CONTEXT_ON_RESET = 0x8252, 153 | GL_NO_RESET_NOTIFICATION = 0x8261, 154 | GL_CONTEXT_LOST = 0x0507, 155 | GL_CONTEXT_ROBUST_ACCESS = 0x90F3, 156 | } 157 | extern(System) @nogc nothrow 158 | { 159 | alias da_glGetGraphicsResetStatus = GLenum function(); 160 | alias da_glReadnPixels = void function(GLint,GLint,GLsizei,GLsizei,GLenum,GLenum,GLsizei,void*); 161 | alias da_glGetnUniformfv = void function(GLuint,GLint,GLsizei,GLfloat*); 162 | alias da_glGetnUniformiv = void function(GLuint,GLint,GLsizei,GLint*); 163 | alias da_glGetnUniformuiv = void function(GLuint,GLint,GLsizei,GLuint*); 164 | }}; 165 | 166 | enum khrRobustnessFuncs = 167 | q{ 168 | da_glGetGraphicsResetStatus glGetGraphicsResetStatus; 169 | da_glReadnPixels glReadnPixels; 170 | da_glGetnUniformfv glGetnUniformfv; 171 | da_glGetnUniformiv glGetnUniformiv; 172 | da_glGetnUniformuiv glGetnUniformuiv; 173 | }; 174 | 175 | enum khrRobustnessLoaderImpl = 176 | q{ 177 | bindGLFunc(cast(void**)&glGetGraphicsResetStatus, "glGetGraphicsResetStatus"); 178 | bindGLFunc(cast(void**)&glReadnPixels, "glReadnPixels"); 179 | bindGLFunc(cast(void**)&glGetnUniformfv, "glGetnUniformfv"); 180 | bindGLFunc(cast(void**)&glGetnUniformiv, "glGetnUniformiv"); 181 | bindGLFunc(cast(void**)&glGetnUniformuiv, "glGetnUniformuiv"); 182 | }; 183 | 184 | enum khrRobustnessLoader = makeLoader(KHR_robustness, khrRobustnessLoaderImpl, "gl45"); 185 | static if(!usingContexts) enum khrRobustness = khrRobustnessDecls ~ khrRobustnessFuncs.makeGShared() ~ khrRobustnessLoader; 186 | 187 | // KHR_texture_compression_astc_hdr 188 | enum KHR_texture_compression_astc_hdr = "GL_KHR_texture_compression_astc_hdr"; 189 | enum khrTextureCompressionASTCHDRDecls = 190 | q{ 191 | enum : uint 192 | { 193 | GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0, 194 | GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1, 195 | GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2, 196 | GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3, 197 | GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4, 198 | GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5, 199 | GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6, 200 | GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7, 201 | GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8, 202 | GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9, 203 | GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA, 204 | GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB, 205 | GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC, 206 | GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD, 207 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0, 208 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1, 209 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2, 210 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3, 211 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4, 212 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5, 213 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6, 214 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7, 215 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8, 216 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9, 217 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA, 218 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB, 219 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC, 220 | GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD, 221 | }}; 222 | 223 | enum khrTextureCompressionASTCHDRLoader = makeExtLoader(KHR_texture_compression_astc_hdr); 224 | static if(!usingContexts) enum khrTextureCompressionASTCHDR = khrTextureCompressionASTCHDRDecls ~ khrTextureCompressionASTCHDRLoader; 225 | 226 | // KHR_texture_compression_astc_ldr 227 | enum KHR_texture_compression_astc_ldr = "GL_KHR_texture_compression_astc_ldr"; 228 | enum khrTextureCompressionASTCLDRLoader = makeExtLoader(KHR_texture_compression_astc_ldr); 229 | static if(!usingContexts) enum khrTextureCompressionASTCLDR = khrTextureCompressionASTCLDRLoader; 230 | 231 | // KHR_texture_compression_astc_sliced_3d 232 | enum KHR_texture_compression_astc_sliced_3d = "GL_KHR_texture_compression_astc_sliced_3d"; 233 | enum khrTextureCompressionASTCSliced3DLoader = makeExtLoader(KHR_texture_compression_astc_sliced_3d); 234 | static if(!usingContexts) enum khrTextureCompressionASTCSliced3D = khrTextureCompressionASTCSliced3DLoader; 235 | -------------------------------------------------------------------------------- /source/derelict/opengl/gl.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.gl; 29 | 30 | import std.array; 31 | import derelict.util.loader, 32 | derelict.util.system; 33 | 34 | import derelict.opengl.glloader, 35 | derelict.opengl.types : GLVersion, usingContexts; 36 | 37 | final class DerelictGL3Loader : SharedLibLoader 38 | { 39 | this() { super(libNames); } 40 | 41 | static if(!usingContexts) { 42 | GLLoader glLoader; 43 | alias glLoader this; 44 | 45 | GLVersion reload() { return glLoader.loadExtra(); } 46 | } 47 | 48 | protected: 49 | override void loadSymbols() 50 | { 51 | static if(!usingContexts) glLoader.loadBase(); 52 | } 53 | } 54 | 55 | __gshared DerelictGL3Loader DerelictGL3; 56 | 57 | shared static this() 58 | { 59 | DerelictGL3 = new DerelictGL3Loader; 60 | } 61 | 62 | private: 63 | static if(Derelict_OS_Android || Derelict_OS_iOS) { 64 | // Android and iOS do not support OpenGL3; use DerelictOpenGLES. 65 | static assert(false, "OpenGL is not supported on Android or iOS; use OpenGLES (DerelictGLES) instead"); 66 | } else static if(Derelict_OS_Windows) { 67 | private enum libNames = "opengl32.dll"; 68 | } else static if(Derelict_OS_Mac) { 69 | private enum libNames = "../Frameworks/OpenGL.framework/OpenGL, /Library/Frameworks/OpenGL.framework/OpenGL, /System/Library/Frameworks/OpenGL.framework/OpenGL"; 70 | } else static if(Derelict_OS_Posix) { 71 | private enum libNames = "libGL.so.1,libGL.so"; 72 | } else 73 | static assert(0, "Need to implement OpenGL libNames for this operating system."); 74 | 75 | -------------------------------------------------------------------------------- /source/derelict/opengl/glloader.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.glloader; 29 | 30 | import std.array; 31 | import derelict.util.system; 32 | import derelict.opengl.gl, 33 | derelict.opengl.types : GLVersion, usingContexts; 34 | 35 | private alias ExtLoaderFunc = bool function(ref GLLoader loader, bool doThrow); 36 | private struct ExtLoader 37 | { 38 | string name; 39 | ExtLoaderFunc load; 40 | } 41 | 42 | struct GLLoader 43 | { 44 | static if(!usingContexts) { 45 | private static ExtLoader[][int] _extLoaders; 46 | static void registerExtensionLoader(string name, ExtLoaderFunc loader, GLVersion glVersion) 47 | { 48 | ExtLoader[] loaders; 49 | if(auto parr = (glVersion in _extLoaders)) 50 | loaders = *parr; 51 | loaders ~= ExtLoader(name, loader); 52 | _extLoaders[glVersion] = loaders; 53 | } 54 | 55 | void loadExtensionSet(int glVersion, bool doThrow) 56 | { 57 | ExtLoader[] loaders; 58 | if(auto parr = (glVersion in _extLoaders)) 59 | loaders = *parr; 60 | else return; 61 | 62 | foreach(ref loader; loaders) { 63 | if(!isExtensionLoaded(loader.name)) { 64 | auto ret = loader.load(this, doThrow); 65 | 66 | // Only set the extension state to true if really 67 | // loading as an extension and not as part of the 68 | // core. doThrow will be false in the former case. 69 | if(!doThrow) _extState[loader.name] = ret; 70 | } 71 | } 72 | } 73 | } 74 | 75 | this(GLVersion delegate() base, GLVersion delegate() extra) 76 | { 77 | _baseLoader = base; 78 | _extraLoader = extra; 79 | } 80 | 81 | void loadBase() 82 | { 83 | _loadedVersion = _baseLoader(); 84 | 85 | if(!getString) 86 | DerelictGL3.bindFunc(cast(void**)&getString, "glGetString"); 87 | if(!getIntegerv) 88 | DerelictGL3.bindFunc(cast(void**)&getIntegerv, "glGetIntegerv"); 89 | if(!getCurrentContext) 90 | DerelictGL3.bindFunc(cast(void**)&getCurrentContext, getCurrentContextName); 91 | static if(!Derelict_OS_Mac) { 92 | if(!getProcAddress) 93 | DerelictGL3.bindFunc(cast(void**)&getProcAddress, getProcAddressName); 94 | } 95 | } 96 | 97 | GLVersion loadExtra() 98 | { 99 | import std.string : format; 100 | import derelict.util.exception : DerelictException; 101 | 102 | // Make sure a context is active, otherwise this could be meaningless. 103 | if(!getCurrentContext()) 104 | throw new DerelictException("DerelictGL3.reload failure: An OpenGL context is not currently active."); 105 | 106 | _contextVersion = getContextVersion(); 107 | 108 | if(_contextVersion >= GLVersion.gl30) { 109 | bindGLFunc(cast(void**)&_getStringi, "glGetStringi"); 110 | initExtCache(); 111 | } 112 | 113 | _loadedVersion = _extraLoader(); 114 | 115 | static if(!usingContexts) { 116 | int[] versions = [ 117 | GLVersion.gl30, GLVersion.gl31, GLVersion.gl32, GLVersion.gl33, 118 | GLVersion.gl40, GLVersion.gl41, GLVersion.gl42, GLVersion.gl43, 119 | GLVersion.gl44, GLVersion.gl45 120 | ]; 121 | 122 | foreach(ver; versions) { 123 | if(ver > loadedVersion) 124 | loadExtensionSet(ver, false); 125 | } 126 | loadExtensionSet(GLVersion.none, false); 127 | } 128 | 129 | return _loadedVersion; 130 | } 131 | 132 | bool isExtensionLoaded(string name) 133 | { 134 | if(auto state = (name in _extState)) return *state; 135 | else return false; 136 | } 137 | 138 | bool isExtensionSupported(string name) 139 | { 140 | import core.stdc.string : strcmp, strstr; 141 | 142 | // With a modern context, use the modern approach. 143 | if(_contextVersion >= GLVersion.gl30) { 144 | foreach(extname; _extCache.data) { 145 | if(extname && strcmp(extname, name.ptr) == 0) 146 | return true; 147 | } 148 | return false; 149 | } 150 | // Otherwise, use the classic approach. 151 | else { 152 | auto extstr = getString(glExtensions); 153 | // TODO Throw an exception here? Perhaps a 'NoExtensionStringException'. 154 | if(!extstr) return false; 155 | 156 | auto res = strstr(extstr, name.ptr); 157 | while(res) { 158 | /* It's possible that the extension name is actually a substring of 159 | another extension. If not, then the character following the name in 160 | the extension string should be a space (or possibly the null character). 161 | */ 162 | if(res[name.length] == ' ' || res[name.length] == '\0') 163 | return true; 164 | res = strstr(res + name.length, name.ptr); 165 | } 166 | return false; 167 | } 168 | } 169 | 170 | void setExtensionState(string name, bool state) 171 | { 172 | _extState[name] = state; 173 | } 174 | 175 | void bindGLFunc(void** ptr, string symName) 176 | { 177 | static if(Derelict_OS_Mac) { 178 | return DerelictGL3.bindFunc(ptr, symName); 179 | } 180 | else { 181 | import derelict.util.exception : SymbolLoadException; 182 | 183 | auto sym = getProcAddress(symName.ptr); 184 | if(!sym) 185 | throw new SymbolLoadException("Failed to load OpenGL symbol [" ~ symName ~ "]"); 186 | *ptr = sym; 187 | } 188 | } 189 | 190 | @property @nogc nothrow { 191 | GLVersion contextVersion() { return _contextVersion; } 192 | GLVersion loadedVersion() { return _loadedVersion; } 193 | } 194 | 195 | private: 196 | GLVersion delegate() _baseLoader; 197 | GLVersion delegate() _extraLoader; 198 | da_getStringi _getStringi; 199 | Appender!(const(char)*[]) _extCache; 200 | bool[string] _extState; 201 | GLVersion _contextVersion; 202 | GLVersion _loadedVersion; 203 | 204 | GLVersion getContextVersion() 205 | { 206 | /* glGetString(GL_VERSION) is guaranteed to return a constant string 207 | of the format "[major].[minor].[build] xxxx", where xxxx is vendor-specific 208 | information. Here, I'm pulling two characters out of the string, the major 209 | and minor version numbers. */ 210 | auto verstr = getString(glVersion); 211 | char major = *verstr; 212 | char minor = *(verstr + 2); 213 | 214 | switch(major) { 215 | case '4': 216 | if(minor == '5') return GLVersion.gl45; 217 | else if(minor == '4') return GLVersion.gl44; 218 | else if(minor == '3') return GLVersion.gl43; 219 | else if(minor == '2') return GLVersion.gl42; 220 | else if(minor == '1') return GLVersion.gl41; 221 | else if(minor == '0') return GLVersion.gl40; 222 | 223 | /* No default condition here, since it's possible for new 224 | minor versions of the 4.x series to be released before 225 | support is added to Derelict. That case is handled outside 226 | of the switch. When no more 4.x versions are released, this 227 | should be changed to return GL40 by default. */ 228 | break; 229 | 230 | case '3': 231 | if(minor == '3') return GLVersion.gl33; 232 | else if(minor == '2') return GLVersion.gl32; 233 | else if(minor == '1') return GLVersion.gl31; 234 | else return GLVersion.gl30; 235 | 236 | case '2': 237 | if(minor == '1') return GLVersion.gl21; 238 | else return GLVersion.gl20; 239 | 240 | case '1': 241 | if(minor == '5') return GLVersion.gl15; 242 | else if(minor == '4') return GLVersion.gl14; 243 | else if(minor == '3') return GLVersion.gl13; 244 | else if(minor == '2') return GLVersion.gl12; 245 | else return GLVersion.gl11; 246 | 247 | default: 248 | /* glGetString(GL_VERSION) is guaranteed to return a result 249 | of a specific format, so if this point is reached it is 250 | going to be because a major version higher than what Derelict 251 | supports was encountered. That case is handled outside the 252 | switch. */ 253 | break; 254 | } 255 | 256 | /* It's highly likely at this point that the version is higher than 257 | what Derelict supports, so return the highest supported version. */ 258 | return GLVersion.highestSupported; 259 | } 260 | 261 | void initExtCache() 262 | { 263 | /* The modern style of using glStringi to check for extensions 264 | results in a high number of calls when testing for numerous 265 | extensions. This can cause extreme slowdowns in some cases, 266 | such as when using GLSL-Debugger. The extension cache solves 267 | that problem. 268 | */ 269 | int count; 270 | getIntegerv(glNumExtensions, &count); 271 | 272 | _extCache.shrinkTo(0); 273 | _extCache.reserve(count); 274 | 275 | const(char)* extname; 276 | for(int i=0; i= GLVersion.gl30 && !declDep) mixin(gl30Decls); 87 | else static if(core >= GLVersion.gl30) mixin(gl30_depDecls); 88 | static if(core >= GLVersion.gl31) mixin(gl31Decls); 89 | static if(core >= GLVersion.gl32) mixin(gl32Decls); 90 | static if(core >= GLVersion.gl33) mixin(gl33Decls); 91 | static if(core >= GLVersion.gl40) mixin(gl40Decls); 92 | static if(core >= GLVersion.gl41) mixin(gl41Decls); 93 | static if(core >= GLVersion.gl42) mixin(gl42Decls); 94 | static if(core >= GLVersion.gl43) mixin(gl43Decls); 95 | static if(core >= GLVersion.gl44) mixin(gl44Decls); 96 | static if(core >= GLVersion.gl45) mixin(gl45Decls); 97 | } 98 | 99 | mixin template glFuncs(GLVersion core, bool loadDep = false) 100 | { 101 | static if(!loadDep) mixin(gl2Funcs); 102 | else mixin(gl2_depFuncs); 103 | static if(core >= GLVersion.gl30) mixin(gl30Funcs); 104 | static if(core >= GLVersion.gl31) mixin(gl31Funcs); 105 | static if(core >= GLVersion.gl32) mixin(gl32Funcs); 106 | static if(core >= GLVersion.gl33) mixin(gl33Funcs); 107 | static if(core >= GLVersion.gl40) mixin(gl40Funcs); 108 | static if(core >= GLVersion.gl41) mixin(gl41Funcs); 109 | static if(core >= GLVersion.gl42) mixin(gl42Funcs); 110 | static if(core >= GLVersion.gl43) mixin(gl43Funcs); 111 | static if(core >= GLVersion.gl44) mixin(gl44Funcs); 112 | static if(core >= GLVersion.gl45) mixin(gl45Funcs); 113 | } 114 | 115 | enum glLoaderDecls = 116 | q{ 117 | version(DerelictGL3_Contexts) alias theLoader = _loader; 118 | else alias theLoader = DerelictGL3; 119 | GLVersion glVer = theLoader.loadedVersion; 120 | GLVersion maxVer = theLoader.contextVersion; 121 | }; 122 | 123 | mixin template glLoaders(GLVersion core, bool loadDep = false) 124 | { 125 | version(DerelictGL3_Contexts) { 126 | private GLLoader _loader; 127 | GLLoader loader() { return _loader; } 128 | alias loader this; 129 | GLVersion load() 130 | { 131 | _loader = GLLoader(&loadBaseGL, &loadExtraGL); 132 | _loader.loadBase(); 133 | _loader.loadExtra(); 134 | return _loader.loadedVersion; 135 | } 136 | } 137 | else { 138 | struct SetLoader { 139 | import std.functional : toDelegate; 140 | import derelict.opengl.glloader; 141 | static this() 142 | { 143 | auto baseDg = toDelegate(&loadBaseGL); 144 | auto extraDg = toDelegate(&loadExtraGL); 145 | DerelictGL3.glLoader = GLLoader(baseDg, extraDg); 146 | } 147 | } 148 | 149 | static if(core >= GLVersion.gl30) mixin(corearb30Loader); 150 | static if(core >= GLVersion.gl31) mixin(corearb31Loader); 151 | static if(core >= GLVersion.gl32) mixin(corearb32Loader); 152 | static if(core >= GLVersion.gl33) mixin(corearb33Loader); 153 | static if(core >= GLVersion.gl40) mixin(corearb40Loader); 154 | static if(core >= GLVersion.gl41) mixin(corearb41Loader); 155 | static if(core >= GLVersion.gl42) mixin(corearb42Loader); 156 | static if(core >= GLVersion.gl43) mixin(corearb43Loader); 157 | static if(core >= GLVersion.gl44) mixin(corearb44Loader); 158 | static if(core >= GLVersion.gl45) mixin(corearb45Loader); 159 | } 160 | 161 | private GLVersion loadBaseGL() 162 | { 163 | with(DerelictGL3) { 164 | static if(!loadDep) mixin(baseLoader); 165 | else mixin(base_depLoader); 166 | } 167 | return GLVersion.gl11; 168 | } 169 | 170 | private GLVersion loadExtraGL() 171 | { 172 | mixin(glLoaderDecls); 173 | with(theLoader) { 174 | static if(!loadDep) mixin(gl2Loader); 175 | else mixin(gl2_depLoader); 176 | 177 | static if(core >= GLVersion.gl30) mixin(gl30Loader); 178 | static if(core >= GLVersion.gl31) mixin(gl31Loader); 179 | static if(core >= GLVersion.gl32) mixin(gl32Loader); 180 | static if(core >= GLVersion.gl33) mixin(gl33Loader); 181 | static if(core >= GLVersion.gl40) mixin(gl40Loader); 182 | static if(core >= GLVersion.gl41) mixin(gl41Loader); 183 | static if(core >= GLVersion.gl42) mixin(gl42Loader); 184 | static if(core >= GLVersion.gl43) mixin(gl43Loader); 185 | static if(core >= GLVersion.gl44) mixin(gl44Loader); 186 | static if(core >= GLVersion.gl45) mixin(gl45Loader); 187 | } 188 | 189 | static if(is(typeof(loadExtensions()))) loadExtensions(); 190 | return glVer; 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /source/derelict/opengl/package.d: -------------------------------------------------------------------------------- 1 | module derelict.opengl; 2 | 3 | public 4 | import derelict.opengl.gl, 5 | derelict.opengl.impl, 6 | derelict.opengl.types; -------------------------------------------------------------------------------- /source/derelict/opengl/types.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.types; 29 | 30 | // Types defined by the core versions 31 | alias GLenum = uint; 32 | alias GLvoid = void; 33 | alias GLboolean = ubyte; 34 | alias GLbitfield = uint; 35 | alias GLchar = char; 36 | alias GLbyte = byte; 37 | alias GLshort = short; 38 | alias GLint = int; 39 | alias GLsizei = int; 40 | alias GLubyte = ubyte; 41 | alias GLushort = ushort; 42 | alias GLuint = uint; 43 | alias GLhalf = ushort; 44 | alias GLfloat = float; 45 | alias GLclampf = float; 46 | alias GLdouble = double; 47 | alias GLclampd = double; 48 | alias GLintptr = ptrdiff_t; 49 | alias GLsizeiptr = ptrdiff_t; 50 | alias GLint64 = long; 51 | alias GLuint64 = ulong; 52 | alias GLhandle = uint; 53 | 54 | // Types defined in various extensions (declared here to avoid repetition) 55 | alias GLint64EXT = GLint64; 56 | alias GLuint64EXT = GLuint64; 57 | alias GLintptrARB = GLintptr; 58 | alias GLsizeiptrARB = GLsizeiptr; 59 | alias GLcharARB = GLchar; 60 | alias GLhandleARB = GLhandle; 61 | alias GLhalfARB = GLhalf; 62 | alias GLhalfNV = GLhalf; 63 | 64 | // The following are Derelict types, not from OpenGL 65 | enum GLVersion { 66 | none, 67 | gl11 = 11, 68 | gl12 = 12, 69 | gl13 = 13, 70 | gl14 = 14, 71 | gl15 = 15, 72 | gl20 = 20, 73 | gl21 = 21, 74 | gl30 = 30, 75 | gl31 = 31, 76 | gl32 = 32, 77 | gl33 = 33, 78 | gl40 = 40, 79 | gl41 = 41, 80 | gl42 = 42, 81 | gl43 = 43, 82 | gl44 = 44, 83 | gl45 = 45, 84 | highestSupported = gl45, 85 | } 86 | 87 | version(DerelictGL3_Contexts) 88 | enum usingContexts = true; 89 | else 90 | enum usingContexts = false; -------------------------------------------------------------------------------- /source/derelict/opengl/versions/gl1x.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.versions.gl1x; 29 | 30 | import derelict.opengl.types, 31 | derelict.opengl.versions.base; 32 | 33 | enum _gl1Decls = 34 | q{ 35 | enum : uint 36 | { 37 | // OpenGL 1.2 38 | GL_UNSIGNED_BYTE_3_3_2 = 0x8032, 39 | GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, 40 | GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, 41 | GL_UNSIGNED_INT_8_8_8_8 = 0x8035, 42 | GL_UNSIGNED_INT_10_10_10_2 = 0x8036, 43 | GL_TEXTURE_BINDING_3D = 0x806A, 44 | GL_PACK_SKIP_IMAGES = 0x806B, 45 | GL_PACK_IMAGE_HEIGHT = 0x806C, 46 | GL_UNPACK_SKIP_IMAGES = 0x806D, 47 | GL_UNPACK_IMAGE_HEIGHT = 0x806E, 48 | GL_TEXTURE_3D = 0x806F, 49 | GL_PROXY_TEXTURE_3D = 0x8070, 50 | GL_TEXTURE_DEPTH = 0x8071, 51 | GL_TEXTURE_WRAP_R = 0x8072, 52 | GL_MAX_3D_TEXTURE_SIZE = 0x8073, 53 | GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362, 54 | GL_UNSIGNED_SHORT_5_6_5 = 0x8363, 55 | GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364, 56 | GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365, 57 | GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366, 58 | GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367, 59 | GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368, 60 | GL_BGR = 0x80E0, 61 | GL_BGRA = 0x80E1, 62 | GL_MAX_ELEMENTS_VERTICES = 0x80E8, 63 | GL_MAX_ELEMENTS_INDICES = 0x80E9, 64 | GL_CLAMP_TO_EDGE = 0x812F, 65 | GL_TEXTURE_MIN_LOD = 0x813A, 66 | GL_TEXTURE_MAX_LOD = 0x813B, 67 | GL_TEXTURE_BASE_LEVEL = 0x813C, 68 | GL_TEXTURE_MAX_LEVEL = 0x813D, 69 | GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12, 70 | GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13, 71 | GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22, 72 | GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23, 73 | GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, 74 | 75 | // OpenGL 1.3 76 | GL_TEXTURE0 = 0x84C0, 77 | GL_TEXTURE1 = 0x84C1, 78 | GL_TEXTURE2 = 0x84C2, 79 | GL_TEXTURE3 = 0x84C3, 80 | GL_TEXTURE4 = 0x84C4, 81 | GL_TEXTURE5 = 0x84C5, 82 | GL_TEXTURE6 = 0x84C6, 83 | GL_TEXTURE7 = 0x84C7, 84 | GL_TEXTURE8 = 0x84C8, 85 | GL_TEXTURE9 = 0x84C9, 86 | GL_TEXTURE10 = 0x84CA, 87 | GL_TEXTURE11 = 0x84CB, 88 | GL_TEXTURE12 = 0x84CC, 89 | GL_TEXTURE13 = 0x84CD, 90 | GL_TEXTURE14 = 0x84CE, 91 | GL_TEXTURE15 = 0x84CF, 92 | GL_TEXTURE16 = 0x84D0, 93 | GL_TEXTURE17 = 0x84D1, 94 | GL_TEXTURE18 = 0x84D2, 95 | GL_TEXTURE19 = 0x84D3, 96 | GL_TEXTURE20 = 0x84D4, 97 | GL_TEXTURE21 = 0x84D5, 98 | GL_TEXTURE22 = 0x84D6, 99 | GL_TEXTURE23 = 0x84D7, 100 | GL_TEXTURE24 = 0x84D8, 101 | GL_TEXTURE25 = 0x84D9, 102 | GL_TEXTURE26 = 0x84DA, 103 | GL_TEXTURE27 = 0x84DB, 104 | GL_TEXTURE28 = 0x84DC, 105 | GL_TEXTURE29 = 0x84DD, 106 | GL_TEXTURE30 = 0x84DE, 107 | GL_TEXTURE31 = 0x84DF, 108 | GL_ACTIVE_TEXTURE = 0x84E0, 109 | GL_MULTISAMPLE = 0x809D, 110 | GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E, 111 | GL_SAMPLE_ALPHA_TO_ONE = 0x809F, 112 | GL_SAMPLE_COVERAGE = 0x80A0, 113 | GL_SAMPLE_BUFFERS = 0x80A8, 114 | GL_SAMPLES = 0x80A9, 115 | GL_SAMPLE_COVERAGE_VALUE = 0x80AA, 116 | GL_SAMPLE_COVERAGE_INVERT = 0x80AB, 117 | GL_TEXTURE_CUBE_MAP = 0x8513, 118 | GL_TEXTURE_BINDING_CUBE_MAP = 0x8514, 119 | GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515, 120 | GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516, 121 | GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517, 122 | GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518, 123 | GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519, 124 | GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A, 125 | GL_PROXY_TEXTURE_CUBE_MAP = 0x851B, 126 | GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C, 127 | GL_COMPRESSED_RGB = 0x84ED, 128 | GL_COMPRESSED_RGBA = 0x84EE, 129 | GL_TEXTURE_COMPRESSION_HINT = 0x84EF, 130 | GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0, 131 | GL_TEXTURE_COMPRESSED = 0x86A1, 132 | GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2, 133 | GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3, 134 | GL_CLAMP_TO_BORDER = 0x812D, 135 | 136 | // OpenGL 1.4 137 | GL_BLEND_DST_RGB = 0x80C8, 138 | GL_BLEND_SRC_RGB = 0x80C9, 139 | GL_BLEND_DST_ALPHA = 0x80CA, 140 | GL_BLEND_SRC_ALPHA = 0x80CB, 141 | GL_POINT_FADE_THRESHOLD_SIZE = 0x8128, 142 | GL_DEPTH_COMPONENT16 = 0x81A5, 143 | GL_DEPTH_COMPONENT24 = 0x81A6, 144 | GL_DEPTH_COMPONENT32 = 0x81A7, 145 | GL_MIRRORED_REPEAT = 0x8370, 146 | GL_MAX_TEXTURE_LOD_BIAS = 0x84FD, 147 | GL_TEXTURE_LOD_BIAS = 0x8501, 148 | GL_INCR_WRAP = 0x8507, 149 | GL_DECR_WRAP = 0x8508, 150 | GL_TEXTURE_DEPTH_SIZE = 0x884A, 151 | GL_TEXTURE_COMPARE_MODE = 0x884C, 152 | GL_TEXTURE_COMPARE_FUNC = 0x884D, 153 | GL_CONSTANT_COLOR = 0x8001, 154 | GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, 155 | GL_CONSTANT_ALPHA = 0x8003, 156 | GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, 157 | GL_FUNC_ADD = 0x8006, 158 | GL_MIN = 0x8007, 159 | GL_MAX = 0x8008, 160 | GL_FUNC_SUBTRACT = 0x800A, 161 | GL_FUNC_REVERSE_SUBTRACT = 0x800B, 162 | 163 | // OpenGL 1.5 164 | GL_BUFFER_SIZE = 0x8764, 165 | GL_BUFFER_USAGE = 0x8765, 166 | GL_QUERY_COUNTER_BITS = 0x8864, 167 | GL_CURRENT_QUERY = 0x8865, 168 | GL_QUERY_RESULT = 0x8866, 169 | GL_QUERY_RESULT_AVAILABLE = 0x8867, 170 | GL_ARRAY_BUFFER = 0x8892, 171 | GL_ELEMENT_ARRAY_BUFFER = 0x8893, 172 | GL_ARRAY_BUFFER_BINDING = 0x8894, 173 | GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895, 174 | GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F, 175 | GL_READ_ONLY = 0x88B8, 176 | GL_WRITE_ONLY = 0x88B9, 177 | GL_READ_WRITE = 0x88BA, 178 | GL_BUFFER_ACCESS = 0x88BB, 179 | GL_BUFFER_MAPPED = 0x88BC, 180 | GL_BUFFER_MAP_POINTER = 0x88BD, 181 | GL_STREAM_DRAW = 0x88E0, 182 | GL_STREAM_READ = 0x88E1, 183 | GL_STREAM_COPY = 0x88E2, 184 | GL_STATIC_DRAW = 0x88E4, 185 | GL_STATIC_READ = 0x88E5, 186 | GL_STATIC_COPY = 0x88E6, 187 | GL_DYNAMIC_DRAW = 0x88E8, 188 | GL_DYNAMIC_READ = 0x88E9, 189 | GL_DYNAMIC_COPY = 0x88EA, 190 | GL_SAMPLES_PASSED = 0x8914, 191 | } 192 | 193 | extern(System) @nogc nothrow { 194 | // OpenGL 1.2 195 | alias da_glDrawRangeElements = void function(GLenum,GLuint,GLuint,GLsizei,GLenum,const(GLvoid)*); 196 | alias da_glTexImage3D = void function(GLenum,GLint,GLint,GLsizei,GLsizei,GLsizei,GLint,GLenum,GLenum,const(GLvoid)*); 197 | alias da_glTexSubImage3D = void function(GLenum,GLint,GLint,GLint,GLint,GLsizei,GLsizei,GLsizei,GLenum,GLenum,const(GLvoid)*); 198 | alias da_glCopyTexSubImage3D = void function(GLenum,GLint,GLint,GLint,GLint,GLint,GLint,GLsizei,GLsizei); 199 | 200 | // OpenGL 1.3 201 | alias da_glActiveTexture = void function(GLenum); 202 | alias da_glSampleCoverage = void function(GLclampf,GLboolean); 203 | alias da_glCompressedTexImage3D = void function(GLenum,GLint,GLenum,GLsizei,GLsizei,GLsizei,GLint,GLsizei,const(GLvoid)*); 204 | alias da_glCompressedTexImage2D = void function(GLenum,GLint,GLenum,GLsizei,GLsizei,GLint,GLsizei,const(GLvoid)*); 205 | alias da_glCompressedTexImage1D = void function(GLenum,GLint,GLenum,GLsizei,GLint,GLsizei,const(GLvoid)*); 206 | alias da_glCompressedTexSubImage3D = void function(GLenum,GLint,GLint,GLint,GLint,GLsizei,GLsizei,GLsizei,GLenum,GLsizei,const(GLvoid)*); 207 | alias da_glCompressedTexSubImage2D = void function(GLenum,GLint,GLint,GLint,GLsizei,GLsizei,GLenum,GLsizei,const(GLvoid)*); 208 | alias da_glCompressedTexSubImage1D = void function(GLenum,GLint,GLint,GLsizei,GLenum,GLsizei,const(GLvoid)*); 209 | alias da_glGetCompressedTexImage = void function(GLenum,GLint,GLvoid*); 210 | 211 | // OpenGL 1.4 212 | alias da_glBlendFuncSeparate = void function(GLenum,GLenum,GLenum,GLenum); 213 | alias da_glMultiDrawArrays = void function(GLenum,const(GLint)*,const(GLsizei)*,GLsizei); 214 | alias da_glMultiDrawElements = void function(GLenum,const(GLsizei)*,GLenum,const(GLvoid)*,GLsizei); 215 | alias da_glPointParameterf = void function(GLenum,GLfloat); 216 | alias da_glPointParameterfv = void function(GLenum,const(GLfloat)*); 217 | alias da_glPointParameteri = void function(GLenum,GLint); 218 | alias da_glPointParameteriv = void function(GLenum,const(GLint)*); 219 | alias da_glBlendColor = void function(GLclampf,GLclampf,GLclampf,GLclampf); 220 | alias da_glBlendEquation = void function(GLenum); 221 | 222 | // OpenGL 1.5 223 | alias da_glGenQueries = void function(GLsizei,GLuint*); 224 | alias da_glDeleteQueries = void function(GLsizei,const(GLuint)*); 225 | alias da_glIsQuery = GLboolean function(GLuint); 226 | alias da_glBeginQuery = void function(GLenum,GLuint); 227 | alias da_glEndQuery = void function(GLenum); 228 | alias da_glGetQueryiv = void function(GLenum,GLenum,GLint*); 229 | alias da_glGetQueryObjectiv = void function(GLuint,GLenum,GLint*); 230 | alias da_glGetQueryObjectuiv = void function(GLuint,GLenum,GLuint*); 231 | alias da_glBindBuffer = void function(GLenum,GLuint); 232 | alias da_glDeleteBuffers = void function(GLsizei,const(GLuint)*); 233 | alias da_glGenBuffers = void function(GLsizei,GLuint*); 234 | alias da_glIsBuffer = GLboolean function(GLuint); 235 | alias da_glBufferData = void function(GLenum,GLsizeiptr,const(GLvoid)*,GLenum); 236 | alias da_glBufferSubData = void function(GLenum,GLintptr,GLsizeiptr,const(GLvoid)*); 237 | alias da_glGetBufferSubData = void function(GLenum,GLintptr,GLsizeiptr,GLvoid*); 238 | alias da_glMapBuffer = GLvoid* function(GLenum,GLenum); 239 | alias da_glUnmapBuffer = GLboolean function(GLenum); 240 | alias da_glGetBufferParameteriv = void function(GLenum,GLenum,GLint*); 241 | alias da_glGetBufferPointerv = void function(GLenum,GLenum,GLvoid*); 242 | }}; 243 | 244 | enum _gl1Funcs = 245 | q{ 246 | // OpenGL 1.2 247 | da_glDrawRangeElements glDrawRangeElements; 248 | da_glTexImage3D glTexImage3D; 249 | da_glTexSubImage3D glTexSubImage3D; 250 | da_glCopyTexSubImage3D glCopyTexSubImage3D; 251 | 252 | // OpenGL 1.3 253 | da_glActiveTexture glActiveTexture; 254 | da_glSampleCoverage glSampleCoverage; 255 | da_glCompressedTexImage3D glCompressedTexImage3D; 256 | da_glCompressedTexImage2D glCompressedTexImage2D; 257 | da_glCompressedTexImage1D glCompressedTexImage1D; 258 | da_glCompressedTexSubImage3D glCompressedTexSubImage3D; 259 | da_glCompressedTexSubImage2D glCompressedTexSubImage2D; 260 | da_glCompressedTexSubImage1D glCompressedTexSubImage1D; 261 | da_glGetCompressedTexImage glGetCompressedTexImage; 262 | 263 | // OpenGL 1.4 264 | da_glBlendFuncSeparate glBlendFuncSeparate; 265 | da_glMultiDrawArrays glMultiDrawArrays; 266 | da_glMultiDrawElements glMultiDrawElements; 267 | da_glPointParameterf glPointParameterf; 268 | da_glPointParameterfv glPointParameterfv; 269 | da_glPointParameteri glPointParameteri; 270 | da_glPointParameteriv glPointParameteriv; 271 | da_glBlendColor glBlendColor; 272 | da_glBlendEquation glBlendEquation; 273 | 274 | // OpenGL 1.5 275 | da_glGenQueries glGenQueries; 276 | da_glDeleteQueries glDeleteQueries; 277 | da_glIsQuery glIsQuery; 278 | da_glBeginQuery glBeginQuery; 279 | da_glEndQuery glEndQuery; 280 | da_glGetQueryiv glGetQueryiv; 281 | da_glGetQueryObjectiv glGetQueryObjectiv; 282 | da_glGetQueryObjectuiv glGetQueryObjectuiv; 283 | da_glBindBuffer glBindBuffer; 284 | da_glDeleteBuffers glDeleteBuffers; 285 | da_glGenBuffers glGenBuffers; 286 | da_glIsBuffer glIsBuffer; 287 | da_glBufferData glBufferData; 288 | da_glBufferSubData glBufferSubData; 289 | da_glGetBufferSubData glGetBufferSubData; 290 | da_glMapBuffer glMapBuffer; 291 | da_glUnmapBuffer glUnmapBuffer; 292 | da_glGetBufferParameteriv glGetBufferParameteriv; 293 | da_glGetBufferPointerv glGetBufferPointerv; 294 | }; 295 | 296 | enum _gl12Loader = 297 | q{ 298 | if(maxVer >= GLVersion.gl12) { 299 | bindGLFunc(cast(void**)&glDrawRangeElements, "glDrawRangeElements"); 300 | bindGLFunc(cast(void**)&glTexImage3D, "glTexImage3D"); 301 | bindGLFunc(cast(void**)&glTexSubImage3D, "glTexSubImage3D"); 302 | bindGLFunc(cast(void**)&glCopyTexSubImage3D, "glCopyTexSubImage3D"); 303 | glVer = GLVersion.gl12; 304 | } 305 | }; 306 | 307 | enum _gl13Loader = 308 | q{ 309 | if(maxVer >= GLVersion.gl13) { 310 | bindGLFunc(cast(void**)&glActiveTexture, "glActiveTexture"); 311 | bindGLFunc(cast(void**)&glSampleCoverage, "glSampleCoverage"); 312 | bindGLFunc(cast(void**)&glCompressedTexImage3D, "glCompressedTexImage3D"); 313 | bindGLFunc(cast(void**)&glCompressedTexImage2D, "glCompressedTexImage2D"); 314 | bindGLFunc(cast(void**)&glCompressedTexImage1D, "glCompressedTexImage1D"); 315 | bindGLFunc(cast(void**)&glCompressedTexSubImage3D, "glCompressedTexSubImage3D"); 316 | bindGLFunc(cast(void**)&glCompressedTexSubImage2D, "glCompressedTexSubImage2D"); 317 | bindGLFunc(cast(void**)&glCompressedTexSubImage1D, "glCompressedTexSubImage1D"); 318 | bindGLFunc(cast(void**)&glGetCompressedTexImage, "glGetCompressedTexImage"); 319 | glVer = GLVersion.gl13; 320 | } 321 | }; 322 | 323 | enum _gl14Loader = 324 | q{ 325 | if(maxVer >= GLVersion.gl14) { 326 | bindGLFunc(cast(void**)&glBlendFuncSeparate, "glBlendFuncSeparate"); 327 | bindGLFunc(cast(void**)&glMultiDrawArrays, "glMultiDrawArrays"); 328 | bindGLFunc(cast(void**)&glMultiDrawElements, "glMultiDrawElements"); 329 | bindGLFunc(cast(void**)&glPointParameterf, "glPointParameterf"); 330 | bindGLFunc(cast(void**)&glPointParameterfv, "glPointParameterfv"); 331 | bindGLFunc(cast(void**)&glPointParameteri, "glPointParameteri"); 332 | bindGLFunc(cast(void**)&glPointParameteriv, "glPointParameteriv"); 333 | bindGLFunc(cast(void**)&glBlendColor, "glBlendColor"); 334 | bindGLFunc(cast(void**)&glBlendEquation, "glBlendEquation"); 335 | glVer = GLVersion.gl14; 336 | } 337 | }; 338 | 339 | enum _gl15Loader = 340 | q{ 341 | if(maxVer >= GLVersion.gl15) { 342 | bindGLFunc(cast(void**)&glGenQueries, "glGenQueries"); 343 | bindGLFunc(cast(void**)&glDeleteQueries, "glDeleteQueries"); 344 | bindGLFunc(cast(void**)&glIsQuery, "glIsQuery"); 345 | bindGLFunc(cast(void**)&glBeginQuery, "glBeginQuery"); 346 | bindGLFunc(cast(void**)&glEndQuery, "glEndQuery"); 347 | bindGLFunc(cast(void**)&glGetQueryiv, "glGetQueryiv"); 348 | bindGLFunc(cast(void**)&glGetQueryObjectiv, "glGetQueryObjectiv"); 349 | bindGLFunc(cast(void**)&glGetQueryObjectuiv, "glGetQueryObjectuiv"); 350 | bindGLFunc(cast(void**)&glBindBuffer, "glBindBuffer"); 351 | bindGLFunc(cast(void**)&glDeleteBuffers, "glDeleteBuffers"); 352 | bindGLFunc(cast(void**)&glGenBuffers, "glGenBuffers"); 353 | bindGLFunc(cast(void**)&glIsBuffer, "glIsBuffer"); 354 | bindGLFunc(cast(void**)&glBufferData, "glBufferData"); 355 | bindGLFunc(cast(void**)&glBufferSubData, "glBufferSubData"); 356 | bindGLFunc(cast(void**)&glGetBufferSubData, "glGetBufferSubData"); 357 | bindGLFunc(cast(void**)&glMapBuffer, "glMapBuffer"); 358 | bindGLFunc(cast(void**)&glUnmapBuffer, "glUnmapBuffer"); 359 | bindGLFunc(cast(void**)&glGetBufferParameteriv, "glGetBufferParameteriv"); 360 | bindGLFunc(cast(void**)&glGetBufferPointerv, "glGetBufferPointerv"); 361 | glVer = GLVersion.gl15; 362 | } 363 | }; 364 | 365 | enum gl1Decls = baseDecls ~ _gl1Decls; 366 | enum gl1Funcs = baseFuncs ~ _gl1Funcs; 367 | enum gl1Loader = _gl12Loader ~ _gl13Loader ~ _gl14Loader ~ _gl15Loader; -------------------------------------------------------------------------------- /source/derelict/opengl/versions/gl2x_dep.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | 29 | // Deprecated OpenGL 2.x symbols. 30 | module derelict.opengl.versions.gl2x_dep; 31 | 32 | import derelict.opengl.types, 33 | derelict.opengl.versions.gl1x_dep; 34 | 35 | public 36 | import derelict.opengl.versions.gl2x; 37 | 38 | enum _gl2_depDecls = 39 | q{ 40 | enum : uint 41 | { 42 | // OpenGL 2.0 43 | GL_VERTEX_PROGRAM_TWO_SIDE = 0x8643, 44 | GL_POINT_SPRITE = 0x8861, 45 | GL_COORD_REPLACE = 0x8862, 46 | GL_MAX_TEXTURE_COORDS = 0x8871, 47 | 48 | // OpenGL 2.1 49 | GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845F, 50 | GL_SLUMINANCE_ALPHA = 0x8C44, 51 | GL_SLUMINANCE8_ALPHA8 = 0x8C45, 52 | GL_SLUMINANCE = 0x8C46, 53 | GL_SLUMINANCE8 = 0x8C47, 54 | GL_COMPRESSED_SLUMINANCE = 0x8C4A, 55 | GL_COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B, 56 | }}; 57 | 58 | enum gl2_depDecls = gl1_depDecls ~ _gl2_depDecls ~ _gl2Decls; 59 | enum gl2_depFuncs = gl1_depFuncs ~ _gl2Funcs; 60 | enum gl2_depLoader = gl1_depLoader ~ _gl2Loader; -------------------------------------------------------------------------------- /source/derelict/opengl/versions/gl3x_dep.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | 29 | // Deprecated OpenGL 3.x symbols. 30 | module derelict.opengl.versions.gl3x_dep; 31 | 32 | import derelict.opengl.types; 33 | 34 | public 35 | import derelict.opengl.versions.gl3x; 36 | 37 | enum _gl30_depDecls = 38 | q{ 39 | enum : uint { 40 | GL_CLAMP_VERTEX_COLOR = 0x891A, 41 | GL_CLAMP_FRAGMENT_COLOR = 0x891B, 42 | GL_ALPHA_INTEGER = 0x8D97, 43 | GL_INDEX = 0x8222, 44 | GL_TEXTURE_LUMINANCE_TYPE = 0x8C14, 45 | GL_TEXTURE_INTENSITY_TYPE = 0x8C15, 46 | }}; 47 | 48 | enum gl30_depDecls = _gl30_depDecls ~ gl30Decls; -------------------------------------------------------------------------------- /source/derelict/opengl/versions/gl4x.d: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Boost Software License - Version 1.0 - August 17th, 2003 4 | 5 | Permission is hereby granted, free of charge, to any person or organization 6 | obtaining a copy of the software and accompanying documentation covered by 7 | this license (the "Software") to use, reproduce, display, distribute, 8 | execute, and transmit the Software, and to prepare derivative works of the 9 | Software, and to permit third-parties to whom the Software is furnished to 10 | do so, all subject to the following: 11 | 12 | The copyright notices in the Software and this entire statement, including 13 | the above license grant, this restriction and the following disclaimer, 14 | must be included in all copies of the Software, in whole or in part, and 15 | all derivative works of the Software, unless such copies or derivative 16 | works are solely in the form of machine-executable object code generated by 17 | a source language processor. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 22 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 23 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 24 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | 27 | */ 28 | module derelict.opengl.versions.gl4x; 29 | 30 | import derelict.opengl.types; 31 | public 32 | import derelict.opengl.extensions.core_40, 33 | derelict.opengl.extensions.core_41, 34 | derelict.opengl.extensions.core_42, 35 | derelict.opengl.extensions.core_43, 36 | derelict.opengl.extensions.core_44, 37 | derelict.opengl.extensions.core_45; 38 | 39 | enum _gl40Decls = 40 | q{ 41 | enum : uint { 42 | GL_SAMPLE_SHADING = 0x8C36, 43 | GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37, 44 | GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E, 45 | GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F, 46 | GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, 47 | GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A, 48 | GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B, 49 | GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C, 50 | GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D, 51 | GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E, 52 | GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F, 53 | } 54 | 55 | extern(System) @nogc nothrow { 56 | alias da_glMinSampleShading = void function( GLclampf ); 57 | alias da_glBlendEquationi = void function( GLuint,GLenum ); 58 | alias da_glBlendEquationSeparatei = void function( GLuint,GLenum,GLenum ); 59 | alias da_glBlendFunci = void function( GLuint,GLenum,GLenum ); 60 | alias da_glBlendFuncSeparatei = void function( GLuint,GLenum,GLenum,GLenum,GLenum ); 61 | }}; 62 | enum gl40Decls = corearb40Decls ~ _gl40Decls; 63 | 64 | enum gl41Decls = corearb41Decls; 65 | 66 | enum _gl42Decls = 67 | q{ 68 | enum : uint { 69 | GL_COPY_READ_BUFFER_BINDING = 0x8F36, 70 | GL_COPY_WRITE_BUFFER_BINDING = 0x8F37, 71 | GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23, 72 | GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24, 73 | GL_COMPRESSED_RGBA_BPTC_UNORM = 0x8E8C, 74 | GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 0x8E8D, 75 | GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 0x8E8E, 76 | GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 0x8E8F, 77 | }}; 78 | enum gl42Decls = corearb42Decls ~ _gl42Decls; 79 | 80 | enum _gl43Decls = 81 | q{ 82 | enum : uint { 83 | GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9, 84 | GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E, 85 | GL_VERTEX_BINDING_BUFFER = 0x8F4F, 86 | }}; 87 | enum gl43Decls = corearb43Decls ~ _gl43Decls; 88 | 89 | enum _gl44Decls = 90 | q{ 91 | enum : uint { 92 | GL_MAX_VERTEX_ATTRIB_STRIDE = 0x82E5, 93 | GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED = 0x8221, 94 | GL_TEXTURE_BUFFER_BINDING = 0x8C2A, 95 | }}; 96 | enum gl44Decls = corearb44Decls ~ _gl44Decls; 97 | 98 | enum _gl45Decls = 99 | q{ 100 | enum uint GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT = 0x00000004; 101 | extern(System) @nogc nothrow { 102 | alias da_glGetnCompressedTexImage = void function( GLenum,GLint,GLsizei,void* ); 103 | alias da_glGetnTexImage = void function( GLenum,GLint,GLenum,GLenum,GLsizei,void* ); 104 | alias da_glGetnUniformdv = void function( GLuint,GLint,GLsizei,GLdouble* ); 105 | }}; 106 | enum gl45Decls = corearb45Decls ~ _gl45Decls; 107 | 108 | enum _gl40Funcs = 109 | q{ 110 | da_glMinSampleShading glMinSampleShading; 111 | da_glBlendEquationi glBlendEquationi; 112 | da_glBlendEquationSeparatei glBlendEquationSeparatei; 113 | da_glBlendFunci glBlendFunci; 114 | da_glBlendFuncSeparatei glBlendFuncSeparatei; 115 | }; 116 | enum gl40Funcs = corearb40Funcs ~ _gl40Funcs; 117 | 118 | enum gl41Funcs = corearb41Funcs; 119 | enum gl42Funcs = corearb42Funcs; 120 | enum gl43Funcs = corearb43Funcs; 121 | enum gl44Funcs = corearb44Funcs; 122 | 123 | enum _gl45Funcs = 124 | q{ 125 | da_glGetnTexImage glGetnTexImage; 126 | da_glGetnCompressedTexImage glGetnCompressedTexImage; 127 | da_glGetnUniformdv glGetnUniformdv; 128 | }; 129 | enum gl45Funcs = corearb45Funcs ~ _gl45Funcs; 130 | 131 | enum _gl40Loader = 132 | q{ 133 | bindGLFunc(cast(void**)&glMinSampleShading, "glMinSampleShading"); 134 | bindGLFunc(cast(void**)&glBlendEquationi, "glBlendEquationi"); 135 | bindGLFunc(cast(void**)&glBlendEquationSeparatei, "glBlendEquationSeparatei"); 136 | bindGLFunc(cast(void**)&glBlendFunci, "glBlendFunci"); 137 | bindGLFunc(cast(void**)&glBlendFuncSeparatei, "glBlendFuncSeparatei"); 138 | glVer = GLVersion.gl40; 139 | }; 140 | version(DerelictGL3_Contexts) 141 | enum _gl40LoaderAdd = corearb40Loader; 142 | else 143 | enum _gl40LoaderAdd = `loadExtensionSet(GLVersion.gl40, true);`; 144 | enum gl40Loader = `if(maxVer >= GLVersion.gl40) {` ~ _gl40LoaderAdd ~ _gl40Loader ~ `}`; 145 | 146 | enum _gl41Loader = 147 | q{ 148 | glVer = GLVersion.gl41; 149 | }; 150 | version(DerelictGL3_Contexts) 151 | enum _gl41LoaderAdd = corearb41Loader; 152 | else 153 | enum _gl41LoaderAdd = `loadExtensionSet(GLVersion.gl41, true);`; 154 | enum gl41Loader = `if(maxVer >= GLVersion.gl41) {` ~ _gl41LoaderAdd ~ _gl41Loader ~ `}`; 155 | 156 | enum _gl42Loader = 157 | q{ 158 | glVer = GLVersion.gl42; 159 | }; 160 | version(DerelictGL3_Contexts) 161 | enum _gl42LoaderAdd = corearb42Loader; 162 | else 163 | enum _gl42LoaderAdd = `loadExtensionSet(GLVersion.gl42, true);`; 164 | enum gl42Loader = `if(maxVer >= GLVersion.gl42) {` ~ _gl42LoaderAdd ~ _gl42Loader ~ `}`; 165 | 166 | enum _gl43Loader = 167 | q{ 168 | glVer = GLVersion.gl43; 169 | }; 170 | version(DerelictGL3_Contexts) 171 | enum _gl43LoaderAdd = corearb43Loader; 172 | else 173 | enum _gl43LoaderAdd = `loadExtensionSet(GLVersion.gl43, true);`; 174 | enum gl43Loader = `if(maxVer >= GLVersion.gl43) {` ~ _gl43LoaderAdd ~ _gl43Loader ~ `}`; 175 | 176 | enum _gl44Loader = 177 | q{ 178 | glVer = GLVersion.gl44; 179 | }; 180 | version(DerelictGL3_Contexts) 181 | enum _gl44LoaderAdd = corearb44Loader; 182 | else 183 | enum _gl44LoaderAdd = `loadExtensionSet(GLVersion.gl44, true);`; 184 | enum gl44Loader = `if(maxVer >= GLVersion.gl44) {` ~ _gl44LoaderAdd ~ _gl44Loader ~ `}`; 185 | 186 | enum _gl45Loader = 187 | q{ 188 | bindGLFunc(cast(void**)&glGetnTexImage, "glGetnTexImage"); 189 | bindGLFunc(cast(void**)&glGetnCompressedTexImage, "glGetnCompressedTexImage"); 190 | bindGLFunc(cast(void**)&glGetnUniformdv, "glGetnUniformdv"); 191 | glVer = GLVersion.gl45; 192 | }; 193 | version(DerelictGL3_Contexts) 194 | enum _gl45LoaderAdd = corearb45Loader; 195 | else 196 | enum _gl45LoaderAdd = `loadExtensionSet(GLVersion.gl45, true);`; 197 | enum gl45Loader = `if(maxVer >= GLVersion.gl45) {` ~ _gl45LoaderAdd ~ _gl45Loader ~ `}`; --------------------------------------------------------------------------------