commit d1a118ec20fc3cf570870537f875a7bb3ccb5e17 parent f4a4e36534b5a0c3303b89c81b0dab16297023b6 Author: Michael Savage <mikejsavage@gmail.com> Date: Tue Dec 27 16:44:17 +0200 Print each GL extension separately Diffstat:
gl.cc | | | 20 | +++++++++++++++----- |
diff --git a/gl.cc b/gl.cc @@ -140,11 +140,21 @@ GLFWwindow * gl_init() { FATAL( "gladLoadGL" ); } - INFO( "Using extensions:%s%s%s%s", - GLAD_GL_KHR_debug ? " KHR_debug_output" : "", - GLAD_GL_EXT_texture_sRGB ? " EXT_texture_sRGB" : "", - GLAD_GL_EXT_texture_compression_s3tc ? " EXT_texture_compression_s3tc" : "", - GLAD_GL_EXT_texture_compression_rgtc ? " EXT_texture_compression_rgtc" : "" ); + struct { + const char * name; + int enabled; + } exts[] = { + { "KHR_debug", GLAD_GL_KHR_debug }, + { "AMD_debug_output", GLAD_GL_AMD_debug_output }, + { "EXT_texture_sRGB", GLAD_GL_EXT_texture_sRGB }, + { "EXT_texture_compression_s3tc", GLAD_GL_EXT_texture_compression_s3tc }, + { "EXT_texture_compression_rgtc", GLAD_GL_EXT_texture_compression_rgtc } + }; + + INFO( "OpenGL extensions:" ); + for( size_t i = 0; i < ARRAY_COUNT( exts ); i++ ) { + INFO( "%s: %s", exts[ i ].name, exts[ i ].enabled == 0 ? "missing" : "present" ); + } if( GLAD_GL_KHR_debug != 0 ) { GLint context_flags;