Skip to content

Commit

Permalink
Fix #194 GPU mode broken on Mesa; allow user override.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Feb 15, 2016
1 parent 8e1edc7 commit 0ce6748
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/glwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void GLWidget::initializeGL()
quickWindow()->openglContext()->makeCurrent(quickWindow());

connect(m_frameRenderer, SIGNAL(frameDisplayed(const SharedFrame&)), this, SIGNAL(frameDisplayed(const SharedFrame&)), Qt::QueuedConnection);
if (quickWindow()->openglContext()->supportsThreadedOpenGL())
if (Settings.playerGPU() || quickWindow()->openglContext()->supportsThreadedOpenGL())
connect(m_frameRenderer, SIGNAL(textureReady(GLuint,GLuint,GLuint)), SLOT(updateTexture(GLuint,GLuint,GLuint)), Qt::DirectConnection);
else
connect(m_frameRenderer, SIGNAL(frameDisplayed(const SharedFrame&)), SLOT(onFrameDisplayed(const SharedFrame&)), Qt::QueuedConnection);
Expand Down Expand Up @@ -347,7 +347,7 @@ void GLWidget::paintGL()
glClear(GL_COLOR_BUFFER_BIT);
check_error(f);

if (!quickWindow()->openglContext()->supportsThreadedOpenGL()) {
if (!(Settings.playerGPU() || quickWindow()->openglContext()->supportsThreadedOpenGL())) {
m_mutex.lock();
if (!m_sharedFrame.is_valid()) {
m_mutex.unlock();
Expand Down Expand Up @@ -769,7 +769,7 @@ FrameRenderer::FrameRenderer(QOpenGLContext* shareContext, QSurface* surface)
Q_ASSERT(shareContext);
m_renderTexture[0] = m_renderTexture[1] = m_renderTexture[2] = 0;
m_displayTexture[0] = m_displayTexture[1] = m_displayTexture[2] = 0;
if (shareContext->supportsThreadedOpenGL()) {
if (Settings.playerGPU() || shareContext->supportsThreadedOpenGL()) {
m_context = new QOpenGLContext;
m_context->setFormat(shareContext->format());
m_context->setShareContext(shareContext);
Expand Down

0 comments on commit 0ce6748

Please sign in to comment.