Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ + (void)updateView:(MTKView*)mtkView {
const int width = static_cast<int>(mtkView.bounds.size.width * scale);
const int height = static_cast<int>(mtkView.bounds.size.height * scale);
if (width != 0 && height != 0) {
BabylonNative::UpdateView(mtkView, width, height);
BabylonNative::UpdateView(mtkView.layer, width, height);
Comment thread
CedricGuillemet marked this conversation as resolved.
Outdated
}
}

Expand Down
6 changes: 1 addition & 5 deletions Modules/@babylonjs/react-native/shared/BabylonNative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,9 @@ namespace BabylonNative
Napi::Detach(m_env);
}

void UpdateView(WindowType window, size_t width, size_t height)
void UpdateView(Babylon::Graphics::WindowT window, size_t width, size_t height)
{
#if defined(__APPLE__)
m_graphicsConfig.Window = (Babylon::Graphics::WindowT)window.layer;
#else
m_graphicsConfig.Window = window;
#endif
m_graphicsConfig.Width = width;
m_graphicsConfig.Height = height;
UpdateGraphicsConfiguration();
Comment thread
CedricGuillemet marked this conversation as resolved.
Expand Down
2 changes: 1 addition & 1 deletion Modules/@babylonjs/react-native/shared/BabylonNative.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace BabylonNative
void Initialize(facebook::jsi::Runtime& jsiRuntime, Dispatcher jsDispatcher);
void Deinitialize();

void UpdateView(WindowType window, size_t width, size_t height);
void UpdateView(Babylon::Graphics::WindowT window, size_t width, size_t height);
Comment thread
CedricGuillemet marked this conversation as resolved.
Outdated
void UpdateMSAA(uint8_t value);
void UpdateAlphaPremultiplied(bool enabled);

Expand Down
Loading