mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
ATV demod: ATV screen: reviewed screen shader intialization sequences
This commit is contained in:
parent
1d0cf9582d
commit
6636fc75fa
@ -39,9 +39,9 @@ ATVScreen::ATVScreen(QWidget* parent) :
|
||||
m_blnDataChanged = false;
|
||||
m_blnGLContextInitialized = false;
|
||||
|
||||
m_intAskedCols = 0;
|
||||
m_intAskedRows = 0;
|
||||
|
||||
//Par défaut
|
||||
m_intAskedCols = ATV_COLS;
|
||||
m_intAskedRows = ATV_ROWS;
|
||||
}
|
||||
|
||||
ATVScreen::~ATVScreen()
|
||||
@ -129,10 +129,6 @@ void ATVScreen::initializeGL()
|
||||
connect(objGlCurrentContext, &QOpenGLContext::aboutToBeDestroyed, this,
|
||||
&ATVScreen::cleanup); // TODO: when migrating to QOpenGLWidget
|
||||
|
||||
//Par défaut
|
||||
m_intAskedCols = ATV_COLS;
|
||||
m_intAskedRows = ATV_ROWS;
|
||||
|
||||
m_blnGLContextInitialized = true;
|
||||
|
||||
m_objMutex.unlock();
|
||||
@ -147,22 +143,20 @@ void ATVScreen::resizeGL(int intWidth, int intHeight)
|
||||
|
||||
void ATVScreen::paintGL()
|
||||
{
|
||||
m_objMutex.lock();
|
||||
if (!m_objMutex.tryLock(2))
|
||||
return;
|
||||
|
||||
m_blnDataChanged = false;
|
||||
|
||||
if (m_blnGLContextInitialized)
|
||||
if ((m_intAskedCols != 0) && (m_intAskedRows != 0))
|
||||
{
|
||||
if ((m_intAskedCols != 0) && (m_intAskedRows != 0))
|
||||
{
|
||||
m_objGLShaderArray.InitializeGL(m_intAskedCols, m_intAskedRows);
|
||||
m_intAskedCols = 0;
|
||||
m_intAskedRows = 0;
|
||||
}
|
||||
|
||||
m_objGLShaderArray.RenderPixels(m_chrLastData);
|
||||
m_objGLShaderArray.InitializeGL(m_intAskedCols, m_intAskedRows);
|
||||
m_intAskedCols = 0;
|
||||
m_intAskedRows = 0;
|
||||
}
|
||||
|
||||
m_objGLShaderArray.RenderPixels(m_chrLastData);
|
||||
|
||||
m_objMutex.unlock();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user