mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-07-30 20:48:39 +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()
|
||||||
|
@ -167,7 +170,7 @@ void GLYuvWidget::inittexture()
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLYuvWidget::paintGL()
|
void GLYuvWidget::paintGL()
|
||||||
{
|
{
|
||||||
qDebug() << "paintGL()";
|
qDebug() << "paintGL()";
|
||||||
inittexture();
|
inittexture();
|
||||||
//指定y纹理要使用新值
|
//指定y纹理要使用新值
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue