public void Draw(CanvasDrawingSession ds, Size sizeRender, float totalTimeSeconds) { //count++; //ds.DrawText(count.ToString(), new Vector2(10.0f, 10.0f), Colors.Red); SetupText(ds); ConfigureEffect(totalTimeSeconds); ds.DrawImage(composite, sizeRender.ToVector2() / 2); }
private void StartRendering(Size sizeSwapchain) { float ticks = 0; BurningTextExample fire = new BurningTextExample(); fire.CreateResources(); Task.Factory.StartNew(() => { while (true) { using (var ds = _swapchain.CreateDrawingSession(Colors.Transparent)) { // HACK - this should be time in seconds since animation start ticks += .016f; fire.Draw(ds, sizeSwapchain, ticks); } _swapchain.Present(); } }, TaskCreationOptions.LongRunning); }