Skip to content

Commit c1faff8

Browse files
re2zerobarry-ran
authored andcommitted
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.�
1 parent 5fa1821 commit c1faff8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

QtScrcpy/render/qyuvopenglwidget.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ void QYUVOpenGLWidget::initializeGL()
157157

158158
void QYUVOpenGLWidget::paintGL()
159159
{
160+
m_shaderProgram.bind();
161+
160162
if (m_needUpdate) {
161163
deInitTextures();
162164
initTextures();
@@ -175,6 +177,8 @@ void QYUVOpenGLWidget::paintGL()
175177

176178
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
177179
}
180+
181+
m_shaderProgram.release();
178182
}
179183

180184
void QYUVOpenGLWidget::resizeGL(int width, int height)

0 commit comments

Comments
 (0)