MCPcopy Create free account
hub / github.com/BabylonJS/BabylonNative / Reinitialize

Function Reinitialize

Plugins/NativeEngine/Source/NativeEngineAPI.cpp:18–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 }
17
18 void Reinitialize(Napi::Env env, void* windowPtr, size_t width, size_t height)
19 {
20 bgfx::PlatformData pd;
21 pd.ndt = nullptr;
22 pd.nwh = windowPtr;
23 pd.context = nullptr;
24 pd.backBuffer = nullptr;
25 pd.backBufferDS = nullptr;
26 bgfx::setPlatformData(pd);
27 bgfx::reset(static_cast<uint32_t>(width), static_cast<uint32_t>(height));
28
29 auto& window = Plugins::Internal::NativeWindow::GetFromJavaScript(env);
30 window.Resize(width, height);
31 }
32
33 void DeinitializeGraphics()
34 {

Calls 1

ResizeMethod · 0.80

Tested by

no test coverage detected