Browse Source

Merge pull request #14744 from mrdoob/revert-14743-webvr

Revert "WebVRManager: Added device.capabilities.hasExternalDisplay support."
Mr.doob 7 years ago
parent
commit
6bc85fe1df
2 changed files with 8 additions and 17 deletions
  1. 6 3
      src/renderers/WebGLRenderer.js
  2. 2 14
      src/renderers/webvr/WebVRManager.js

+ 6 - 3
src/renderers/WebGLRenderer.js

@@ -159,7 +159,6 @@ function WebGLRenderer( parameters ) {
 
 		// frustum
 
-		_camera = null,
 		_frustum = new Frustum(),
 
 		// clipping
@@ -1044,7 +1043,6 @@ function WebGLRenderer( parameters ) {
 		_currentGeometryProgram.wireframe = false;
 		_currentMaterialId = - 1;
 		_currentCamera = null;
-		_camera = camera;
 
 		// update scene graph
 
@@ -1126,7 +1124,12 @@ function WebGLRenderer( parameters ) {
 
 		} else {
 
+			// opaque pass (front-to-back order)
+
 			if ( opaqueObjects.length ) renderObjects( opaqueObjects, scene, camera );
+
+			// transparent pass (back-to-front order)
+
 			if ( transparentObjects.length ) renderObjects( transparentObjects, scene, camera );
 
 		}
@@ -1151,7 +1154,7 @@ function WebGLRenderer( parameters ) {
 
 		if ( vr.enabled ) {
 
-			vr.submitFrame( scene, _camera );
+			vr.submitFrame();
 
 		}
 

+ 2 - 14
src/renderers/webvr/WebVRManager.js

@@ -356,21 +356,9 @@ function WebVRManager( renderer ) {
 
 	};
 
-	this.submitFrame = function ( scene, camera ) {
+	this.submitFrame = function () {
 
-		if ( isPresenting() ) {
-
-			device.submitFrame();
-
-			if ( device.capabilities.hasExternalDisplay ) {
-
-				scope.enabled = false;
-				renderer.render( scene, camera );
-				scope.enabled = true;
-
-			}
-
-		}
+		if ( isPresenting() ) device.submitFrame();
 
 	};