Browse Source

WebGLRenderer: Reassigning objects after context restore.

Mr.doob 8 years ago
parent
commit
b317394ef3
1 changed files with 14 additions and 14 deletions
  1. 14 14
      src/renderers/WebGLRenderer.js

+ 14 - 14
src/renderers/WebGLRenderer.js

@@ -183,6 +183,11 @@ function WebGLRenderer( parameters ) {
 
 
 	};
 	};
 
 
+	function getTargetPixelRatio() {
+
+		return _currentRenderTarget === null ? _pixelRatio : 1;
+
+	}
 
 
 	// initialize
 	// initialize
 
 
@@ -281,26 +286,21 @@ function WebGLRenderer( parameters ) {
 
 
 		_this.info.programs = programCache.programs;
 		_this.info.programs = programCache.programs;
 
 
+		_this.context = _gl;
+		_this.capabilities = capabilities;
+		_this.extensions = extensions;
+		_this.properties = properties;
+		_this.renderLists = renderLists;
+		_this.state = state;
+
 	}
 	}
 
 
 	initGLContext();
 	initGLContext();
 
 
-	var vr = new WebVRManager( _this );
+	// vr
 
 
-	//
-
-	function getTargetPixelRatio() {
-
-		return _currentRenderTarget === null ? _pixelRatio : 1;
-
-	}
+	var vr = new WebVRManager( _this );
 
 
-	this.context = _gl;
-	this.capabilities = capabilities;
-	this.extensions = extensions;
-	this.properties = properties;
-	this.renderLists = renderLists;
-	this.state = state;
 	this.vr = vr;
 	this.vr = vr;
 
 
 	// shadow map
 	// shadow map