mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-30 03:32:36 +00:00
Renamed lua binding, and use action to avoid concurrency issue
This commit is contained in:
parent
f78fa989ee
commit
fc8838c7dd
@ -52,12 +52,18 @@ namespace MWLua
|
|||||||
|
|
||||||
api["triggerShaderReload"] = [context]()
|
api["triggerShaderReload"] = [context]()
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWorld()->getRenderingManager()->getResourceSystem()->getSceneManager()->getShaderManager().triggerShaderReload();
|
context.mLuaManager->addAction([]
|
||||||
|
{
|
||||||
|
MWBase::Environment::get().getWorld()->getRenderingManager()->getResourceSystem()->getSceneManager()->getShaderManager().triggerShaderReload();
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
api["togggleShaderHotReload"] = [context](bool value)
|
api["setShaderHotReloadEnabled"] = [context](bool value)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWorld()->getRenderingManager()->getResourceSystem()->getSceneManager()->getShaderManager().setHotReloadEnabled(value);
|
context.mLuaManager->addAction([value]
|
||||||
|
{
|
||||||
|
MWBase::Environment::get().getWorld()->getRenderingManager()->getResourceSystem()->getSceneManager()->getShaderManager().setHotReloadEnabled(value);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
return LuaUtil::makeReadOnly(api);
|
return LuaUtil::makeReadOnly(api);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user