16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 19:09:20 +02:00

python screen windows without context sharing

This commit is contained in:
milek7
2019-03-18 17:02:54 +01:00
parent efb041aaa0
commit 99e7ef5513
12 changed files with 156 additions and 54 deletions

View File

@@ -6995,11 +6995,14 @@ bool TTrain::InitializeCab(int NewCabNo, std::string const &asFileName)
DynamicObject->asBaseDir + renderername :
renderername };
auto rt = std::make_shared<python_rt>();
rt->shared_tex = tex->id;
// record renderer and material binding for future update requests
m_screens.emplace_back(rendererpath, tex->id, nullptr);
m_screens.emplace_back(rendererpath, rt, nullptr);
if (Global.python_displaywindows)
std::get<2>(m_screens.back()) = std::make_unique<python_screen_viewer>(tex->id, rendererpath);
std::get<2>(m_screens.back()) = std::make_unique<python_screen_viewer>(rt, rendererpath);
}
// btLampkaUnknown.Init("unknown",mdKabina,false);
} while (token != "");