/// <summary> /// Control the the buffers swap of a device. /// </summary> /// <param name="interval"> /// A <see cref="System.Int32"/> that specifies the minimum number of video frames that are displayed /// before a buffer swap will occur. /// </param> /// <returns> /// It returns a boolean value indicating whether the operation was successful. /// </returns> public override bool SwapInterval(int interval) { // Keep into account the SwapIntervalEXT and SwapIntervalSGI entry points, relative to // two equivalent GLX extensions #if false using (Glx.XLock displayLock = new Glx.XLock(Display)) { if (Glx.Delegates.pglXSwapIntervalEXT != null) { Glx.SwapIntervalEXT(Display, _WindowHandle, interval); return(true); } else if (Glx.Delegates.pglXSwapIntervalSGI != null) { return(Glx.SwapIntervalSGI(interval) == 0); } else { throw new InvalidOperationException("binding point SwapInterval{EXT|SGI} cannot be found"); } } #else return(false); #endif }