Esempio n. 1
0
        protected override void LoadContent()
        {
            this.camera   = new PerspectiveCamera(this.GraphicsDevice.Viewport);
            this.injector = new Injector(this);

            this.injector.Resolve <Content>().LoadContent(this.Content);

            this.spriteBatch    = this.injector.Resolve <SpriteBatch>();
            this.renderPipeline = this.injector.Resolve <DeferredRenderPipeline>();
            this.sceneSelector  = this.injector.Resolve <SceneSelector>();

            this.server   = this.injector.Resolve <Server>();
            this.client   = this.injector.Resolve <Client>();
            this.keyboard = this.injector.Resolve <UI.Input.KeyboardInput>();

            this.metricServer = this.injector.Resolve <IMetricServer>();
            this.metricServer.Start(7070);


            this.uiManager = this.injector.Resolve <UIManager>();
            this.uiManager.LoadState();


            if (this.uiManager.State.NetState.AutoStartServer)
            {
                this.server.Start(Server.DefaultServerPort);
            }

            if (this.uiManager.State.NetState.AutoStartClient)
            {
                this.client.Connect(new IPEndPoint(IPAddress.Loopback, Server.DefaultServerPort));
            }
        }
Esempio n. 2
0
        protected override void LoadContent()
        {
            this.camera   = new PerspectiveCamera(this.GraphicsDevice.Viewport);
            this.injector = new Injector(this);

            this.spriteBatch    = this.injector.Resolve <SpriteBatch>();
            this.renderPipeline = this.injector.Resolve <DeferredRenderPipeline>();
            this.sceneSelector  = this.injector.Resolve <SceneSelector>();
            this.uiManager      = this.injector.Resolve <UIManager>();

            this.metricServer = this.injector.Resolve <IMetricServer>();
            this.metricServer.Start(7070);
        }
Esempio n. 3
0
        public RenderTargetDescriber(DeferredRenderPipeline renderPipeline)
        {
            var gBuffer = renderPipeline.GetGBuffer();

            this.RenderTargets = new List <RenderTargetDescription>()
            {
                new RenderTargetDescription(gBuffer.DiffuseTarget, "diffuse", 0),
                new RenderTargetDescription(gBuffer.NormalTarget, "normal", 1),
                new RenderTargetDescription(gBuffer.ParticleTarget, "particle", 2),
                new RenderTargetDescription(gBuffer.DepthTarget, "depth", 3),
                new RenderTargetDescription(gBuffer.LightTarget, "light", 4),
                new RenderTargetDescription(gBuffer.BlurTarget, "blur", 5),
                new RenderTargetDescription(gBuffer.CombineTarget, "combine", 6),
                new RenderTargetDescription(gBuffer.FinalTarget, "final", 7),
            };
        }
Esempio n. 4
0
 public RenderingMenu(Editors editors, DeferredRenderPipeline renderPipeline)
 {
     this.Editors        = editors;
     this.RenderPipeline = renderPipeline;
 }