1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 23:43:43 -04:00

Replace obsolete QGLWidget by QOpenGLWidget

This commit is contained in:
f4exb
2022-03-18 18:13:08 +01:00
parent 60d4b2f126
commit cbdf46098d
8 changed files with 25 additions and 20 deletions
+8 -4
View File
@@ -64,8 +64,8 @@ static const char* fragmentShaderSource =
" gl_FragColor = vec4(p);\n"
"}\n";
TVScreenAnalog::TVScreenAnalog(QWidget *parent)
: QGLWidget(parent),
TVScreenAnalog::TVScreenAnalog(QWidget *parent) :
QOpenGLWidget(parent),
m_shader(nullptr),
m_imageTexture(nullptr),
m_lineShiftsTexture(nullptr)
@@ -134,8 +134,12 @@ void TVScreenAnalog::initializeGL()
{
initializeOpenGLFunctions();
connect(QOpenGLContext::currentContext(), &QOpenGLContext::aboutToBeDestroyed,
this, &TVScreenAnalog::cleanup); // TODO: when migrating to QOpenGLWidget
connect(
QOpenGLContext::currentContext(),
&QOpenGLContext::aboutToBeDestroyed,
this,
&TVScreenAnalog::cleanup
);
m_shader = new QOpenGLShaderProgram(this);