mirror of
https://github.com/mpv-player/mpv
synced 2024-09-09 01:16:56 +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:
parent
6562d4a562
commit
3b6c7275bc
@ -80,7 +80,7 @@ void MpvWidget::initializeGL()
|
|||||||
|
|
||||||
void MpvWidget::paintGL()
|
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()
|
void MpvWidget::swapped()
|
||||||
|
Loading…
Reference in New Issue
Block a user