- fixed font loading
- changed to RMS - added decibel Scales - fixed logo loading - changed blood theme - added some look and feel
This commit is contained in:
parent
a27c62f062
commit
3fda15966c
16 changed files with 396 additions and 146 deletions
68
Source/Veno/GUI/Components/LCD/DecibelScale.cpp
Normal file
68
Source/Veno/GUI/Components/LCD/DecibelScale.cpp
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
//
|
||||
// Created by Maurice on 29.06.2020.
|
||||
//
|
||||
|
||||
#include "DecibelScale.h"
|
||||
#include "../../../Core/Config.h"
|
||||
#include "../../../Utils.h"
|
||||
#include "../../../Fonts/Fonts.h"
|
||||
|
||||
DecibelScale::DecibelScale (const std::string& process_id) : BaseComponent (process_id)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DecibelScale::resized ()
|
||||
{
|
||||
m_scale = 0.95 * getHeight();
|
||||
}
|
||||
|
||||
void DecibelScale::paint (Graphics& g)
|
||||
{
|
||||
VeNo::Utils::setFontSize(7, g);
|
||||
auto theme = Config::getInstance ()->getCurrentTheme ();
|
||||
g.setColour (theme->getColour (ThemeColour::lcd));
|
||||
g.setFont(*VenoFonts::getLCD());
|
||||
if (m_mode == 0)
|
||||
{
|
||||
drawLabel (g, getScale (0), "0");
|
||||
drawLabel (g, getScale (-3), "3");
|
||||
drawLabel (g, getScale (-6), "6");
|
||||
drawLabel (g, getScale (-9), "9");
|
||||
drawLabel (g, getScale (-12), "12");
|
||||
drawLabel (g, getScale (-18), "18");
|
||||
drawLabel (g, getScale (-27), "27");
|
||||
}
|
||||
else
|
||||
{
|
||||
g.setOpacity (0);
|
||||
}
|
||||
}
|
||||
|
||||
int DecibelScale::getScale (float dB)
|
||||
{
|
||||
float fDef = (dB+30) / 30;
|
||||
return int (fDef * m_scale);
|
||||
}
|
||||
|
||||
void DecibelScale::drawLabel (Graphics& g, int y, const std::string& label)
|
||||
{
|
||||
auto font = g.getCurrentFont ();
|
||||
int currentY = getHeight () - y;
|
||||
int thisWidth = getWidth ();
|
||||
|
||||
int iMidHeight = (int) (font.getHeight () * 0.5f);
|
||||
|
||||
if (font.getStringWidth (label) < thisWidth - 5)
|
||||
{
|
||||
g.drawLine (0, currentY, 2, currentY);
|
||||
g.drawLine (thisWidth - 3, currentY, thisWidth - 1, currentY);
|
||||
}
|
||||
|
||||
g.drawText (label,
|
||||
2, currentY - iMidHeight, thisWidth - 3, (int) font.getHeight (),
|
||||
Justification::centred,
|
||||
false);
|
||||
|
||||
m_lastY = currentY + 1;
|
||||
}
|
||||
28
Source/Veno/GUI/Components/LCD/DecibelScale.h
Normal file
28
Source/Veno/GUI/Components/LCD/DecibelScale.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// Created by Maurice on 29.06.2020.
|
||||
//
|
||||
|
||||
#ifndef VENO_DECIBELSCALE_H
|
||||
#define VENO_DECIBELSCALE_H
|
||||
|
||||
#include "JuceHeader.h"
|
||||
#include "../BaseComponent.h"
|
||||
|
||||
class DecibelScale : public BaseComponent
|
||||
{
|
||||
private:
|
||||
public:
|
||||
explicit DecibelScale (const std::string& process_id);
|
||||
~DecibelScale () override = default;
|
||||
void resized () override;
|
||||
void paint (Graphics& g) override;
|
||||
int getScale(float dB);
|
||||
void drawLabel(Graphics& g, int y, const std::string& label);
|
||||
int m_mode = 0;
|
||||
protected:
|
||||
float m_scale = 0;
|
||||
float m_lastY = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif //VENO_DECIBELSCALE_H
|
||||
|
|
@ -22,7 +22,8 @@ void SidebarLCD::drawHeadline (Graphics& g)
|
|||
{
|
||||
float fontSize = VeNo::Utils::setFontSize(12.0f, g) + 2;
|
||||
int line = m_innerY + fontSize + 2;
|
||||
g.drawText(">>> VeNo <<<", 0, m_innerY, getWidth() - m_width, fontSize,
|
||||
// should draw random stuff? or draw current selected preset :)
|
||||
g.drawText(">>> INIT <<<", 0, m_innerY, getWidth() - m_width, fontSize,
|
||||
Justification::centred,
|
||||
true);
|
||||
g.drawLine(0, line, getWidth(), line);
|
||||
|
|
@ -33,7 +34,7 @@ void SidebarLCD::drawFooter (Graphics& g)
|
|||
float fontSize = VeNo::Utils::setFontSize(8.0f, g) + 4;
|
||||
int space = m_innerY + fontSize;
|
||||
int line = getHeight() - space;
|
||||
g.drawText("by VersusTuneZ", 0, line, getWidth() - m_width, fontSize,
|
||||
g.drawText("by VersusTuneZ for " + SystemStats::getFullUserName(), 0, line, getWidth() - m_width, fontSize,
|
||||
Justification::horizontallyCentred,
|
||||
true);
|
||||
g.drawLine(0, line - 4, getWidth(), line - 4);
|
||||
|
|
|
|||
|
|
@ -9,30 +9,34 @@
|
|||
#include "../../../VenoInstance.h"
|
||||
#include "../../../Fonts/Fonts.h"
|
||||
|
||||
Waveforms::Waveforms (const std::string& processId) : BaseComponent(processId)
|
||||
Waveforms::Waveforms (const std::string& processId) : BaseComponent (processId)
|
||||
{
|
||||
setMouseCursor(MouseCursor::PointingHandCursor);
|
||||
m_context.setOpenGLVersionRequired(OpenGLContext::OpenGLVersion::openGL3_2);
|
||||
m_context.setRenderer(this);
|
||||
m_context.setContinuousRepainting(false);
|
||||
m_context.setComponentPaintingEnabled(true);
|
||||
m_context.attachTo(*this);
|
||||
setFps();
|
||||
std::srand(unsigned(time(nullptr)));
|
||||
pickRandomText = (std::rand() % RANDOM_TEXT_COUNT);
|
||||
setMouseCursor (MouseCursor::PointingHandCursor);
|
||||
m_context.setOpenGLVersionRequired (OpenGLContext::OpenGLVersion::openGL3_2);
|
||||
m_context.setRenderer (this);
|
||||
m_context.setContinuousRepainting (false);
|
||||
m_context.setComponentPaintingEnabled (true);
|
||||
m_context.attachTo (*this);
|
||||
setFps ();
|
||||
std::srand (unsigned (time (nullptr)));
|
||||
pickRandomText = (std::rand () % RANDOM_TEXT_COUNT);
|
||||
m_ticks = 0;
|
||||
dBScale = std::make_unique<DecibelScale> (processId);
|
||||
dBScale->m_mode = -1;
|
||||
addAndMakeVisible (*dBScale);
|
||||
}
|
||||
|
||||
Waveforms::~Waveforms ()
|
||||
{
|
||||
stopTimer();
|
||||
shaderProgram.reset();
|
||||
m_context.detach();
|
||||
stopTimer ();
|
||||
shaderProgram.reset ();
|
||||
m_context.detach ();
|
||||
dBScale.reset (nullptr);
|
||||
}
|
||||
|
||||
void Waveforms::newOpenGLContextCreated ()
|
||||
{
|
||||
compileOpenGLShaderProgram();
|
||||
compileOpenGLShaderProgram ();
|
||||
}
|
||||
|
||||
void Waveforms::openGLContextClosing ()
|
||||
|
|
@ -42,23 +46,23 @@ void Waveforms::openGLContextClosing ()
|
|||
|
||||
void Waveforms::renderOpenGL ()
|
||||
{
|
||||
if (!isShowing() || shaderProgram == nullptr || !shaderProgram->getLastError().isEmpty())
|
||||
if (!isShowing () || shaderProgram == nullptr || !shaderProgram->getLastError ().isEmpty ())
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto theme = Config::getInstance()->getCurrentTheme();
|
||||
auto theme = Config::getInstance ()->getCurrentTheme ();
|
||||
if (theme == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
glViewport(0, 0, getWidth(), getHeight());
|
||||
OpenGLHelpers::clear(theme->getColour(ThemeColour::lcd_bg));
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
shaderProgram->use();
|
||||
auto color = theme->getColour(ThemeColour::lcd);
|
||||
shaderProgram->setUniform("color", color.getFloatRed(), color.getFloatGreen(), color.getFloatBlue(),
|
||||
color.getFloatAlpha());
|
||||
OpenGLHelpers::clear (theme->getColour (ThemeColour::lcd_bg));
|
||||
//glViewport(0, 0, getWidth(), getHeight());
|
||||
glEnable (GL_BLEND);
|
||||
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
shaderProgram->use ();
|
||||
auto color = theme->getColour (ThemeColour::lcd);
|
||||
shaderProgram->setUniform ("color", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
|
||||
color.getFloatAlpha ());
|
||||
if (m_isWelcome || m_isStarting || m_isChangingData)
|
||||
{
|
||||
return;
|
||||
|
|
@ -66,28 +70,28 @@ void Waveforms::renderOpenGL ()
|
|||
switch (m_mode)
|
||||
{
|
||||
case 1:
|
||||
drawAudioOutput();
|
||||
drawAudioOutput ();
|
||||
break;
|
||||
case 2:
|
||||
drawWaveTable();
|
||||
drawWaveTable ();
|
||||
break;
|
||||
case 3:
|
||||
drawSpectrum();
|
||||
drawSpectrum ();
|
||||
break;
|
||||
default:
|
||||
drawPeakMeter();
|
||||
drawPeakMeter ();
|
||||
}
|
||||
}
|
||||
|
||||
void Waveforms::compileOpenGLShaderProgram ()
|
||||
{
|
||||
std::unique_ptr<OpenGLShaderProgram> shaderProgramAttempt
|
||||
= std::make_unique<OpenGLShaderProgram>(m_context);
|
||||
if (shaderProgramAttempt->addVertexShader({BinaryData::WaveForm_vertex_glsl})
|
||||
&& shaderProgramAttempt->addFragmentShader({BinaryData::WaveForm_fragment_glsl})
|
||||
&& shaderProgramAttempt->link())
|
||||
= std::make_unique<OpenGLShaderProgram> (m_context);
|
||||
if (shaderProgramAttempt->addVertexShader ({BinaryData::WaveForm_vertex_glsl})
|
||||
&& shaderProgramAttempt->addFragmentShader ({BinaryData::WaveForm_fragment_glsl})
|
||||
&& shaderProgramAttempt->link ())
|
||||
{
|
||||
shaderProgram = std::move(shaderProgramAttempt);
|
||||
shaderProgram = std::move (shaderProgramAttempt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,6 +106,8 @@ void Waveforms::mouseDown (const MouseEvent& e)
|
|||
{
|
||||
m_mode = 0;
|
||||
}
|
||||
dBScale->m_mode = m_mode;
|
||||
dBScale->repaint ();
|
||||
}
|
||||
|
||||
void Waveforms::mouseDrag (const MouseEvent& e)
|
||||
|
|
@ -113,16 +119,16 @@ void Waveforms::timerCallback ()
|
|||
{
|
||||
if (m_isWelcome || m_isStarting || m_isChangingData || needToClear)
|
||||
{
|
||||
repaint();
|
||||
repaint ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_context.isAttached())
|
||||
if (m_context.isAttached ())
|
||||
{
|
||||
m_context.triggerRepaint();
|
||||
m_context.triggerRepaint ();
|
||||
}
|
||||
}
|
||||
setFps();
|
||||
setFps ();
|
||||
}
|
||||
|
||||
void Waveforms::drawWaveTable ()
|
||||
|
|
@ -133,61 +139,56 @@ void Waveforms::drawWaveTable ()
|
|||
void Waveforms::drawAudioOutput ()
|
||||
{
|
||||
// draw audio from the oscillators
|
||||
auto instance = VenoInstance::getInstance(BaseComponent::m_processId);
|
||||
auto buffer = instance->audioBuffer->getBuffer();
|
||||
glBegin(GL_LINE_STRIP);
|
||||
auto instance = VenoInstance::getInstance (BaseComponent::m_processId);
|
||||
auto buffer = instance->audioBuffer->getBuffer ();
|
||||
glBegin (GL_LINE_STRIP);
|
||||
float posX = -1;
|
||||
float inc = 2.0f / buffer.size();
|
||||
float inc = 2.0f / buffer.size ();
|
||||
for (float i : buffer)
|
||||
{
|
||||
glVertex2f(posX, i);
|
||||
glVertex2f (posX, i);
|
||||
posX += inc;
|
||||
}
|
||||
glEnd();
|
||||
glEnd ();
|
||||
}
|
||||
|
||||
void Waveforms::drawPeakMeter ()
|
||||
{
|
||||
auto theme = Config::getInstance()->getCurrentTheme();
|
||||
auto theme = Config::getInstance ()->getCurrentTheme ();
|
||||
if (theme == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto instance = VenoInstance::getInstance(BaseComponent::m_processId);
|
||||
instance->audioBuffer->calcPeak();
|
||||
auto instance = VenoInstance::getInstance (BaseComponent::m_processId);
|
||||
instance->audioBuffer->calcPeak ();
|
||||
repaint();
|
||||
// draw peak signal
|
||||
auto leftChannel = getdBForChannel(instance->audioBuffer->leftPeak);
|
||||
selectColourByPeak(leftChannel);
|
||||
glBegin(GL_TRIANGLES);
|
||||
glVertex2f(-0.9f, leftChannel);
|
||||
glVertex2f(-0.9f, -1.0f);
|
||||
glVertex2f(-0.01f, -1.0f);
|
||||
glVertex2f(-0.9f, leftChannel);
|
||||
glVertex2f(-0.01f, leftChannel);
|
||||
glVertex2f(-0.01f, -1.0f);
|
||||
glEnd();
|
||||
auto rightChannel = getdBForChannel(instance->audioBuffer->rightPeak);
|
||||
selectColourByPeak(rightChannel);
|
||||
glBegin(GL_TRIANGLES);
|
||||
glVertex2f(0.9f, rightChannel);
|
||||
glVertex2f(0.9f, -1.0f);
|
||||
glVertex2f(0.01f, -1.0f);
|
||||
glVertex2f(0.9f, rightChannel);
|
||||
glVertex2f(0.01f, rightChannel);
|
||||
glVertex2f(0.01f, -1.0f);
|
||||
glEnd();
|
||||
auto leftChannel = getdBForChannel (instance->audioBuffer->leftPeak);
|
||||
selectColourByPeak (leftChannel);
|
||||
glBegin (GL_TRIANGLES);
|
||||
glVertex2f (-0.9f, leftChannel);
|
||||
glVertex2f (-0.9f, -1.0f);
|
||||
glVertex2f (-0.08f, -1.0f);
|
||||
glEnd ();
|
||||
auto rightChannel = getdBForChannel (instance->audioBuffer->rightPeak);
|
||||
selectColourByPeak (rightChannel);
|
||||
glBegin (GL_TRIANGLES);
|
||||
glVertex2f (0.9f, rightChannel);
|
||||
glVertex2f (0.9f, -1.0f);
|
||||
glVertex2f (0.08f, -1.0f);
|
||||
glEnd ();
|
||||
}
|
||||
|
||||
void Waveforms::paint (Graphics& g)
|
||||
{
|
||||
std::shared_ptr<Theme> theme = Config::getInstance()->getCurrentTheme();
|
||||
auto accent = theme->getColour(ThemeColour::lcd);
|
||||
g.setColour(accent);
|
||||
std::shared_ptr<Theme> theme = Config::getInstance ()->getCurrentTheme ();
|
||||
auto accent = theme->getColour (ThemeColour::lcd);
|
||||
g.setColour (accent);
|
||||
g.setFont(*VenoFonts::getLCD());
|
||||
VeNo::Utils::setFontSize(16.0f, g);
|
||||
VeNo::Utils::setFontSize (16.0f, g);
|
||||
if (m_isWelcome)
|
||||
{
|
||||
drawWelcome(g, getWidth(), getHeight(), 0, 0);
|
||||
drawWelcome (g, getWidth (), getHeight (), 0, 0);
|
||||
m_ticks++;
|
||||
if (m_ticks > m_time_needed_startup)
|
||||
{
|
||||
|
|
@ -198,8 +199,8 @@ void Waveforms::paint (Graphics& g)
|
|||
}
|
||||
else if (m_isStarting)
|
||||
{
|
||||
g.drawText(m_warmUpText[pickRandomText], 0, 0, getWidth(), getHeight(),
|
||||
Justification::centred, true);
|
||||
g.drawText (m_warmUpText[pickRandomText], 0, 0, getWidth (), getHeight (),
|
||||
Justification::centred, true);
|
||||
m_ticks++;
|
||||
if (m_ticks > m_time_needed_startup)
|
||||
{
|
||||
|
|
@ -210,7 +211,7 @@ void Waveforms::paint (Graphics& g)
|
|||
}
|
||||
else if (m_isChangingData)
|
||||
{
|
||||
drawChangedParameter(g, getWidth(), getHeight(), 0, 0);
|
||||
drawChangedParameter (g, getWidth (), getHeight (), 0, 0);
|
||||
m_ticks++;
|
||||
if (m_ticks > m_time_needed)
|
||||
{
|
||||
|
|
@ -221,27 +222,46 @@ void Waveforms::paint (Graphics& g)
|
|||
}
|
||||
else
|
||||
{
|
||||
g.resetToDefaultState();
|
||||
needToClear = false;
|
||||
if (needToClear) {
|
||||
dBScale->m_mode = m_mode;
|
||||
dBScale->repaint();
|
||||
g.resetToDefaultState ();
|
||||
needToClear = false;
|
||||
}
|
||||
g.setFont(*VenoFonts::getLCD());
|
||||
VeNo::Utils::setFontSize (16.0f, g);
|
||||
if (m_mode == 0)
|
||||
{
|
||||
auto instance = VenoInstance::getInstance (BaseComponent::m_processId);
|
||||
g.setColour (theme->getColour (ThemeColour::lcd_bg));
|
||||
float size = VeNo::Utils::setFontSize (7, g);
|
||||
auto halfWidth = getWidth () / 2;
|
||||
auto halfHalfWidth = halfWidth / 2;
|
||||
auto y = getHeight () - size;
|
||||
g.drawText (std::to_string (instance->audioBuffer->leftPeak), halfWidth - halfHalfWidth - (size * 1.5), y,
|
||||
(size * 3), size, Justification::centred, false);
|
||||
g.drawText (std::to_string (instance->audioBuffer->rightPeak), halfWidth + halfHalfWidth - (size * 1.5), y,
|
||||
(size * 3), size, Justification::centred, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Waveforms::drawChangedParameter (Graphics& g, int w, int h, int x, int y) const
|
||||
{
|
||||
int halfHeight = h / 2;
|
||||
float font = VeNo::Utils::setFontSize(12, g);
|
||||
g.drawText(changingParameter, x, y + halfHeight - font, w, font, Justification::centred, true);
|
||||
g.drawText(std::to_string(changedValue), x, y + halfHeight + 4, w, font, Justification::centred,
|
||||
true);
|
||||
float font = VeNo::Utils::setFontSize (12, g);
|
||||
g.drawText (changingParameter, x, y + halfHeight - font, w, font, Justification::centred, true);
|
||||
g.drawText (std::to_string (changedValue), x, y + halfHeight + 4, w, font, Justification::centred,
|
||||
true);
|
||||
}
|
||||
|
||||
void Waveforms::drawWelcome (Graphics& g, int w, int h, int x, int y)
|
||||
{
|
||||
float font = VeNo::Utils::setFontSize(12, g);
|
||||
float font = VeNo::Utils::setFontSize (12, g);
|
||||
int halfHeight = h / 2;
|
||||
g.drawText(m_readyText, x, y + halfHeight - font, w, font, Justification::centred, true);
|
||||
g.drawText(SystemStats::getLogonName(), x, y + halfHeight + 4, w, font, Justification::centred,
|
||||
true);
|
||||
g.drawText (m_readyText, x, y + halfHeight - font, w, font, Justification::centred, true);
|
||||
g.drawText (SystemStats::getLogonName (), x, y + halfHeight + 4, w, font, Justification::centred,
|
||||
true);
|
||||
}
|
||||
|
||||
void Waveforms::drawSpectrum ()
|
||||
|
|
@ -250,39 +270,45 @@ void Waveforms::drawSpectrum ()
|
|||
|
||||
void Waveforms::selectColourByPeak (float value)
|
||||
{
|
||||
auto theme = Config::getInstance()->getCurrentTheme();
|
||||
auto theme = Config::getInstance ()->getCurrentTheme ();
|
||||
if (theme == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
auto color = theme->getColour(ThemeColour::lcd);
|
||||
if (value > 0.9)
|
||||
auto color = theme->getColour (ThemeColour::lcd);
|
||||
if (value > 0.87)
|
||||
{
|
||||
color = theme->getColour(ThemeColour::clip);
|
||||
color = theme->getColour (ThemeColour::clip);
|
||||
}
|
||||
else if (value > 0.8)
|
||||
else if (value > 0.75)
|
||||
{
|
||||
color = theme->getColour(ThemeColour::warning);
|
||||
color = theme->getColour (ThemeColour::warning);
|
||||
}
|
||||
shaderProgram->setUniform("color", color.getFloatRed(), color.getFloatGreen(), color.getFloatBlue(),
|
||||
color.getFloatAlpha());
|
||||
shaderProgram->setUniform ("color", color.getFloatRed (), color.getFloatGreen (), color.getFloatBlue (),
|
||||
color.getFloatAlpha ());
|
||||
}
|
||||
|
||||
float Waveforms::getdBForChannel (float value)
|
||||
{
|
||||
float v = VeNo::Utils::clamp(Decibels::gainToDecibels(value, -60.0f), -60.0f, 6.0f);
|
||||
return jmap(v, -60.0f, 6.0f, -1.0f,
|
||||
1.0f);
|
||||
return jmap (value, -30.0f, 0.0f, -1.0f,
|
||||
0.9f);
|
||||
}
|
||||
|
||||
void Waveforms::setFps ()
|
||||
{
|
||||
if(m_currentFps != Config::getInstance()->getFps()) {
|
||||
m_currentFps = Config::getInstance()->getFps();
|
||||
if (m_currentFps != Config::getInstance ()->getFps ())
|
||||
{
|
||||
m_currentFps = Config::getInstance ()->getFps ();
|
||||
// is something that
|
||||
m_time_needed = roundToInt(4000 / (1000 / m_currentFps));
|
||||
m_time_needed_startup = roundToInt(1000 / (1000 / m_currentFps));
|
||||
stopTimer();
|
||||
startTimer(m_currentFps);
|
||||
m_time_needed = roundToInt (4000 / (1000 / m_currentFps));
|
||||
m_time_needed_startup = roundToInt (1000 / (1000 / m_currentFps));
|
||||
stopTimer ();
|
||||
startTimer (m_currentFps);
|
||||
}
|
||||
}
|
||||
void Waveforms::resized ()
|
||||
{
|
||||
auto halfWidth = getWidth () / 2;
|
||||
auto w = VeNo::Utils::getCalculatedWidth (21);
|
||||
dBScale->setBounds (halfWidth - (w / 2), 0, w, getHeight ());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
//
|
||||
//
|
||||
// Created by versustune on 11.06.20.
|
||||
//
|
||||
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "JuceHeader.h"
|
||||
#include "../BaseComponent.h"
|
||||
#include "DecibelScale.h"
|
||||
|
||||
#define RANDOM_TEXT_COUNT 5
|
||||
// opengl context :D
|
||||
|
|
@ -36,6 +37,7 @@ public:
|
|||
void mouseDown (const MouseEvent& e) override;
|
||||
void mouseDrag (const MouseEvent& e) override;
|
||||
void paint (Graphics& g) override;
|
||||
void resized () override;
|
||||
bool m_isChangingData = false;
|
||||
std::string changingParameter = "";
|
||||
float changedValue = 0;
|
||||
|
|
@ -53,6 +55,7 @@ private:
|
|||
void setFps();
|
||||
OpenGLContext m_context;
|
||||
std::unique_ptr<OpenGLShaderProgram> shaderProgram;
|
||||
std::unique_ptr<DecibelScale> dBScale;
|
||||
int m_currentFps = 0;
|
||||
};
|
||||
#endif //VENO_WAVEFORMS_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue