pub unsafe extern "C" fn SDL_GL_SetSwapInterval(
    interval: c_int
) -> c_int
Expand description

Sets the swap interval of GL swaps.

  • 0 for immediate swapping.
  • 1 for standard vsync swapping.
  • -1 for adaptive vsync swapping.

Some systems will not support adaptive vsync but still support standard vsync.

Returns: 0 on success, -1 if setting the swap interval isn’t supported. Call SDL_GetErrorMsg for more.