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.gl43; 8 9 import bindbc.opengl.config; 10 static if(glSupport >= GLSupport.gl43) { 11 import bindbc.loader : SharedLib; 12 import bindbc.opengl.context; 13 import bindbc.opengl.bind.types; 14 /* 15 enum : uint { 16 GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9, 17 GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E, 18 GL_VERTEX_BINDING_BUFFER = 0x8F4F, 19 GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242, 20 GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, 21 GL_DEBUG_CALLBACK_FUNCTION = 0x8244, 22 GL_DEBUG_CALLBACK_USER_PARAM = 0x8245, 23 GL_DEBUG_SOURCE_API = 0x8246, 24 GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, 25 GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, 26 GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, 27 GL_DEBUG_SOURCE_APPLICATION = 0x824A, 28 GL_DEBUG_SOURCE_OTHER = 0x824B, 29 GL_DEBUG_TYPE_ERROR = 0x824C, 30 GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, 31 GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, 32 GL_DEBUG_TYPE_PORTABILITY = 0x824F, 33 GL_DEBUG_TYPE_PERFORMANCE = 0x8250, 34 GL_DEBUG_TYPE_OTHER = 0x8251, 35 GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, 36 GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, 37 GL_DEBUG_LOGGED_MESSAGES = 0x9145, 38 GL_DEBUG_SEVERITY_HIGH = 0x9146, 39 GL_DEBUG_SEVERITY_MEDIUM = 0x9147, 40 GL_DEBUG_SEVERITY_LOW = 0x9148, 41 } 42 43 extern(System) nothrow { 44 alias GLDEBUGPROC = void function(GLenum, GLenum, GLuint, GLenum, GLsizei, in GLchar*, GLvoid*); 45 } 46 47 extern(System) @nogc nothrow { 48 alias pglDebugMessageControl = void function(GLenum, GLenum, GLenum, GLsizei, const(GLuint)*, GLboolean); 49 alias pglDebugMessageInsert = void function(GLenum, GLenum, GLuint, GLenum, GLsizei, const(GLchar)*); 50 alias pglGetDebugMessageLog = void function(GLuint, GLsizei, GLenum*, GLenum*, GLuint*, GLenum*, GLsizei*, GLchar*); 51 alias pglDebugMessageCallback = void function(GLDEBUGPROC, const(GLvoid)*); 52 } 53 54 __gshared { 55 pglDebugMessageControl glDebugMessageControl; 56 pglDebugMessageInsert glDebugMessageInsert; 57 pglDebugMessageCallback glDebugMessageCallback; 58 pglGetDebugMessageLog glGetDebugMessageLog; 59 } 60 */ 61 package(bindbc.opengl) @nogc nothrow 62 bool loadGL43(SharedLib lib, GLSupport contextVersion) 63 { 64 import bindbc.opengl.bind.arb : loadARB43; 65 66 if(contextVersion >= GLSupport.gl43) { 67 /* 68 lib.bindGLSymbol(cast(void**)&glDebugMessageControl, "glDebugMessageControl"); 69 lib.bindGLSymbol(cast(void**)&glDebugMessageInsert, "glDebugMessageInsert"); 70 lib.bindGLSymbol(cast(void**)&glDebugMessageCallback, "glDebugMessageCallback"); 71 lib.bindGLSymbol(cast(void**)&glGetDebugMessageLog, "glGetDebugMessageLog"); 72 */ 73 74 if(errorCountGL() == 0 && loadARB43(lib, contextVersion)) return true; 75 } 76 return false; 77 } 78 }