|
@@ -3,6 +3,7 @@
|
|
|
|
|
|
#include <QOpenGLWidget>
|
|
|
#include <QOpenGLFunctions_3_3_Core>
|
|
|
+#include <qopengltexture.h>
|
|
|
|
|
|
#include "spdlog/spdlog.h"
|
|
|
|
|
@@ -219,14 +220,20 @@ bool ShaderYUV420::refreshFrameYUV420(const Image_YUV420P& yuvData)
|
|
|
/* 设置Y分量纹理 */
|
|
|
textureY->setData(QOpenGLTexture::Red, QOpenGLTexture::UInt8, yuvData.yData.constData());
|
|
|
textureY->generateMipMaps(); // 生成多级渐远纹理
|
|
|
+ textureY->setMinificationFilter(QOpenGLTexture::LinearMipMapLinear);
|
|
|
+ textureY->setMagnificationFilter(QOpenGLTexture::Linear); // 纹理放大过滤方式
|
|
|
|
|
|
/* 设置U分量纹理 */
|
|
|
textureU->setData(QOpenGLTexture::Red, QOpenGLTexture::UInt8, yuvData.uData.constData());
|
|
|
textureU->generateMipMaps(); // 生成多级渐远纹理
|
|
|
+ textureU->setMinificationFilter(QOpenGLTexture::LinearMipMapLinear);
|
|
|
+ textureU->setMagnificationFilter(QOpenGLTexture::Linear); // 纹理放大过滤方式
|
|
|
|
|
|
/* 设置V分量纹理 */
|
|
|
textureV->setData(QOpenGLTexture::Red, QOpenGLTexture::UInt8, yuvData.vData.constData());
|
|
|
textureV->generateMipMaps(); // 生成多级渐远纹理
|
|
|
+ textureV->setMinificationFilter(QOpenGLTexture::LinearMipMapLinear);
|
|
|
+ textureV->setMagnificationFilter(QOpenGLTexture::Linear); // 纹理放大过滤方式
|
|
|
|
|
|
printGLerror("ShaderYUV420::refreshFrameYUV420");
|
|
|
|