|
@@ -21528,9 +21528,21 @@ function WebVRManager( renderer ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
- this.submitFrame = function () {
|
|
|
+ this.submitFrame = function ( scene, camera ) {
|
|
|
|
|
|
- if ( isPresenting() ) device.submitFrame();
|
|
|
+ if ( isPresenting() ) {
|
|
|
+
|
|
|
+ device.submitFrame();
|
|
|
+
|
|
|
+ if ( device.capabilities.hasExternalDisplay ) {
|
|
|
+
|
|
|
+ scope.enabled = false;
|
|
|
+ renderer.render( scene, camera );
|
|
|
+ scope.enabled = true;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
};
|
|
|
|
|
@@ -21951,6 +21963,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
// frustum
|
|
|
|
|
|
+ _camera = null,
|
|
|
_frustum = new Frustum(),
|
|
|
|
|
|
// clipping
|
|
@@ -22835,6 +22848,7 @@ function WebGLRenderer( parameters ) {
|
|
|
_currentGeometryProgram.wireframe = false;
|
|
|
_currentMaterialId = - 1;
|
|
|
_currentCamera = null;
|
|
|
+ _camera = camera;
|
|
|
|
|
|
// update scene graph
|
|
|
|
|
@@ -22916,12 +22930,7 @@ 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 );
|
|
|
|
|
|
}
|
|
@@ -22946,7 +22955,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
if ( vr.enabled ) {
|
|
|
|
|
|
- vr.submitFrame();
|
|
|
+ vr.submitFrame( scene, _camera );
|
|
|
|
|
|
}
|
|
|
|