OpenGLRenderer: Add shader source on compilation error

This commit is contained in:
Jérôme Leclercq
2022-02-18 13:05:19 +01:00
parent c33ab779d1
commit ebd1318512
3 changed files with 30 additions and 3 deletions

View File

@@ -159,6 +159,10 @@ namespace Nz
{
std::string errorLog;
if (!shader.GetCompilationStatus(&errorLog))
throw std::runtime_error("Failed to compile shader: " + errorLog);
{
std::string source = shader.GetSource();
throw std::runtime_error("Failed to compile shader: " + errorLog + "\nSource: " + source);
}
}
}