public void MakeCurrent(IntPtr xid) { if (!Glx.MakeContextCurrent(_x11.Display, xid, xid, Handle)) { throw new OpenGlException("glXMakeContextCurrent failed "); } }
public void Dispose() { Glx.DestroyContext(_x11.Display, Handle); if (_ownsPBuffer) { Glx.DestroyPbuffer(_x11.Display, _defaultXid); } }
public void Dispose() { _context.Display.GlInterface.Flush(); Glx.GlxWaitGL(); _context.Display.SwapBuffers(_info.Handle); Glx.GlxWaitX(); _context.Display.ClearContext(); _lock.Dispose(); }
public IDisposable MakeCurrent(IntPtr xid) { var old = new RestoreContext(Glx, _x11.Display); if (!Glx.MakeContextCurrent(_x11.Display, xid, xid, Handle)) { throw new OpenGlException("glXMakeContextCurrent failed "); } return(old); }
public IDisposable MakeCurrent(IntPtr xid) { Monitor.Enter(_lock); var success = false; try { var old = new RestoreContext(Glx, _x11.Display, _lock); if (!Glx.MakeContextCurrent(_x11.Display, xid, xid, Handle)) { throw new OpenGlException("glXMakeContextCurrent failed "); } success = true; return(old); } finally { if (!success) { Monitor.Exit(_lock); } } }