mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +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 <QOpenGLTexture>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QTime>
|
||||
|
||||
#define VERTEXIN 0
|
||||
#define TEXTUREIN 1
|
||||
|
||||
|
@ -30,7 +31,9 @@ void GLYuvWidget::slotShowYuv(quint8* bufferY, quint8* bufferU, quint8* bufferV,
|
|||
m_linesizeY = linesizeY;
|
||||
m_linesizeU = linesizeU;
|
||||
m_linesizeV = linesizeV;
|
||||
update();
|
||||
//update(); // 不实时
|
||||
//repaint(); // 同上
|
||||
paintEvent(nullptr);// 最实时的方案
|
||||
}
|
||||
|
||||
void GLYuvWidget::initializeGL()
|
||||
|
@ -167,7 +170,7 @@ void GLYuvWidget::inittexture()
|
|||
}
|
||||
|
||||
void GLYuvWidget::paintGL()
|
||||
{
|
||||
{
|
||||
qDebug() << "paintGL()";
|
||||
inittexture();
|
||||
//指定y纹理要使用新值
|
||||
|
|
Loading…
Add table
Reference in a new issue