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)); }
public void InitDisplayDeviceDriver() { QuartzDisplayDevice.Init(); }