public static void NewFrame() { NewFrameSanityCheck(); GlobalContext.IsInFrame = true; GlobalContext.FrameCount += 1; GlobalContext.ResetForNewFrame(); //Invalidate the current frame, as we are building a new one DrawData.Invalidate(); }