コード例 #1
0
ファイル: Startup.cs プロジェクト: tobiasterstad/space
        public void Configure(
            IApplicationBuilder app,
            SamplePositions sampleDataInitializer,
            ILoggerFactory loggerfactory)
        {
            loggerfactory.AddConsole(minLevel: LogLevel.Verbose);

            app.UseDeveloperExceptionPage();

            app.UseMvc();

            sampleDataInitializer.InitializeData();
        }
コード例 #2
0
        public void Drawn(Microsoft.Xna.Framework.GameTime gt, SceneControl.IObject obj, Cameras.ICamera cam, IList <Light.ILight> lights, SceneControl.RenderHelper render)
        {
            if (SamplePositions != null)
            {
                for (int i = 0; i < SamplePositions.Count(); i++)
                {
                    render.SetSamplerState(SamplerState[i], SamplePositions[i]);
                    samplers[SamplePositions[i]] = SamplerState[i];
                }
            }

            if (BlendState != null)
            {
                render.PushBlendState(BlendState);
            }
            if (RasterizerState != null)
            {
                render.PushRasterizerState(RasterizerState);
            }
            material.Drawn(gt, obj, cam, lights, render);

            if (RasterizerState != null)
            {
                render.PopRasterizerState();
            }
            if (BlendState != null)
            {
                render.PopBlendState();
            }

            if (SamplePositions != null)
            {
                for (int i = 0; i < SamplePositions.Count(); i++)
                {
                    render.SetSamplerState(samplers[SamplePositions[i]], SamplePositions[i]);
                }
            }
        }