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);
}