Added Screen space reflections and Editor UI refactoring

This commit is contained in:
antopilo
2022-01-31 13:54:58 -05:00
parent e216686272
commit b273a2fb8a
78 changed files with 2454 additions and 946 deletions

View File

@@ -88,18 +88,18 @@ namespace Nuake {
return result;
}
Ref<WrenScript> ScriptingEngine::RegisterScript(const std::string& path, const std::string& mod)
{
// Check if scripts has already been loaded.
// You can't import the same module twice, otherwise, compile error.
if (m_Scripts.find(path) == m_Scripts.end())
{
std::string query = "import \"" + path + "\" for " + mod;
wrenInterpret(m_WrenVM, "main", query.c_str());
}
return CreateRef<WrenScript>(path, mod);
}
//Ref<WrenScript> ScriptingEngine::RegisterScript(const std::string& path, const std::string& mod)
//{
// //// Check if scripts has already been loaded.
// //// You can't import the same module twice, otherwise, compile error.
// //if (m_Scripts.find(path) == m_Scripts.end())
// //{
// // std::string query = "import \"" + path + "\" for " + mod;
// // wrenInterpret(m_WrenVM, "main", query.c_str());
// //}
// //
// //return CreateRef<WrenScript>(path, mod);
//}
// Useful to check if a script has been imported, importing a script
// twice gives a compile error.
@@ -120,8 +120,6 @@ namespace Nuake {
m_LoadedScripts.push_back(path);
}
void ScriptingEngine::RegisterModule(Ref<ScriptModule> scriptModule)
{
Modules[scriptModule->GetModuleName()] = scriptModule;