mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-08-01 05:18:38 +00:00
找到实时更新qopenglwidget的方法,mark:还没做frame的同步
This commit is contained in:
parent
131ade1736
commit
5d1321ce61
1 changed files with 6 additions and 3 deletions
|
@ -2,7 +2,8 @@
|
||||||
#include <QOpenGLShaderProgram>
|
#include <QOpenGLShaderProgram>
|
||||||
#include <QOpenGLTexture>
|
#include <QOpenGLTexture>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFile>
|
#include <QTime>
|
||||||
|
|
||||||
#define VERTEXIN 0
|
#define VERTEXIN 0
|
||||||
#define TEXTUREIN 1
|
#define TEXTUREIN 1
|
||||||
|
|
||||||
|
@ -30,7 +31,9 @@ void GLYuvWidget::slotShowYuv(quint8* bufferY, quint8* bufferU, quint8* bufferV,
|
||||||
m_linesizeY = linesizeY;
|
m_linesizeY = linesizeY;
|
||||||
m_linesizeU = linesizeU;
|
m_linesizeU = linesizeU;
|
||||||
m_linesizeV = linesizeV;
|
m_linesizeV = linesizeV;
|
||||||
update();
|
//update(); // 不实时
|
||||||
|
//repaint(); // 同上
|
||||||
|
paintEvent(nullptr);// 最实时的方案
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLYuvWidget::initializeGL()
|
void GLYuvWidget::initializeGL()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue