File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -468,7 +468,6 @@ const WebGLRenderer = Class.create(/** @lends WebGLRenderer.prototype */ {
468468 } , false ) ;
469469 } ,
470470 _onContextLost ( e ) {
471- this . fire ( 'webglContextLost' ) ;
472471 const gl = this . gl ;
473472 this . _isContextLost = true ;
474473
@@ -483,13 +482,16 @@ const WebGLRenderer = Class.create(/** @lends WebGLRenderer.prototype */ {
483482
484483 this . _lastMaterial = null ;
485484 this . _lastProgram = null ;
485+
486+ this . fire ( 'webglContextLost' ) ;
486487 } ,
487488 _onContextRestore ( e ) { // eslint-disable-line no-unused-vars
488- this . fire ( 'webglContextRestored' ) ;
489489 const gl = this . gl ;
490490 this . _isContextLost = false ;
491491 extensions . reset ( gl ) ;
492492 Framebuffer . reset ( gl ) ;
493+
494+ this . fire ( 'webglContextRestored' ) ;
493495 } ,
494496 /**
495497 * 设置深度检测
You can’t perform that action at this time.
0 commit comments