1 2 // Copyright 2018 - 2021 Michael D. Parker 3 // Distributed under the Boost Software License, Version 1.0. 4 // (See accompanying file LICENSE_1_0.txt or copy at 5 // http://www.boost.org/LICENSE_1_0.txt) 6 7 module bindbc.opengl.bind.gl40; 8 9 import bindbc.opengl.config; 10 static if(glSupport >= GLSupport.gl40) { 11 import bindbc.loader : SharedLib; 12 import bindbc.opengl.context; 13 import bindbc.opengl.bind.types; 14 15 enum : uint { 16 GL_SAMPLE_SHADING = 0x8C36, 17 GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37, 18 GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E, 19 GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F, 20 GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, 21 GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A, 22 GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B, 23 GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C, 24 GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D, 25 GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E, 26 GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F, 27 } 28 29 extern(System) @nogc nothrow { 30 alias pglBlendEquationi = void function(GLuint,GLenum); 31 alias pglBlendEquationSeparatei = void function(GLuint,GLenum,GLenum); 32 alias pglBlendFunci = void function(GLuint,GLenum,GLenum); 33 alias pglBlendFuncSeparatei = void function(GLuint,GLenum,GLenum,GLenum,GLenum); 34 alias pglMinSampleShading = void function(GLclampf); 35 } 36 37 __gshared { 38 pglBlendEquationi glBlendEquationi; 39 pglBlendEquationSeparatei glBlendEquationSeparatei; 40 pglBlendFunci glBlendFunci; 41 pglBlendFuncSeparatei glBlendFuncSeparatei; 42 pglMinSampleShading glMinSampleShading; 43 } 44 45 package(bindbc.opengl) @nogc nothrow 46 bool loadGL40(SharedLib lib, GLSupport contextVersion) 47 { 48 import bindbc.opengl.bind.arb : loadARB40; 49 50 if(contextVersion >= GLSupport.gl40) { 51 lib.bindGLSymbol(cast(void**)&glMinSampleShading, "glMinSampleShading"); 52 lib.bindGLSymbol(cast(void**)&glBlendEquationi, "glBlendEquationi"); 53 lib.bindGLSymbol(cast(void**)&glBlendEquationSeparatei, "glBlendEquationSeparatei"); 54 lib.bindGLSymbol(cast(void**)&glBlendFunci, "glBlendFunci"); 55 lib.bindGLSymbol(cast(void**)&glBlendFuncSeparatei, "glBlendFuncSeparatei"); 56 57 if(errorCountGL() == 0 && loadARB40(lib, contextVersion)) return true; 58 } 59 return false; 60 } 61 }