From def43706eb930faa5865a2d33df1aa80572c36c5 Mon Sep 17 00:00:00 2001 From: derMart Date: Wed, 14 Jan 2015 15:26:02 +0100 Subject: [PATCH] fix incompatibility of MSAA (SampleBuffers) and SingleBuffer mode in VideoSurface --- src/widget/videosurface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widget/videosurface.cpp b/src/widget/videosurface.cpp index c7d263033..9a7fd69b7 100644 --- a/src/widget/videosurface.cpp +++ b/src/widget/videosurface.cpp @@ -22,7 +22,7 @@ #include VideoSurface::VideoSurface(QWidget* parent) - : QGLWidget(QGLFormat(QGL::SampleBuffers | QGL::SingleBuffer), parent) + : QGLWidget(QGLFormat(QGL::SingleBuffer), parent) , source(nullptr) , pbo{nullptr, nullptr} , textureId(0) @@ -30,7 +30,7 @@ VideoSurface::VideoSurface(QWidget* parent) , hasSubscribed(false) , pboIndex(0) { - setAutoBufferSwap(true); + } VideoSurface::VideoSurface(VideoSource *source, QWidget* parent) @@ -65,8 +65,8 @@ void VideoSurface::setSource(VideoSource *src) void VideoSurface::initializeGL() { + QGLWidget::initializeGL(); qDebug() << "VideoSurface: Init"; - // pbo pbo[0] = new QOpenGLBuffer(QOpenGLBuffer::PixelUnpackBuffer); pbo[0]->setUsagePattern(QOpenGLBuffer::StreamDraw);