libkwineffects: Set format on the main OffscreenQuickView
When showing the window RHI will realise the window has no underlying platform window and create a temporary offscreen surface, different from the offscreen surface we'll eventually be rendering into. This will use the format of the main window. If this offscreen surface format does not match the format of the context we can fail in makeCurrent calls.
This commit is contained in:
parent
e68e92bcbd
commit
f03af5eff5
1 changed files with 2 additions and 0 deletions
|
@ -105,6 +105,8 @@ OffscreenQuickView::OffscreenQuickView(QObject *parent, ExportMode exportMode)
|
|||
format.setDepthBufferSize(16);
|
||||
format.setStencilBufferSize(8);
|
||||
|
||||
d->m_view->setFormat(format);
|
||||
|
||||
auto shareContext = QOpenGLContext::globalShareContext();
|
||||
d->m_glcontext.reset(new QOpenGLContext);
|
||||
d->m_glcontext->setShareContext(shareContext);
|
||||
|
|
Loading…
Reference in a new issue