public static void RedirectDrawable(Drawable d) { uint xid = GdkUtils.GetXid(d); Log.DebugFormat("xid = {0} d.handle = {1}, d.Display.Handle = {2}", xid, d.Handle, d.Display.Handle); XCompositeRedirectWindow(GdkUtils.GetXDisplay(d.Display), GdkUtils.GetXid(d), CompositeRedirect.Manual); }
public static void RedirectDrawable(Drawable d) { uint xid = GdkUtils.GetXid(d); Log.Debug($"xid = {xid} d.handle = {d.Handle}, d.Display.Handle = {d.Display.Handle}"); XCompositeRedirectWindow(GdkUtils.GetXDisplay(d.Display), GdkUtils.GetXid(d), CompositeRedirect.Manual); }
public Context(Gdk.Screen screen, Context share_list, int [] attr) { IntPtr xdisplay = GdkUtils.GetXDisplay(screen.Display); IntPtr visual_info = IntPtr.Zero; // Be careful about the first glx call and handle the exception // with more grace. try { visual_info = glXChooseVisual(xdisplay, screen.Number, attr); } catch (DllNotFoundException e) { throw new GlxException("Unable to find OpenGL libarary", e); } catch (EntryPointNotFoundException enf) { throw new GlxException("Unable to find Glx entry point", enf); } if (visual_info == IntPtr.Zero) { throw new GlxException("Unable to find matching visual"); } XVisualInfo xinfo = (XVisualInfo)Marshal.PtrToStructure(visual_info, typeof(XVisualInfo)); HandleRef share = share_list != null ? share_list.Handle : new HandleRef(null, IntPtr.Zero); IntPtr tmp = glXCreateContext(xdisplay, visual_info, share, true); if (tmp == IntPtr.Zero) { throw new GlxException("Unable to create context"); } handle = new HandleRef(this, tmp); visual = GdkUtils.LookupVisual(screen, xinfo.visualid); if (visual_info != IntPtr.Zero) { XFree(visual_info); } }
public Gdk.Colormap GetColormap(Gdk.Screen screen, ) { DrawableFormat template = new DrawableFormat(); template.Color = new ColorFormat(); FormatMask mask = FormatMask.None; int num = screen.Number; IntPtr dformat = GlitzAPI.glitz_glx_find_window_format(GdkUtils.GetXDisplay(screen.Display), num, mask, ref template, 0); visual_info = GlitzAPI.glitz_glx_get_visual_info_from_format(dpy, scr, dformat); Gdk.Visual visual = new Gdk.Visual(gdkx_visual_get(XVisualIDFromVisual(vinfo))); new Gdk.Colormap(visual, true); * / }
public void SwapBuffers(Gdk.Drawable drawable) { glXSwapBuffers(GdkUtils.GetXDisplay(drawable.Display), GdkUtils.GetXid(drawable)); }
public bool MakeCurrent(Gdk.Drawable drawable) { return(glXMakeCurrent(GdkUtils.GetXDisplay(drawable.Display), GdkUtils.GetXid(drawable), Handle)); }
public void Destroy() { glXDestroyContext(GdkUtils.GetXDisplay(visual.Screen.Display), Handle); }