Merge pull request #1294 from srcejon/fix_null_texture_warning

Spectrum: Fix null texture warning
This commit is contained in:
Edouard Griffiths 2022-06-20 18:04:09 +02:00 committed by GitHub
commit e48551a837
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -2581,7 +2581,9 @@ void GLSpectrum::applyChanges()
m_waterfallBuffer = new QImage(m_nbBins, m_waterfallHeight, QImage::Format_ARGB32);
m_waterfallBuffer->fill(qRgb(0x00, 0x00, 0x00));
m_glShaderWaterfall.initTexture(*m_waterfallBuffer);
if (m_waterfallHeight > 0) {
m_glShaderWaterfall.initTexture(*m_waterfallBuffer);
}
m_waterfallBufferPos = 0;
if (m_3DSpectrogramBuffer) {
@ -2591,7 +2593,9 @@ void GLSpectrum::applyChanges()
m_3DSpectrogramBuffer = new QImage(m_nbBins, m_waterfallHeight, QImage::Format_Grayscale8);
m_3DSpectrogramBuffer->fill(qRgb(0x00, 0x00, 0x00));
m_glShaderSpectrogram.initTexture(*m_3DSpectrogramBuffer);
if (m_waterfallHeight > 0) {
m_glShaderSpectrogram.initTexture(*m_3DSpectrogramBuffer);
}
m_3DSpectrogramBufferPos = 0;
}
m_glShaderSpectrogram.initColorMapTexture(m_3DSpectrogramColorMap);