Esempio n. 1
0
        public void Render(CommandList cl, ISystemComponents systemComponents)
        {
            var framebuffer = systemComponents.Device.SwapchainFramebuffer;

            _drawStageModel.ClearDynamicDrawQueue();

            CalculateAndDraw((int)framebuffer.Width, (int)framebuffer.Height);

            _drawStageModel.Process();

            cl.SetFramebuffer(framebuffer);

            cl.ClearDepthStencil(1.0f);

            var surface = new GpuSurface
            {
                Type                  = GpuSurfaceType.SwapChainOutput,
                Framebuffer           = framebuffer,
                Texture               = null,
                TextureView           = null,
                ResourceSet_TexMirror = null,
                ResourceSet_TexWrap   = null
            };

            _drawStageRenderer.Render(cl, _drawStageModel, surface, _camera);
        }
Esempio n. 2
0
        public void DispatchToRenderStage(IDrawStageModel stage, CommandList cl, RenderCommandQueueItem command)
        {
            stage.Process();
            var surface = _surfaceManager.RetrieveSurface(command.Surface, new GpuSurfaceType[] { GpuSurfaceType.Texture, GpuSurfaceType.Internal });
            var camera  = _cameraManager.RetrieveCameraModel2D(command.Camera);

            _drawStageRenderer.Render(cl, stage, surface, camera);
        }