We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42313e2 commit 162d363Copy full SHA for 162d363
src/platform/graphics/webgl/webgl-graphics-device.js
@@ -346,8 +346,8 @@ class WebglGraphicsDevice extends GraphicsDevice {
346
347
this._contextRestoredHandler = () => {
348
Debug.log('pc.GraphicsDevice: WebGL context restored.');
349
- this.restoreContext();
350
this.contextLost = false;
+ this.restoreContext();
351
this.fire('devicerestored');
352
};
353
@@ -1165,6 +1165,10 @@ class WebglGraphicsDevice extends GraphicsDevice {
1165
* @ignore
1166
*/
1167
loseContext() {
1168
+
1169
+ // force the backbuffer to be recreated on restore
1170
+ this.backBufferSize.set(-1, -1);
1171
1172
// release shaders
1173
for (const shader of this.shaders) {
1174
shader.loseContext();
0 commit comments