init method

void init(
  1. WebGLRenderer renderer,
  2. XRWebGLDepthInformation depthData,
  3. XRRenderState renderState
)

Implementation

void init(WebGLRenderer renderer, XRWebGLDepthInformation depthData, XRRenderState renderState ) {
	if (texture == null ) {
		final texture = Texture();

		final texProps = renderer.properties.get( texture );
		texProps['__webglTexture'] = depthData.texture;

		if ( ( depthData.depthNear != renderState.depthNear ) || ( depthData.depthFar != renderState.depthFar ) ) {
			depthNear = depthData.depthNear;
			depthFar = depthData.depthFar;
		}

		this.texture = texture;
	}
}