Пример #1
0
        static void Main(string[] args)
        {
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));

            var supported = Device.GetSupportedFeatureLevel();
            Console.WriteLine("device supported {0}", supported);

            if (supported < SharpDX.Direct3D.FeatureLevel.Level_10_0)
            return;

            TSOConfig tso_config;

            string tso_config_file = Path.Combine(Application.StartupPath, @"config.xml");
            if (File.Exists(tso_config_file))
            tso_config = TSOConfig.Load(tso_config_file);
            else
            tso_config = new TSOConfig();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new TSOForm(tso_config, args));

            TSOForm form = new TSOForm(tso_config, args);

            form.Show();
            using (RenderLoop loop = new RenderLoop(form))
            {
            while (loop.NextFrame())
            {
                form.FrameMove();
            }
            }
        }
Пример #2
0
        static void Main(string[] args)
        {
            Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));

            var supported = Device.GetSupportedFeatureLevel();

            Console.WriteLine("device supported {0}", supported);

            if (supported < SharpDX.Direct3D.FeatureLevel.Level_10_0)
            {
                return;
            }

            TSOConfig tso_config;

            string tso_config_file = Path.Combine(Application.StartupPath, @"config.xml");

            if (File.Exists(tso_config_file))
            {
                tso_config = TSOConfig.Load(tso_config_file);
            }
            else
            {
                tso_config = new TSOConfig();
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            TSOForm form = new TSOForm(tso_config, args);

            form.Show();
            using (RenderLoop loop = new RenderLoop(form))
            {
                while (loop.NextFrame())
                {
                    form.Render();
                }
            }
        }