|
@@ -137,15 +137,19 @@ function WebXRManager( renderer, gl ) {
|
|
|
session.addEventListener( 'squeezeend', onSessionEvent );
|
|
|
session.addEventListener( 'end', onSessionEnd );
|
|
|
|
|
|
+ var attributes = gl.getContextAttributes();
|
|
|
+
|
|
|
+ var layerInit = {
|
|
|
+ antialias: attributes.antialias,
|
|
|
+ alpha: attributes.alpha,
|
|
|
+ depth: attributes.depth,
|
|
|
+ stencil: attributes.stencil
|
|
|
+ };
|
|
|
+
|
|
|
// eslint-disable-next-line no-undef
|
|
|
- session.updateRenderState( { baseLayer: new XRWebGLLayer( session, gl,
|
|
|
- {
|
|
|
- antialias: gl.getContextAttributes().antialias,
|
|
|
- alpha: gl.getContextAttributes().alpha,
|
|
|
- depth: gl.getContextAttributes().depth,
|
|
|
- stencil: gl.getContextAttributes().stencil
|
|
|
- }
|
|
|
- ) } );
|
|
|
+ var baseLayer = new XRWebGLLayer( session, gl, layerInit );
|
|
|
+
|
|
|
+ session.updateRenderState( { baseLayer: baseLayer } );
|
|
|
|
|
|
session.requestReferenceSpace( referenceSpaceType ).then( onRequestReferenceSpace );
|
|
|
|