kopia lustrzana https://github.com/jameshball/osci-render
Fix bug when visualiser opengl context restarts
rodzic
670ec43b99
commit
85e3f7b4b7
|
|
@ -50,9 +50,6 @@ void SosciPluginEditor::resized() {
|
|||
visualiserSettings.setSize(settingsArea.getWidth(), 550);
|
||||
visualiserSettingsWrapper.setBounds(settingsArea);
|
||||
|
||||
if (area.getWidth() < 10 || area.getHeight() < 10) {
|
||||
return;
|
||||
}
|
||||
visualiser.setBounds(area);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -607,6 +607,9 @@ void VisualiserComponent::openGLContextClosing() {
|
|||
wideBlurShader.reset();
|
||||
lineShader.reset();
|
||||
outputShader.reset();
|
||||
|
||||
// this triggers setupArrays to be called again when the scope next renders
|
||||
scratchVertices.clear();
|
||||
}
|
||||
|
||||
void VisualiserComponent::handleAsyncUpdate() {
|
||||
|
|
@ -1205,7 +1208,7 @@ void VisualiserComponent::renderScope(const std::vector<float>& xPoints, const s
|
|||
screenTexture = createScreenTexture();
|
||||
}
|
||||
|
||||
if (sampleRate != oldSampleRate) {
|
||||
if (sampleRate != oldSampleRate || scratchVertices.empty()) {
|
||||
oldSampleRate = sampleRate;
|
||||
setupArrays(RESAMPLE_RATIO * sampleRate / FRAME_RATE);
|
||||
}
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue