| 843 | } |
| 844 | |
| 845 | arcana::task<std::shared_ptr<System::Session>, std::exception_ptr> System::Session::CreateAsync(System& system, void* graphicsDevice) |
| 846 | { |
| 847 | // First perform the ARCore installation check, request install if not yet installed. |
| 848 | return CheckAndInstallARCoreAsync().then(arcana::inline_scheduler, arcana::cancellation::none(), []() |
| 849 | { |
| 850 | // Next check for camera permissions, and request if not already granted. |
| 851 | return CheckCameraPermissionAsync(); |
| 852 | }).then(arcana::inline_scheduler, arcana::cancellation::none(), [&system, graphicsDevice]() |
| 853 | { |
| 854 | // Finally if the previous two tasks succeed, start the AR session. |
| 855 | return std::make_shared<System::Session>(system, graphicsDevice); |
| 856 | }); |
| 857 | } |
| 858 | |
| 859 | System::Session::Session(System& system, void* graphicsDevice) |
| 860 | : m_impl{ std::make_unique<System::Session::Impl>(*system.m_impl, graphicsDevice) } |
nothing calls this directly
no test coverage detected