Skip to content

Commit c18aac5

Browse files
Integrate multi-update changes. (#313)
1 parent f6cb041 commit c18aac5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Modules/@babylonjs/react-native/shared/BabylonNative.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ namespace Babylon
2323
{
2424
Dispatcher g_inlineDispatcher{ [](const std::function<void()>& func) { func(); } };
2525
std::unique_ptr<Graphics> g_graphics{};
26+
std::unique_ptr<Graphics::Update> g_update{};
2627
std::unique_ptr<Babylon::Polyfills::Canvas> g_nativeCanvas{};
2728
}
2829

@@ -80,6 +81,7 @@ namespace Babylon
8081
if (!g_graphics)
8182
{
8283
g_graphics = Graphics::CreateGraphics(windowConfig);
84+
g_update = std::make_unique<Babylon::Graphics::Update>(g_graphics->GetUpdate("update"));
8385
}
8486
else
8587
{
@@ -112,6 +114,8 @@ namespace Babylon
112114
if (g_graphics && m_isRenderingEnabled)
113115
{
114116
g_graphics->StartRenderingCurrentFrame();
117+
g_update->Start();
118+
g_update->Finish();
115119
g_graphics->FinishRenderingCurrentFrame();
116120
}
117121
}
Submodule BabylonNative updated 38 files

0 commit comments

Comments
 (0)