68 void updateVertices();
73 void updateVerticesMemory();
75 static constexpr int kNumPositions = 8;
76 static constexpr int kNumTriangleIndices = 6;
81 OpenGLShaderProgram* shader_;
82 std::unique_ptr<OpenGLShaderProgram::Attribute> position_;
83 std::unique_ptr<OpenGLShaderProgram::Uniform> color_from_;
84 std::unique_ptr<OpenGLShaderProgram::Uniform> color_to_;
87 float position_vertices_[kNumPositions];
88 int position_triangles_[kNumTriangleIndices];
89 GLuint vertex_buffer_;
90 GLuint triangle_buffer_;
A base component class that integrates JUCE's Component with OpenGL rendering.
Definition open_gl_component.h:20
A visual component to display a peak meter using OpenGL.
Definition peak_meter_viewer.h:15
void init(OpenGlWrapper &open_gl) override
Initializes the OpenGL buffers and shader for drawing the meter.
Definition peak_meter_viewer.cpp:48
void paintBackground(Graphics &g) override
Paints a background for the meter, showing ranges or thresholds.
Definition peak_meter_viewer.cpp:174
void render(OpenGlWrapper &open_gl, bool animate) override
Renders the peak meter using OpenGL.
Definition peak_meter_viewer.cpp:109
void resized() override
Called when the component is resized. Initializes status outputs if needed.
Definition peak_meter_viewer.cpp:38
void draw(OpenGlWrapper &open_gl)
Draws the peak meter quads according to current peak and memory values.
Definition peak_meter_viewer.cpp:145
void destroy(OpenGlWrapper &open_gl) override
Releases any OpenGL resources associated with this component.
Definition peak_meter_viewer.cpp:163
PeakMeterViewer(bool left)
Constructs a PeakMeterViewer.
Definition peak_meter_viewer.cpp:14
virtual ~PeakMeterViewer()
Destructor.
Definition peak_meter_viewer.cpp:36
A helper class to track the "status" of a particular Output as a poly_float value.
Definition synth_module.h:35
A helper struct containing references to OpenGL context, shaders, and display scale.
Definition shaders.h:174
Defines the SynthModule class which extends ProcessorRouter to form a building block of the Vital syn...