Fix major intel graphics bug, and fix smoothing bugs

pull/287/head
James H Ball 2025-02-23 19:48:19 +00:00
rodzic 15f6a0ffbb
commit bcbf634ff7
5 zmienionych plików z 21 dodań i 10 usunięć

Wyświetl plik

@ -61,7 +61,7 @@ public:
VisualiserSettings visualiserSettings = VisualiserSettings(audioProcessor.visualiserParameters, 3);
RecordingSettings recordingSettings = RecordingSettings(audioProcessor.recordingParameters);
SettingsWindow recordingSettingsWindow = SettingsWindow("Recording Settings", recordingSettings, 300, 320, 300, 320);
SettingsWindow recordingSettingsWindow = SettingsWindow("Recording Settings", recordingSettings, 330, 320, 330, 320);
VisualiserComponent visualiser{
audioProcessor,
#if SOSCI_FEATURES

Wyświetl plik

@ -226,7 +226,7 @@ void OscirenderAudioProcessor::addLuaSlider() {
"Lua Slider " + sliderName,
"Controls the value of the Lua variable called slider_" + sliderName.toLowerCase() + ".",
"lua" + sliderName,
VERSION_HINT, 0.0, 0.0, 1.0, 0.001, false
VERSION_HINT, 0.0, 0.0, 1.0
)
));
}

Wyświetl plik

@ -77,13 +77,13 @@ public:
"Trace Start",
"Defines how far into the frame the drawing is started at. This has the effect of 'tracing' out the image from a single dot when animated. By default, we start drawing from the beginning of the frame, so this value is 0.0.",
"traceStart",
VERSION_HINT, 0.0, 0.0, 1.0, 0.001, 0.001
VERSION_HINT, 0.0, 0.0, 1.0, 0.001
),
new EffectParameter(
"Trace Length",
"Defines how much of the frame is drawn per cycle. This has the effect of 'tracing' out the image from a single dot when animated. By default, we draw the whole frame, corresponding to a value of 1.0.",
"traceLength",
VERSION_HINT, 1.0, 0.0, 1.0, 0.001, 0.001
VERSION_HINT, 1.0, 0.0, 1.0, 0.001
),
}
);
@ -170,7 +170,7 @@ public:
"Image Stride",
"Controls the spacing between pixels when drawing an image. Larger values mean more of the image can be drawn, but at a lower fidelity.",
"imageStride",
VERSION_HINT, 4, 1, 50, 1, false
VERSION_HINT, 4, 1, 50, 1
)
);

Wyświetl plik

@ -448,7 +448,7 @@ public:
return lfoEnabled;
}
EffectParameter(juce::String name, juce::String description, juce::String id, int versionHint, float value, float min, float max, float step = 0.0001, double smoothValueChange = SMOOTHING_SPEED_CONSTANT) : FloatParameter(name, id, versionHint, value, min, max, step), smoothValueChange(smoothValueChange), description(description) {}
EffectParameter(juce::String name, juce::String description, juce::String id, int versionHint, float value, float min, float max, float step = 0.0001) : FloatParameter(name, id, versionHint, value, min, max, step), description(description) {}
private:
bool lfoEnabled = true;

Wyświetl plik

@ -885,7 +885,7 @@ void VisualiserComponent::setupTextures() {
Texture VisualiserComponent::makeTexture(int width, int height, GLuint textureID) {
using namespace juce::gl;
// replace existing texture if it exists, otherwise create new texture
if (textureID == 0) {
glGenTextures(1, &textureID);
@ -900,17 +900,28 @@ Texture VisualiserComponent::makeTexture(int width, int height, GLuint textureID
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
float borderColor[] = { 0.0f, 0.0f, 0.0f, 1.0f };
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureID, 0);
glViewport(0, 0, width, height);
// Clear it once so we don't see uninitialized pixels
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
glBindTexture(GL_TEXTURE_2D, 0); // Unbind
return { textureID, width, height };
}
void VisualiserComponent::setResolution(int width) {
using namespace juce::gl;
glBindFramebuffer(GL_FRAMEBUFFER, frameBuffer);
lineTexture = makeTexture(width, width, lineTexture.id);
renderTexture = makeTexture(width, width, renderTexture.id);
glBindFramebuffer(GL_FRAMEBUFFER, 0); // Unbind
}
void VisualiserComponent::drawLineTexture(const std::vector<float>& xPoints, const std::vector<float>& yPoints, const std::vector<float>& zPoints) {