diff options
author | commander kotori <cmdrkotori@gmail.com> | 2015-12-03 19:03:02 +1000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-03 10:41:49 +0100 |
commit | 3b6c7275bc06d108920dffa4ccdaf6bdfe316cac (patch) | |
tree | ada0f872f3f7ffbcee38e31020498ed09efb4ab9 | |
parent | 6562d4a56276fdf109914924faa6c859d2079ee3 (diff) |
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.
-rw-r--r-- | DOCS/client_api_examples/qt_opengl/mpvwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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() |