Fix the crash of render texture scene on metal. (#8056)

This commit is contained in:
cary
2020-12-30 20:58:50 +08:00
committed by GitHub
parent cc84d2af46
commit fcbe208a9f
+5 -2
View File
@@ -400,12 +400,15 @@ export class Root {
}
legacyCC.director.emit(legacyCC.Director.EVENT_BEFORE_COMMIT);
const cameraList: Camera[] = [];
for (let i = 0; i < windows.length; i++) {
const window = windows[i];
const cameras = window.extractRenderCameras();
this._pipeline.render(cameras);
cameras.forEach((camera) => {
cameraList.push(camera);
});
}
this._pipeline.render(cameraList);
this._device.present();
}