From 3b6c7275bc06d108920dffa4ccdaf6bdfe316cac Mon Sep 17 00:00:00 2001 From: commander kotori Date: Thu, 3 Dec 2015 19:03:02 +1000 Subject: [PATCH] examples/qt_opengl: Use fbo of the widget and not the thread context Sometimes QOpenGLWidget may be redirecting it's output to a framebuffer object rather than the frontbuffer, in which case the current thread's context render fbo is different from the widget's. Use the widget's desired fbo instead. --- DOCS/client_api_examples/qt_opengl/mpvwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp b/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp index 16b800995c..4d2cad6241 100644 --- a/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp +++ b/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp @@ -80,7 +80,7 @@ void MpvWidget::initializeGL() void MpvWidget::paintGL() { - mpv_opengl_cb_draw(mpv_gl, QOpenGLContext::currentContext()->defaultFramebufferObject(), width(), -height()); + mpv_opengl_cb_draw(mpv_gl, defaultFramebufferObject(), width(), -height()); } void MpvWidget::swapped()