Skip to content

Commit

Permalink
IGL : Minor changes to OpenXR on Android.
Browse files Browse the repository at this point in the history
Reviewed By: pixelperfect3

Differential Revision: D49476247

fbshipit-source-id: cdbe8a7b5117f307957a49e97bb51b1a72e279d1
  • Loading branch information
trivedivivek authored and facebook-github-bot committed Sep 21, 2023
1 parent ffbaea1 commit 3a98ebd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions shell/openxr/mobile/AndroidMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,21 @@ void handleAppCmd(struct android_app* app, int32_t appCmd) {
#include "vulkan/XrAppImplVulkan.h"
#elif defined(USE_OPENGL_BACKEND)
#include "opengl/XrAppImplGLES.h"
// @fb-only
// @fb-only
#endif

XrInstance gInstance_;
XrInstance getXrInstance() {
return gInstance_;
}

// @fb-only
// @fb-only
// @fb-only
// @fb-only
// @fb-only

void android_main(struct android_app* app) {
JNIEnv* Env;
app->activity->vm->AttachCurrentThread(&Env, nullptr);
Expand All @@ -102,6 +110,9 @@ void android_main(struct android_app* app) {
auto xrApp = std::make_unique<XrApp>(std::make_unique<mobile::XrAppImplVulkan>());
#elif defined(USE_OPENGL_BACKEND)
auto xrApp = std::make_unique<XrApp>(std::make_unique<mobile::XrAppImplGLES>());
// @fb-only
// @fb-only
// @fb-only
#endif
if (!xrApp->initialize(app)) {
return;
Expand Down
3 changes: 3 additions & 0 deletions shell/openxr/src/XrSwapchainProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ bool XrSwapchainProvider::initialize() {
#if defined(__APPLE__)
selectedColorFormat_ = impl_->preferredColorFormat();
#endif
// @fb-only
// @fb-only
// @fb-only

colorSwapchain_ =
createXrSwapchain(XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT, selectedColorFormat_);
Expand Down

0 comments on commit 3a98ebd

Please sign in to comment.