Skip to content

Commit

Permalink
MythRenderOpenGL: Add as yet unused share context handling
Browse files Browse the repository at this point in the history
- will be required for QtWebEngine support
  • Loading branch information
mark-kendall committed Nov 2, 2020
1 parent 72e81dd commit 4f9a9ea
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mythtv/libs/libmythui/opengl/mythrenderopengl.cpp
Expand Up @@ -552,6 +552,15 @@ void MythRenderOpenGL::SetWidget(QWidget *Widget)
native->windowHandle()->setSurfaceType(QWindow::OpenGLSurface);
#endif

#ifdef USING_QTWEBENGINE
auto * globalcontext = QOpenGLContext::globalShareContext();
if (globalcontext)
{
LOG(VB_GENERAL, LOG_INFO, LOC + "Using global shared OpenGL context");
setShareContext(globalcontext);
}
#endif

if (!create())
LOG(VB_GENERAL, LOG_CRIT, LOC + "Failed to create OpenGLContext!");
else
Expand Down

0 comments on commit 4f9a9ea

Please sign in to comment.