mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-11 05:20:14 -04:00
use table instead of vector in return type
This commit is contained in:
parent
179341b221
commit
feeb15d1ff
@ -183,15 +183,15 @@ namespace MWLua
|
|||||||
return shader;
|
return shader;
|
||||||
};
|
};
|
||||||
|
|
||||||
api["getChain"] = []() {
|
api["getChain"] = [context]() {
|
||||||
std::vector<Shader> chain;
|
sol::table chain(context.sol(), sol::create);
|
||||||
|
|
||||||
for (const auto& shader : MWBase::Environment::get().getWorld()->getPostProcessor()->getChain())
|
for (const auto& shader : MWBase::Environment::get().getWorld()->getPostProcessor()->getChain())
|
||||||
{
|
{
|
||||||
// Don't expose internal shaders to the API, they should be invisible to the user
|
// Don't expose internal shaders to the API, they should be invisible to the user
|
||||||
if (shader->getInternal())
|
if (shader->getInternal())
|
||||||
continue;
|
continue;
|
||||||
chain.emplace_back(shader);
|
chain.add(Shader(shader));
|
||||||
}
|
}
|
||||||
|
|
||||||
return chain;
|
return chain;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user