/** * @brief Initialize the render pipleline. * * @param leftcamera Left Eye . * @param leftcamera Right Eye . * @param poseprovider provide the pose of camera every frame. */ public void Initialize(Camera leftcamera, Camera rightcamera, PoseProvideDelegage poseprovider) { if (m_IsInitialize || leftcamera == null || rightcamera == null) { return; } NRSessionManager.SetAppSettings(true); leftCamera = leftcamera; rightCamera = rightcamera; OnUpdatePose = poseprovider; #if !UNITY_EDITOR leftCamera.depthTextureMode = DepthTextureMode.Depth; rightCamera.depthTextureMode = DepthTextureMode.Depth; leftCamera.rect = new Rect(0, 0, 1, 1); rightCamera.rect = new Rect(0, 0, 1, 1); CreateRenderTextures(); m_IsInitialize = true; Invoke("StartUp", 0.5f); #endif }
/// <summary> /// Initialize the render pipleline. /// </summary> /// <param name="leftcamera">Left Eye.</param> /// <param name="rightcamera">Right Eye.</param> /// <param name="poseprovider">provide the pose of camera every frame.</param> public void Initialize(Camera leftcamera, Camera rightcamera, PoseProvideDelegage poseprovider) { if (m_CurrentState != RendererState.UnInitialized) { return; } NRSessionManager.SetAppSettings(true); leftCamera = leftcamera; rightCamera = rightcamera; OnUpdatePose = poseprovider; #if !UNITY_EDITOR leftCamera.depthTextureMode = DepthTextureMode.Depth; rightCamera.depthTextureMode = DepthTextureMode.Depth; leftCamera.rect = new Rect(0, 0, 1, 1); rightCamera.rect = new Rect(0, 0, 1, 1); leftCamera.enabled = false; rightCamera.enabled = false; CreateRenderTextures(); m_CurrentState = RendererState.Initialized; Invoke("StartUp", 0.3f); #endif }
/// <summary> /// Initialize the render pipleline. /// </summary> /// <param name="leftcamera">Left Eye.</param> /// <param name="rightcamera">Right Eye.</param> /// <param name="poseprovider">provide the pose of camera every frame.</param> public void Initialize(Camera leftcamera, Camera rightcamera) { NRDebugger.Log("[NRRender] Initialize"); if (m_CurrentState != RendererState.UnInitialized) { return; } NRSessionManager.SetAppSettings(true); leftCamera = leftcamera; rightCamera = rightcamera; #if !UNITY_EDITOR leftCamera.depthTextureMode = DepthTextureMode.Depth; rightCamera.depthTextureMode = DepthTextureMode.Depth; leftCamera.rect = new Rect(0, 0, 1, 1); rightCamera.rect = new Rect(0, 0, 1, 1); leftCamera.enabled = false; rightCamera.enabled = false; m_CurrentState = RendererState.Initialized; StartCoroutine(StartUp()); #endif }