eglSwapInterval

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

Copyright © 2003-2014 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.