private void StartUp()
        {
#if !UNITY_EDITOR
            m_NativeRenderring = new NativeRenderring();
            m_NativeRenderring.Create();

            StartCoroutine(RenderCoroutine());
#endif
            GL.IssuePluginEvent(RenderThreadHandlePtr, STARTNATIVERENDEREVENT);
        }
Example #2
0
        private void StartUp()
        {
            leftCamera.enabled  = true;
            rightCamera.enabled = true;
#if !UNITY_EDITOR
            m_NativeRenderring = new NativeRenderring();
            m_NativeRenderring.Create();
#if !UNITY_STANDALONE_WIN
            m_NativeRenderring.InitColorSpace();
#endif

            StartCoroutine(RenderCoroutine());
#endif
            m_CurrentState = RendererState.Running;
            GL.IssuePluginEvent(RenderThreadHandlePtr, STARTNATIVERENDEREVENT);
        }
Example #3
0
        private IEnumerator StartUp()
        {
            var virtualDisplay = GameObject.FindObjectOfType <NRVirtualDisplayer>();

            while (virtualDisplay == null || !virtualDisplay.IsPlaying)
            {
                NRDebugger.Log("[NRRender] Wait virtual display ready...");
                yield return(new WaitForEndOfFrame());

                if (virtualDisplay == null)
                {
                    virtualDisplay = GameObject.FindObjectOfType <NRVirtualDisplayer>();
                }
            }

            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            NRDebugger.Log("[NRRender] StartUp");
            CreateRenderTextures();

            leftCamera.enabled  = true;
            rightCamera.enabled = true;
#if !UNITY_EDITOR
            m_NativeRenderring = new NativeRenderring();
            m_NativeRenderring.Create();
#if !UNITY_STANDALONE_WIN
            m_NativeRenderring.InitColorSpace();
#endif
            StartCoroutine(RenderCoroutine());
#endif
            m_CurrentState = RendererState.Running;
            GL.IssuePluginEvent(RenderThreadHandlePtr, STARTNATIVERENDEREVENT);
        }