[Postprocessing] Fix a couple awkward issues with Lua API

This commit is contained in:
Cody Glassman 2022-05-31 08:45:27 +00:00 committed by Petr Mikheev
parent feb5d5bbc2
commit 447b586d7d
9 changed files with 74 additions and 29 deletions

View file

@ -75,6 +75,7 @@ namespace fx
mGLSLExtensions.clear();
mGLSLVersion = mUBO ? 330 : 120;
mGLSLProfile.clear();
mDynamic = false;
}
std::string Technique::getBlockWithLineDirective()
@ -249,11 +250,13 @@ namespace fx
for (const auto& ext : parseLiteralList<Lexer::Comma>())
mGLSLExtensions.emplace(ext);
}
else if (key == "dynamic")
mDynamic = parseBool();
else
error(Misc::StringUtils::format("unexpected key '%s'", std::string{key}));
expect<Lexer::SemiColon>();
}
}
if (mPassKeys.empty())
error("pass list in 'technique' block cannot be empty.");