mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-02 21:58:42 +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()
|
void QYUVOpenGLWidget::paintGL()
|
||||||
{
|
{
|
||||||
|
m_shaderProgram.bind();
|
||||||
|
|
||||||
if (m_needUpdate) {
|
if (m_needUpdate) {
|
||||||
deInitTextures();
|
deInitTextures();
|
||||||
initTextures();
|
initTextures();
|
||||||
|
@ -175,6 +177,8 @@ void QYUVOpenGLWidget::paintGL()
|
||||||
|
|
||||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_shaderProgram.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QYUVOpenGLWidget::resizeGL(int width, int height)
|
void QYUVOpenGLWidget::resizeGL(int width, int height)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue