Beispiel #1
0
        private void UpdateProfilerInfo()
        {
#if (OBI_ONI_SUPPORTED)
            frameCounter--;
            if (frameCounter <= 0)
            {
                int count = Oni.GetProfilingInfoCount();
                info = new Oni.ProfileInfo[count];
                Oni.GetProfilingInfo(info, count);

                frameCounter = profileThrottle;

                // Calculate frame duration:
                frameStart = double.MaxValue;
                frameEnd   = double.MinValue;
                foreach (Oni.ProfileInfo i in info)
                {
                    frameStart = Math.Min(frameStart, i.start);
                    frameEnd   = Math.Max(frameEnd, i.end);
                }
            }

            Oni.ClearProfiler();
#endif
        }