Skip to content

Commit

Permalink
Ignore unsupported #require preprocessor directive
Browse files Browse the repository at this point in the history
`#require LightingV1` is found in generic4.frag, genericimage4.frag, ...
  • Loading branch information
moetayuko committed Sep 1, 2024
1 parent 75b3541 commit cee6471
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/WallpaperEngine/Render/Shaders/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,15 @@ void Compiler::precompile () {
this->m_includesContent += this->lookupShaderFile (filename);
this->m_includesContent += "\r\n// end of included from file " + filename + "\r\n";
}
} else if (this->peekString ("#require ", it)) {
// TODO: PROPERLY IMPLEMENT #require
this->m_compiledContent += "// #require ";
// ignore whitespaces
this->ignoreSpaces (it);
BREAK_IF_ERROR
std::string name = this->extractName (it);
BREAK_IF_ERROR
this->m_compiledContent += name;
} else {
this->m_compiledContent += '#';
++it;
Expand Down

0 comments on commit cee6471

Please sign in to comment.