hyades.Hyades.Draw C# (CSharp) Метод

Draw() публичный Метод

public Draw ( GraphicsDevice device ) : void
device GraphicsDevice
Результат void
        public void Draw(GraphicsDevice device)
        {
            PostProcessor postprocessor = PostProcessor.GetInstance(device);

            device.SetRenderTargets(postprocessor.color_rt, postprocessor.depth_rt);
            device.Clear(ClearOptions.Target | ClearOptions.DepthBuffer | ClearOptions.Stencil, Application.CLEAR_COLOR, 1.0f, 0);
            device.BlendState = BlendState.Opaque;
            device.DepthStencilState = DepthStencilState.Default;

            level.Draw3dEntities(device, camera);

            postprocessor.DepthOfField(postprocessor.color_rt, postprocessor.result_rt, postprocessor.depth_rt, camera, DepthOfFieldType.DiscBlur, player.position.Z, 5, total_time);

            device.SetRenderTarget(postprocessor.color_rt);
            device.Clear(ClearOptions.Target, Application.CLEAR_COLOR, 1, 0);
            device.BlendState = BlendState.AlphaBlend;

            level.Draw2dEntities(device, camera);
            device.DepthStencilState = DepthStencilState.DepthRead;
            particlemanager.Draw(device, camera);
            device.DepthStencilState = DepthStencilState.Default;
            level.DrawBubbleReflections(device, camera);

            device.SetRenderTargets(postprocessor.result_rt);

            SpriteRenderer spriterenderer = SpriteRenderer.GetInstance(device);
            spriterenderer.Begin(null);
            spriterenderer.Add(new TextureRegion(postprocessor.color_rt, 0, 0, postprocessor.color_rt.Width, postprocessor.color_rt.Height), Color.White, 0, 0, postprocessor.color_rt.Width, postprocessor.color_rt.Height, 0);
            spriterenderer.End();
        }