cocos-engine
cocos-engine copied to clipboard
[3.8.2] Modify active of different canvas when previewing editor To switch rendering content, render residue appears
Cocos Creator version
3.8.2
System information
Windows10
Issue description
Modify active of different canvas when previewing editor To switch rendering content, render residue appears 编辑器预览时修改不同 canvas 的 active 用于切换渲染内容,会出现渲染残留
Relevant error log output
Steps to reproduce
https://github.com/cocos/cocos-engine/assets/35944775/f0e04296-f054-4e53-9866-26c8ee3b2730
Minimal reproduction project
for the camera which is not rendering, the
camera.window.swapchain is null.
The cameras have different
_window: RenderWindow.
It seems Editor will call
changeTargetWindow on the first active camera, with the swapchain 65538
For the 2nd enabled camera, the swapchain will remain 'null'.
Fixed in 3.8.4