mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-19 19:15:07 +00:00
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:
parent
5fa18219b6
commit
c1faff820d
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue