fix: #1117 Fix phone window show blank if run with Qt6

It needs to bind every time when GL paint on Qt6, and it works on Qt5 too.

Log: Fix phone window show blank if run with Qt6.
This commit is contained in:
re2zero 2025-02-17 19:22:43 +08:00 committed by Barry
parent 5fa18219b6
commit c1faff820d

View file

@ -157,6 +157,8 @@ void QYUVOpenGLWidget::initializeGL()
void QYUVOpenGLWidget::paintGL()
{
m_shaderProgram.bind();
if (m_needUpdate) {
deInitTextures();
initTextures();
@ -175,6 +177,8 @@ void QYUVOpenGLWidget::paintGL()
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
m_shaderProgram.release();
}
void QYUVOpenGLWidget::resizeGL(int width, int height)