diff --git a/mythtv/libs/libmythtv/videoout_opengl.cpp b/mythtv/libs/libmythtv/videoout_opengl.cpp index 6c981623257..13dc451e93c 100644 --- a/mythtv/libs/libmythtv/videoout_opengl.cpp +++ b/mythtv/libs/libmythtv/videoout_opengl.cpp @@ -287,9 +287,6 @@ bool VideoOutputOpenGL::SetupContext(void) return true; } - QGLFormat fmt; - fmt.setDepth(false); - QGLWidget *device = (QGLWidget*)QWidget::find(gl_parent_win); if (!device) { @@ -297,7 +294,7 @@ bool VideoOutputOpenGL::SetupContext(void) return false; } - gl_context = MythRenderOpenGL::Create(fmt, device); + gl_context = MythRenderOpenGL::Create(device); if (gl_context && gl_context->create()) { gl_context->Init(); diff --git a/mythtv/libs/libmythui/mythmainwindow.cpp b/mythtv/libs/libmythui/mythmainwindow.cpp index e69e4fdada4..501cd115c33 100644 --- a/mythtv/libs/libmythui/mythmainwindow.cpp +++ b/mythtv/libs/libmythui/mythmainwindow.cpp @@ -961,9 +961,7 @@ void MythMainWindow::Init(void) { LOG(VB_GENERAL, LOG_INFO, "Trying the OpenGL painter"); d->painter = new MythOpenGLPainter(); - QGLFormat fmt; - fmt.setDepth(false); - d->render = MythRenderOpenGL::Create(fmt); + d->render = MythRenderOpenGL::Create(); MythRenderOpenGL *gl = dynamic_cast(d->render); d->paintwin = new MythPainterWindowGL(this, d, gl); QGLWidget *qgl = dynamic_cast(d->paintwin); diff --git a/mythtv/libs/libmythui/mythrender_opengl.cpp b/mythtv/libs/libmythui/mythrender_opengl.cpp index aae2661b763..4e630f7c9c1 100644 --- a/mythtv/libs/libmythui/mythrender_opengl.cpp +++ b/mythtv/libs/libmythui/mythrender_opengl.cpp @@ -42,8 +42,15 @@ OpenGLLocker::~OpenGLLocker() m_render->doneCurrent(); } -MythRenderOpenGL* MythRenderOpenGL::Create(const QGLFormat& format, QPaintDevice* device) +MythRenderOpenGL* MythRenderOpenGL::Create(QPaintDevice* device) { + QGLFormat format; + format.setDepth(false); + +#if defined(Q_WS_MAC) + format.setSwapInterval(1); +#endif + #ifdef USING_OPENGLES if (device) return new MythRenderOpenGL2ES(format, device); diff --git a/mythtv/libs/libmythui/mythrender_opengl.h b/mythtv/libs/libmythui/mythrender_opengl.h index 5a3c66ef41b..b9281691dc0 100644 --- a/mythtv/libs/libmythui/mythrender_opengl.h +++ b/mythtv/libs/libmythui/mythrender_opengl.h @@ -98,8 +98,7 @@ class MUI_PUBLIC OpenGLLocker class MUI_PUBLIC MythRenderOpenGL : public QGLContext, public MythRender { public: - static MythRenderOpenGL* Create(const QGLFormat& format, - QPaintDevice* device = NULL); + static MythRenderOpenGL* Create(QPaintDevice* device = NULL); MythRenderOpenGL(const QGLFormat& format, QPaintDevice* device, RenderType type = kRenderUnknown);