mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-07-14 21:32:23 +08:00
~ quick fix for shader compilation with nested includes, should fix #103
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
46ea8e8f03
commit
cf2e31a606
@ -265,12 +265,21 @@ namespace WallpaperEngine::Render::Shaders
|
||||
// extract value between quotes
|
||||
filename = this->extractQuotedValue (it); BREAK_IF_ERROR
|
||||
|
||||
if (this->m_content.find (" main(") == std::string::npos && this->m_content.find (" main (") == std::string::npos)
|
||||
{
|
||||
this->m_compiledContent += "// begin of include from file " + filename + "\r\n";
|
||||
this->m_compiledContent += this->lookupShaderFile (filename);
|
||||
this->m_compiledContent += "\r\n// end of included from file " + filename + "\r\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
// load the content to the includes contents and continue with the next one
|
||||
// try to find the file first
|
||||
this->m_includesContent += "// begin of included from file " + filename + "\r\n";
|
||||
this->m_includesContent += this->lookupShaderFile (filename);
|
||||
this->m_includesContent += "\r\n// end of included from file " + filename + "\r\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_compiledContent += '#';
|
||||
|
Loading…
Reference in New Issue
Block a user