private CVReturn GetFrameForTime(ref CVTimeStamp outputTime) { using (NSAutoreleasePool pool = new NSAutoreleasePool ()) { double current = DateTime.Now.TimeOfDay.TotalMilliseconds; this.controller.Scene.AdvanceTimeBy ((float)(current - controller.RenderTime)); this.controller.RenderTime = current; this.DrawView (); } return CVReturn.kCVReturnSuccess; }
private static CVReturn MyDisplayLinkCallback(IntPtr displayLink, ref CVTimeStamp inNow, ref CVTimeStamp inOutputTime, CVOptionFlags flagsIn, ref CVOptionFlags flagsOut, IntPtr context) { //Console.WriteLine("MyDisplayLinkCallback " + inOutputTime.videoTime); MyOpenGLView view = ObjectiveCRuntime.GetInstance<MyOpenGLView> (context); return view.GetFrameForTime (ref inOutputTime); }