Skip to content

Commit b255ca0

Browse files
committed
Set swap interval to 0
FPS can't be limited until rendering is refactored.
1 parent 688bb9d commit b255ca0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/global_functions.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ void scratchcpprender::init()
77
{
88
qputenv("QSG_RENDER_LOOP", "basic");
99
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
10+
11+
QSurfaceFormat format = QSurfaceFormat::defaultFormat();
12+
format.setSwapInterval(0);
13+
QSurfaceFormat::setDefaultFormat(format);
1014
}
1115

1216
const std::string &scratchcpprender::version()

0 commit comments

Comments
 (0)