Example #1
0
 protected override void OnRelease()
 {
     ProcessedTexture = null;
     Objects.Clear();
     PostProcessingActions = null;
     Material                = null;
     SourceTextureBuffer     = null;
     FirstTemporaryBuffer    = null;
     SecondTemporaryBuffer   = null;
     ColorCorrectionBuffer   = null;
     ColorCorrectionMaterial = null;
     BlurBuffer              = null;
     BlurMaterial            = null;
     BloomBuffer             = null;
     BloomMaterial           = null;
     DistortionBuffer        = null;
     DistortionMaterial      = null;
     SharpenBuffer           = null;
     SharpenMaterial         = null;
     NoiseBuffer             = null;
     NoiseTexture            = null;
     NoiseMaterial           = null;
     FXAABuffer              = null;
     FXAAMaterial            = null;
     VignetteMaterial        = null;
     TransparentTexture      = null;
     AlphaDiffuseMaterial    = null;
     AddDiffuseMaterial      = null;
     OpaqueDiffuseMaterial   = null;
 }
Example #2
0
        public void Generate(int frame, Action <ITexture> callback)
        {
            var sceneSize = sceneViewFrame.Size;
            var thumbSize = new Vector2(200);

            if (sceneSize.X > sceneSize.Y)
            {
                thumbSize.Y *= sceneSize.Y / sceneSize.X;
            }
            else
            {
                thumbSize.X *= sceneSize.X / sceneSize.Y;
            }
            var ap             = new AnimationPositioner();
            var savedTime      = document.Animation.Time;
            var savedIsRunning = Document.Current.Animation.IsRunning;

            renderChain.Clear();
            ap.SetAnimationFrame(document.Animation, frame, stopAnimations: true);
            sceneViewFrame.RenderChainBuilder?.AddToRenderChain(renderChain);
            renderList.Clear();
            renderChain.GetRenderObjects(renderList);
            ap.SetAnimationTime(document.Animation, savedTime, stopAnimations: true);
            Document.Current.Animation.IsRunning = savedIsRunning;
            Window.Current.InvokeOnRendering(() => RenderThumbnail(callback));
        }
Example #3
0
 public static void Render(this RenderChain renderChain)
 {
     if (renderObjects == null)
     {
         renderObjects = new RenderObjectList();
     }
     try {
         renderChain.GetRenderObjects(renderObjects);
         renderObjects.Render();
     } finally {
         renderObjects.Clear();
     }
 }
Example #4
0
 protected override void OnRelease()
 {
     SceneObjects.Clear();
     base.OnRelease();
 }
Example #5
0
 public void SetRenderChain(RenderChain renderChain)
 {
     renderObjects.Clear();
     renderChain.GetRenderObjects(renderObjects);
 }
Example #6
0
 protected override void OnRelease()
 {
     Objects.Clear();
 }