Enable networked specifications for ScreenSpaceImages

This commit is contained in:
Alexander Bock
2017-06-03 13:38:02 -04:00
parent 994ba32f44
commit ea8442d996
2 changed files with 4 additions and 6 deletions

View File

@@ -210,12 +210,9 @@ void addScreenSpaceRenderable(std::string texturePath) {
return;
}
texturePath = absPath(texturePath);
texturePath = FileSys.convertPathSeparator(texturePath, '/');
std::string luaTable =
"{Type = 'ScreenSpaceImage', TexturePath = '" + texturePath + "' }";
std::string script = "openspace.registerScreenSpaceRenderable(" + luaTable + ");";
const std::string luaTable =
"{Type = 'ScreenSpaceImage', TexturePath = openspace.absPath('" + texturePath + "') }";
const std::string script = "openspace.registerScreenSpaceRenderable(" + luaTable + ");";
OsEng.scriptEngine().queueScript(script, openspace::scripting::ScriptEngine::RemoteScripting::Yes);
}
} // namespace

View File

@@ -200,6 +200,7 @@ int absolutePath(lua_State* L) {
std::string path = luaL_checkstring(L, -1);
path = absPath(path);
path = FileSys.convertPathSeparator(path, '/');
lua_pushstring(L, path.c_str());
return 1;
}