| 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 | { |
no test coverage detected