Add: Show current video driver info in Options window

This commit is contained in:
Niels Martin Hansen
2022-04-30 14:52:39 +02:00
parent be72f1e54b
commit 345dcd3c7b
13 changed files with 55 additions and 3 deletions

View File

@@ -745,6 +745,16 @@ void OpenGLBackend::PrepareContext()
_glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
std::string OpenGLBackend::GetDriverName()
{
std::string res{};
/* Skipping GL_VENDOR as it tends to be "obvious" from the renderer and version data, and just makes the string pointlessly longer */
res += reinterpret_cast<const char *>(_glGetString(GL_RENDERER));
res += ", ";
res += reinterpret_cast<const char *>(_glGetString(GL_VERSION));
return res;
}
/**
* Check a shader for compilation errors and log them if necessary.
* @param shader Shader to check.