diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-30 02:48:31 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-08-30 02:48:31 +0400 |
commit | d4eeca430d4c7c540f55b2275de472389478c467 (patch) | |
tree | ffc305441563f8f26feea671917d85e29a218332 /intern | |
parent | f62fabca3d007bed3675a851be7c2cf6ed00b794 (diff) |
Adding support for enabling/disabling vsync to Ghost_SDL.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowSDL.cpp | 13 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowSDL.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_WindowSDL.cpp b/intern/ghost/intern/GHOST_WindowSDL.cpp index 47f41ea40a9..55f66ed08cc 100644 --- a/intern/ghost/intern/GHOST_WindowSDL.cpp +++ b/intern/ghost/intern/GHOST_WindowSDL.cpp @@ -638,3 +638,16 @@ GHOST_WindowSDL::setWindowCursorVisibility(bool visible) SDL_ShowCursor(visible); return GHOST_kSuccess; } + +GHOST_TSuccess +GHOST_WindowSDL::setSwapInterval(int interval) +{ + SDL_GL_SetSwapInterval(interval); + return GHOST_kSuccess; +} + +int +GHOST_WindowSDL::getSwapInterval() +{ + return SDL_GL_GetSwapInterval(); +} diff --git a/intern/ghost/intern/GHOST_WindowSDL.h b/intern/ghost/intern/GHOST_WindowSDL.h index 8260a318cea..0c11ce19b50 100644 --- a/intern/ghost/intern/GHOST_WindowSDL.h +++ b/intern/ghost/intern/GHOST_WindowSDL.h @@ -173,6 +173,8 @@ protected: GHOST_TSuccess endFullScreen() const { return GHOST_kFailure; } + GHOST_TSuccess setSwapInterval(int interval); + int getSwapInterval(); }; |