Пример #1
0
        public Game()
        {
            Graphics = new GraphicsDeviceManager(this);
            Graphics.PreferredDepthStencilFormat    = DepthFormat.None;
            Graphics.PreferredBackBufferWidth       = Width;
            Graphics.PreferredBackBufferHeight      = Height;
            Graphics.PreferMultiSampling            = false;
            Graphics.SynchronizeWithVerticalRetrace = true;

            IsFixedTimeStep       = false;
            Content.RootDirectory = "Content";

            ParallelUpdater = new ParallelInvoker <UpdateArgs>(
                this, ParallelUpdateOrbs, ThreadedUpdate
                );
            ParallelDrawer = new ParallelInvoker <DrawArgs>(
                this, ParallelPrepareOrbs, ThreadedPaint
                );
        }
Пример #2
0
        public Game()
        {
            Graphics = new GraphicsDeviceManager(this);
            Graphics.PreferredDepthStencilFormat    = DepthFormat.None;
            Graphics.PreferredBackBufferWidth       = Width;
            Graphics.PreferredBackBufferHeight      = Height;
            Graphics.PreferMultiSampling            = false;
            Graphics.SynchronizeWithVerticalRetrace = true;

            UseThreadedDraw       = ThreadedPaint;
            IsFixedTimeStep       = false;
            Content.RootDirectory = "Content";

#if XBOX
            Components.Add(new KiloWatt.Runtime.Support.ThreadPoolComponent(this));
#endif

            ParallelUpdater = new ParallelInvoker <UpdateArgs>(
                this, ParallelUpdateOrbs, ThreadedUpdate
                );
            ParallelDrawer = new ParallelInvoker <DrawArgs>(
                this, ParallelPrepareOrbs, ThreadedPaint
                );
        }