bootmanager: set the surface format based on vsync
This commit is contained in:
parent
5c50a26b38
commit
b4ef3cdeff
1 changed files with 5 additions and 1 deletions
|
@ -162,7 +162,7 @@ public:
|
||||||
|
|
||||||
// disable vsync for any shared contexts
|
// disable vsync for any shared contexts
|
||||||
auto format = share_context->format();
|
auto format = share_context->format();
|
||||||
format.setSwapInterval(main_surface ? Settings::values.use_vsync_new.GetValue() : 0);
|
format.setSwapInterval(0);
|
||||||
|
|
||||||
context = std::make_unique<QOpenGLContext>();
|
context = std::make_unique<QOpenGLContext>();
|
||||||
context->setShareContext(share_context);
|
context->setShareContext(share_context);
|
||||||
|
@ -673,6 +673,10 @@ bool GRenderWindow::InitializeOpenGL() {
|
||||||
auto child_context = CreateSharedContext();
|
auto child_context = CreateSharedContext();
|
||||||
child->SetContext(std::move(child_context));
|
child->SetContext(std::move(child_context));
|
||||||
|
|
||||||
|
auto format = child_widget->windowHandle()->format();
|
||||||
|
format.setSwapInterval(Settings::values.use_vsync_new.GetValue());
|
||||||
|
child_widget->windowHandle()->setFormat(format);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
QMessageBox::warning(this, tr("OpenGL not available!"),
|
QMessageBox::warning(this, tr("OpenGL not available!"),
|
||||||
|
|
Loading…
Reference in a new issue