Output GL version when running with --debug-gl

See #521
This commit is contained in:
Kovid Goyal 2018-05-05 07:26:30 +05:30
parent 83850b28ae
commit f69ed984a4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -59,6 +59,7 @@ gl_init() {
ARB_TEST(texture_storage);
#undef ARB_TEST
glad_loaded = true;
if (global_state.debug_gl) printf("GL version string: %s Detected version: %d.%d\n", glGetString(GL_VERSION), GLVersion.major, GLVersion.minor);
if (GLVersion.major < OPENGL_REQUIRED_VERSION_MAJOR || (GLVersion.major == OPENGL_REQUIRED_VERSION_MAJOR && GLVersion.minor < OPENGL_REQUIRED_VERSION_MINOR)) {
fatal("OpenGL version is %d.%d, version >= 3.3 required for kitty", GLVersion.major, GLVersion.minor);
}