eglSwapInterval.3G - Man Page

specifies the minimum number of video frame periods per buffer swap for the window associated with the current context​.

C Specification

EGLBoolean eglSwapInterval(EGLDisplay display, EGLint interval);

Parameters

display

Specifies the EGL display connection​.

interval

Specifies the minimum number of video frames that are displayed before a buffer swap will occur​.

Description

The interval takes effect when eglSwapBuffers() is first called subsequent to the eglSwapInterval call​.

The interval specified by the function applies to the draw surface bound to the context that is current on the calling thread​.

If interval is set to a value of 0, buffer swaps are not synchronized to a video frame, and the swap happens as soon as the render is complete​. interval is silently clamped to minimum and maximum implementation dependent valuesbefore being stored; these values are defined by EGLConfig attributes EGL_MIN_SWAP_INTERVAL and EGL_MAX_SWAP_INTERVAL respectively​.

Notes

The swap interval has no effect on eglCopyBuffers()​.

The default swap interval is 1​.

Errors

EGL_FALSE is returned on failure, EGL_TRUE otherwise​.

EGL_BAD_CONTEXT is generated if there is no current context on the calling thread​.

EGL_BAD_SURFACE is generated if there is no surface bound to the current context​.

See Also

eglSwapBuffers()

Notes

1.

[set $man.base.url.for.relative.links]/KhronosLogo.jpg

Info

11/15/2026 EGL Reference Pages