Hello PlayCanvas Community.
First, this problem is derived from the question I posted earlier.
Black screen error in iframes when running on low-end PCs and laptops
To summarize.
I have downloaded the playcanvas build and configured a website that communicates through an iframe.
The problem is that on windows laptop and low end pc, playcanvas doesn’t load, just a black screen. If I resize the window, I can see the playcanvas scene looks fine.
I fixed the iframe loading speed and PlayCanvas loading timing issues, and also fixed the CSS aspect-ratio issue in the iframe area, but the black screen error is still there.
After the first loading, the screen appears black, but if you change the style.width value of the canvas element of the PlayCanvas by even 1px, the screen is displayed normally. Also, if I change the iframe’s area by even 1px, the screen looks fine.
I thought that simply calling resizeCanvas(width, height) or resizeCanvas(clientWidth, clientHeight) again would fix this, but it didn’t work.
On the mobile responsive screen, it resizes fine and when I return to the PC screen and change the canvas.style.width value of PlayCanvas to the original px, it goes back to black.
And you will see the following error in the console window.
[.WebGL-0000714011FACE00] GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomplete: Attachment has zero size.
Can anyone tell me how I can fix this problem?
I would really appreciate it if you could help me.
[1. Desktop Version]
[2. Mobile Version]