# HG changeset patch # User Extrawurst # Date 1291924342 -3600 # Node ID a376e5d3eb00210658e2f9e6c58b8af0607a158e # Parent 131331ebb599dbb22a552fb9a4e89d5402dae544 option to enable/disable vsync diff -r 131331ebb599 -r a376e5d3eb00 trunk/tests/ChipmunkDemos/framework.d --- 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);