diff --git a/core/platform/GLView.h b/core/platform/GLView.h index e9e67fbf6fa3..9e3958f31e5c 100644 --- a/core/platform/GLView.h +++ b/core/platform/GLView.h @@ -88,7 +88,7 @@ struct GLContextAttrs int multisamplingCount; bool visible = true; bool decorated = true; - bool vsync = false; + bool vsync = true; #if defined(_WIN32) void* viewParent = nullptr; #endif diff --git a/templates/cpp/Source/AppDelegate.cpp b/templates/cpp/Source/AppDelegate.cpp index a7dc979f8fe0..8a819df06163 100644 --- a/templates/cpp/Source/AppDelegate.cpp +++ b/templates/cpp/Source/AppDelegate.cpp @@ -46,6 +46,8 @@ void AppDelegate::initGLContextAttrs() { // set OpenGL context attributes: red,green,blue,alpha,depth,stencil,multisamplesCount GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8, 0}; + // since axmol-2.2 vsync was enabled in engine by default + // glContextAttrs.vsync = false; GLView::setGLContextAttrs(glContextAttrs); } diff --git a/templates/lua/Source/AppDelegate.cpp b/templates/lua/Source/AppDelegate.cpp index 6c2bb2a87d89..abfc8c6ee7e5 100644 --- a/templates/lua/Source/AppDelegate.cpp +++ b/templates/lua/Source/AppDelegate.cpp @@ -46,7 +46,7 @@ void AppDelegate::initGLContextAttrs() { // set OpenGL context attributes: red,green,blue,alpha,depth,stencil,multisamplesCount GLContextAttrs glContextAttrs = {8, 8, 8, 8, 24, 8, 0}; - + // glContextAttrs.vsync = false GLView::setGLContextAttrs(glContextAttrs); }