Esempio n. 1
0
        private void Blit(DrawDevice device, BatchInfo source, RenderTarget target, Vector2 targetSize, Rect viewportRect)
        {
            device.Target       = target;
            device.TargetSize   = targetSize;
            device.ViewportRect = viewportRect;

            device.PrepareForDrawcalls();
            device.AddFullscreenQuad(source, TargetResize.Stretch);
            device.Render();
        }
Esempio n. 2
0
        public static void Blit(this RenderSetup renderSetup, DrawDevice device, BatchInfo source, Rect screenRect)
        {
            device.Target       = null;
            device.TargetSize   = screenRect.Size;
            device.ViewportRect = screenRect;

            device.PrepareForDrawcalls();
            device.AddFullscreenQuad(source, TargetResize.Stretch);
            device.Render();
        }
Esempio n. 3
0
 /// <summary>
 /// Called to process the specified <see cref="RenderStep"/>.
 /// </summary>
 /// <param name="step"></param>
 /// <param name="drawDevice"></param>
 protected virtual void OnRenderSingleStep(RenderStep step, Scene scene, DrawDevice drawDevice)
 {
     drawDevice.PrepareForDrawcalls();
     if (step.Input == null)
     {
         this.CollectDrawcalls(step, scene, drawDevice);
     }
     else
     {
         drawDevice.AddFullscreenQuad(step.Input, step.InputResize);
     }
     drawDevice.Render();
 }