Changed framework to only render frames when dirty.