Esempio n. 1
0
        static CVReturn OutputCallback(IntPtr displayLink, ref CVTimeStamp inNow, ref CVTimeStamp inOutputTime, CVOptionFlags flagsIn, ref CVOptionFlags flagsOut, IntPtr displayLinkContext)
        {
            GCHandle callbackHandle        = GCHandle.FromIntPtr(displayLinkContext);
            DisplayLinkOutputCallback func = (DisplayLinkOutputCallback)callbackHandle.Target;
            CVDisplayLink             delegateDisplayLink = new CVDisplayLink(displayLink, false);

            return(func(delegateDisplayLink, ref inNow, ref inOutputTime, flagsIn, ref flagsOut));
        }
Esempio n. 2
0
        // Private Callback function for CVDisplayLink
        private CVReturn MyDisplayLinkOutputCallback(CVDisplayLink displayLink, ref CVTimeStamp inNow, ref CVTimeStamp inOutputTime, CVOptionFlags flagsIn, ref CVOptionFlags flagsOut)
        {
            //CVReturn result = GetFrameForTime (inOutputTime);
            CVReturn result = CVReturn.Error;

            // There is no autorelease pool when this method is called because it will be called from a background thread
            // It's important to create one or you will leak objects
            using (NSAutoreleasePool pool = new NSAutoreleasePool ()) {
                // Update the animation
                BeginInvokeOnMainThread (RenderScene);
                result = CVReturn.Success;
            }

            return result;
        }
Esempio n. 3
0
		static CVReturn OutputCallback (IntPtr displayLink, ref CVTimeStamp inNow, ref CVTimeStamp inOutputTime, CVOptionFlags flagsIn, ref CVOptionFlags flagsOut, IntPtr displayLinkContext)
		{
			GCHandle callbackHandle = GCHandle.FromIntPtr (displayLinkContext);
			DisplayLinkOutputCallback func = (DisplayLinkOutputCallback) callbackHandle.Target;
			CVDisplayLink delegateDisplayLink = new CVDisplayLink(displayLink, false);
			return func (delegateDisplayLink, ref inNow, ref inOutputTime, flagsIn, ref flagsOut);
		}
Esempio n. 4
0
		public CVReturn GetCurrentTime (out CVTimeStamp outTime)
		{
			CVReturn ret = CVDisplayLinkGetCurrentTime (this.Handle, out outTime);
				
			return ret;
		}
Esempio n. 5
0
		extern static CVReturn CVDisplayLinkGetCurrentTime (IntPtr displayLink, out CVTimeStamp outTime);
Esempio n. 6
0
        public CVReturn GetCurrentTime(out CVTimeStamp outTime)
        {
            CVReturn ret = CVDisplayLinkGetCurrentTime(this.Handle, out outTime);

            return(ret);
        }
Esempio n. 7
0
 extern static CVReturn CVDisplayLinkGetCurrentTime(IntPtr displayLink, out CVTimeStamp outTime);