Exemplo n.º 1
0
        private IntPtr GetQuartzDevice(CarbonWindowInfo carbonWindow)
        {
            IntPtr windowRef = carbonWindow.WindowRef;

            if (!CarbonGLNative.WindowRefs.ContainsKey(windowRef))
            {
                return(IntPtr.Zero);
            }

            WeakReference nativeRef = CarbonGLNative.WindowRefs[windowRef];

            if (!nativeRef.IsAlive)
            {
                return(IntPtr.Zero);
            }

            CarbonGLNative window = nativeRef.Target as CarbonGLNative;

            if (window == null)
            {
                return(IntPtr.Zero);
            }

            return(QuartzDisplayDevice.HandleTo(window.TargetDisplayDevice));
        }
Exemplo n.º 2
0
 public void InitDisplayDeviceDriver()
 {
     QuartzDisplayDevice.Init();
 }