Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable vsync by default #2118

Merged
merged 3 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/platform/GLView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions templates/cpp/Source/AppDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion templates/lua/Source/AppDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down