示例#1
0
        public static void execute() // executes the pipeline
        {
            if (win == null) return;

            Graphics.frame_index++;

            render_target = win;

            win.Clear(familiarize_color(back_color));

            Statistics.sprites_drawn = 0;
            Statistics.sprites_discarded = 0;

            Pipeline.execute();

            win.Display();

            if (screenshot_signal)
            {
                bool found = false; int ctr = 0; string path = "";
                while (!found)
                {
                    path = XF.Application.root_path +  "screenshot" + ctr + ".png";
                    found = !System.IO.File.Exists(path);
                    ctr++;
                }

                SFML.Graphics.Image screenshot = new SFML.Graphics.Image(screen_w, screen_h);
                screenshot.CopyScreen(win) ;
                screenshot.SaveToFile(path);

                screenshot_signal = false;
            }

        }