Exemplo n.º 1
0
        private void drawNextTree()
        {
            tess.BatchSize = 0;
            tess.Clear();

            tess.WarpTo(playground.ActualWidth / 2, playground.ActualHeight - 10);
            tess.Heading = -90;

            drawTree(7, theta, playground.ActualHeight - 10);

            theta += 2;
            tess.FlushToPlayground();

            if (++frameCounter % 20 == 0)
            {
                TimeSpan ts   = DateTime.Now.Subtract(t0);
                double   rate = frameCounter / ts.TotalSeconds;
                frameCounter = 0;
                //   this.Title = String.Format("Frame rate = {0}", rate);
                t0 = DateTime.Now;
            }
        }