fix:xr right eye render failed when using custom render pipeline (#15319)

This commit is contained in:
oahc09
2023-06-06 18:46:16 +08:00
committed by GitHub
parent 0d6deb2c86
commit f54865e23d
+3 -1
View File
@@ -561,7 +561,9 @@ void Root::doXRFrameMove(int32_t totalFrames) {
if (_xr->isRenderAllowable()) {
bool isSceneUpdated = false;
int viewCount = _xr->getXRConfig(xr::XRConfigKey::VIEW_COUNT).getInt();
bool forceUpdateSceneTwice = _xr->getXRConfig(xr::XRConfigKey::EYE_RENDER_JS_CALLBACK).getBool();
// compatible native pipeline
static bool isNativePipeline = dynamic_cast<cc::render::NativePipeline*>(_pipelineRuntime.get()) != nullptr;
bool forceUpdateSceneTwice = isNativePipeline ? true : _xr->getXRConfig(xr::XRConfigKey::EYE_RENDER_JS_CALLBACK).getBool();
for (int xrEye = 0; xrEye < viewCount; xrEye++) {
_xr->beginRenderEyeFrame(xrEye);