Own legacy platform services on Web and Android

This commit is contained in:
2026-06-17 10:11:21 +02:00
parent c225529cbf
commit 2cb7046a56
4 changed files with 16 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ App app;
GLFWwindow* wnd;
float theta = 0;
glm::vec2 g_cursor_pos;
std::unique_ptr<pp::platform::PlatformServices> g_platform_services;
template<typename F>
class TaskCallback
@@ -120,7 +121,7 @@ void StartApp()
{
App::I = &app;
pp::platform::legacy::set_legacy_glfw_window(wnd);
app.set_platform_services(&pp::platform::legacy::platform_services());
app.set_platform_services(g_platform_services.get());
app.initLog();
app.create();
app.width = 1024;
@@ -197,6 +198,8 @@ void main_loop()
int main()
{
g_platform_services = pp::platform::legacy::create_platform_services();
if (glfwInit() != GL_TRUE)
printf("Failed to init GLFW");
wnd = glfwCreateWindow(1024, 768, "PanoPainter", nullptr, nullptr);