Mercurial > projects > chipmunkd
changeset 18:a376e5d3eb00
option to enable/disable vsync
author | Extrawurst |
---|---|
date | Thu, 09 Dec 2010 20:52:22 +0100 |
parents | 131331ebb599 |
children | eb61cc181345 |
files | trunk/tests/ChipmunkDemos/framework.d |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/tests/ChipmunkDemos/framework.d Thu Dec 09 01:51:30 2010 +0100 +++ b/trunk/tests/ChipmunkDemos/framework.d Thu Dec 09 20:52:22 2010 +0100 @@ -14,7 +14,7 @@ import std.string; import std.stdio; -void startup(string _title,int _width,int _height) +void startup(string _title,int _width,int _height,bool _disableVsync=true) { DerelictGL.load(); DerelictGLU.load(); @@ -39,6 +39,7 @@ SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 6); SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 5); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL,_disableVsync?0:1); // Set the window title SDL_WM_SetCaption(cast(char*)toStringz(_title), null);