1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix incompatibility of MSAA (SampleBuffers) and SingleBuffer mode in VideoSurface

This commit is contained in:
derMart 2015-01-14 15:26:02 +01:00
parent 290f6d4697
commit def43706eb

View File

@ -22,7 +22,7 @@
#include <QDebug>
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);