Some shader compilers did not seemingly like #if XXX blocks

if XXX was not defined. Changed to #ifdef XXX.
This commit is contained in:
Vojtech Bubnik 2020-12-11 12:27:07 +01:00
parent 9f6bf5a835
commit 2c8a92cacb
2 changed files with 3 additions and 3 deletions

View file

@ -61,7 +61,7 @@ bool GLShaderProgram::init_from_files(const std::string& name, const ShaderFilen
for (std::string_view def : defines)
// Our shaders are stored with "\r\n", thus replicate the same here for consistency. Likely "\n" would suffice,
// but we don't know all the OpenGL shader compilers around.
defines_program += format("#define %s 1\r\n", def);
defines_program += format("#define %s\r\n", def);
ShaderSources sources = {};
for (size_t i = 0; i < static_cast<size_t>(EShaderType::Count); ++i) {