When using the opengl renderer, the spectrogram is not displayed but while using the Juce graphics, it is displayed properly.
So, while using the opengl renderer, I just added one line(changing one pixel of the image) above the drawImage.
void paint (Graphics& g) override
spectrogramImage.setPixelAt(0, 0, Colour::fromHSV(1.0f, 1.0f, 1.0f, 1.0f));
g.drawImageWithin (spectrogramImage, 0, 0, getWidth(), getHeight(), RectanglePlacement::stretchToFit);
Now, Even with Opengl renderer, the spectrogram is displayed properly. So, maybe with opengl, Earlier, it thought the image is not changed and so it didnt redraw it again??? And now with this added line, it assumes the image is changed and redraws it now?? (I know my guess is non-sense. But how this single line makes the spectrogram visible??)
Can some one who are experienced comment on this??