Skip to content

Commit 21fb939

Browse files
Sync changes for graphics context from Babylon Native (#363)
- Updated project with changes required by the graphics context rework added to BabylonNative. - Updated BabylonNative submodule to point to the commit that has received the graphics context rework.
1 parent 92115b1 commit 21fb939

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Modules/@babylonjs/react-native-iosandroid/android/src/main/cpp/BabylonNativeInterop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <jni.h>
22

3-
#include <Babylon/Graphics.h>
3+
#include <Babylon/Graphics/Device.h>
44
#include <Babylon/JsRuntime.h>
55
#include <Babylon/Plugins/NativeEngine.h>
66
#include <Babylon/Plugins/NativeInput.h>

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "BabylonNative.h"
22

3-
#include <Babylon/Graphics.h>
3+
#include <Babylon/Graphics/Device.h>
44
#include <Babylon/JsRuntime.h>
55
#include <Babylon/Plugins/NativeCapture.h>
66
#include <Babylon/Plugins/NativeEngine.h>
@@ -22,8 +22,8 @@ namespace BabylonNative
2222
namespace
2323
{
2424
Dispatcher g_inlineDispatcher{ [](const std::function<void()>& func) { func(); } };
25-
std::unique_ptr<Babylon::Graphics> g_graphics{};
26-
std::unique_ptr<Babylon::Graphics::Update> g_update{};
25+
std::unique_ptr<Babylon::Graphics::Device> g_graphics{};
26+
std::unique_ptr<Babylon::Graphics::DeviceUpdate> g_update{};
2727
std::unique_ptr<Babylon::Polyfills::Canvas> g_nativeCanvas{};
2828
}
2929

@@ -73,15 +73,15 @@ namespace BabylonNative
7373

7474
void UpdateView(WindowType window, size_t width, size_t height)
7575
{
76-
Babylon::WindowConfiguration windowConfig{};
76+
Babylon::Graphics::WindowConfiguration windowConfig{};
7777
windowConfig.Window = window;
7878
windowConfig.Width = width;
7979
windowConfig.Height = height;
8080

8181
if (!g_graphics)
8282
{
83-
g_graphics = Babylon::Graphics::CreateGraphics(windowConfig);
84-
g_update = std::make_unique<Babylon::Graphics::Update>(g_graphics->GetUpdate("update"));
83+
g_graphics = Babylon::Graphics::Device::Create(windowConfig);
84+
g_update = std::make_unique<Babylon::Graphics::DeviceUpdate>(g_graphics->GetUpdate("update"));
8585
}
8686
else
8787
{

0 commit comments

Comments
 (0)