1
mirror of https://github.com/mpv-player/mpv synced 2024-07-31 16:29:58 +02:00

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.
This commit is contained in:
commander kotori 2015-12-03 19:03:02 +10:00 committed by wm4
parent 6562d4a562
commit 3b6c7275bc

View File

@ -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()