Exemple #1
0
        private static void Update()
        {
            if (synced == false)
            {
                float syncTime = Time.realtimeSinceStartup + .03f;//Try to maintain 30fps til synced...
                while (synced == false)
                {
                    if (Time.realtimeSinceStartup >= syncTime)
                    {
                        break;
                    }
                    StepSync();
                }
                SceneView.lastActiveSceneView.Repaint();
            }
            else
            {
                SyncScene();

                if (BocsCyclesAPI.Cycles_image_ready())
                {
                    //Debug.Log("UPDATE RENDER " + BocsCyclesAPI.cycles_progress());
                    GL.IssuePluginEvent(BocsCyclesAPI.GetRenderEventFunc(), 1);
                    SceneView.lastActiveSceneView.Repaint();
                    waitForNextFrame = false;
                }
            }
        }