Own Web legacy platform services explicitly

This commit is contained in:
2026-06-17 12:05:52 +02:00
parent 680452983f
commit e343557a3f
8 changed files with 57 additions and 117 deletions

View File

@@ -203,13 +203,14 @@ int main()
if (glfwInit() != GL_TRUE)
printf("Failed to init GLFW");
wnd = glfwCreateWindow(1024, 768, "PanoPainter", nullptr, nullptr);
g_web_platform_services = pp::platform::legacy::create_legacy_web_platform_services();
g_platform_services = pp::platform::legacy::create_platform_services({
.glfw_shell = {
.acquire_render_context = [wnd] { glfwMakeContextCurrent(wnd); },
.present_render_context = [wnd] { glfwSwapBuffers(wnd); },
},
.web_platform_services = g_web_platform_services.get(),
});
g_web_platform_services = pp::platform::legacy::create_legacy_web_platform_services();
glfwMakeContextCurrent(wnd);
/*