Skip to content

Commit

Permalink
Apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
COx2 committed Nov 7, 2020
1 parent 8a8424d commit c6151c5
Show file tree
Hide file tree
Showing 12 changed files with 1,039 additions and 942 deletions.
371 changes: 189 additions & 182 deletions GLSLPlugIn/Source/GLSLComponent.cpp

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions GLSLPlugIn/Source/GLSLComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,40 @@
This component lives inside our window, and this is where you should put all
your controls and content.
*/
class GLSLComponent : public OpenGLAppComponent,
public AsyncUpdater
class GLSLComponent : public OpenGLAppComponent,
public AsyncUpdater
{
public:
//==============================================================================
GLSLComponent();
~GLSLComponent();
GLSLComponent();
~GLSLComponent();

//==============================================================================
void initialise() override;
void shutdown() override;
void render() override;
void initialise() override;
void shutdown() override;
void render() override;

//==============================================================================
void paint(Graphics& g) override;
void resized() override;
void paint (Graphics& g) override;
void resized() override;

//==============================================================================
void setStatusLabelPtr(Label* _statusLabel);
void setFragmentDocPtr(CodeDocument* _fragmentDoc);
void setStatusLabelPtr (Label* _statusLabel);
void setFragmentDocPtr (CodeDocument* _fragmentDoc);

//==============================================================================
void setShaderProgram(const String& vertexShader, const String& fragmentShader);
void setShaderProgramFragment(const String& _fragmentShader);
void setShaderProgramVertex(const String& _vertexShader);
void setShaderProgram (const String& vertexShader, const String& fragmentShader);
void setShaderProgramFragment (const String& _fragmentShader);
void setShaderProgramVertex (const String& _vertexShader);

//==============================================================================
void setMidiCCValue(int ccNumber, float value);
void setSpectrumValue(int spectrumNumber, float value);
void setWaveValue(int waveNumber, float value);
void setMidiCCValue (int ccNumber, float value);
void setSpectrumValue (int spectrumNumber, float value);
void setWaveValue (int waveNumber, float value);

//==============================================================================
bool isInitialised = false;
bool isShaderCompileSuccess = false;
bool isInitialised = false;
bool isShaderCompileSuccess = false;

static const String defaultVertexShader;
static const String defaultFragmentShader;
Expand All @@ -60,36 +60,36 @@ class GLSLComponent : public OpenGLAppComponent,
//==============================================================================
virtual void handleAsyncUpdate() override;

//==============================================================================
void createShaders();
void updateShader();
void mouseDrag(const MouseEvent& event) override;
//==============================================================================
void createShaders();
void updateShader();
void mouseDrag (const MouseEvent& event) override;

//==============================================================================
Matrix3D<float> getProjectionMatrix() const;
Matrix3D<float> getViewMatrix() const;
Matrix3D<float> getProjectionMatrix() const;
Matrix3D<float> getViewMatrix() const;

//==============================================================================
String vertexShader;
String fragmentShader;

String statusText{};
Label* statusLabel = nullptr;
CodeDocument* fragmentDoc = nullptr;
String statusText {};
Label* statusLabel = nullptr;
CodeDocument* fragmentDoc = nullptr;

std::unique_ptr<OpenGLShaderProgram> shader;
std::unique_ptr<Shape> shape;
std::unique_ptr<Attributes> attributes;
std::unique_ptr<Uniforms> uniforms;

GLfloat timeCounter = 0.0f;
GLfloat timeCounter = 0.0f;

String newVertexShader, newFragmentShader;
bool isShaderCompileReady = false;
float mouseX, mouseY;
float m_midiCC[128] = {0};
float m_spectrum[256] = {0};
float m_wave[256] = {0};
bool isShaderCompileReady = false;
float mouseX, mouseY;
float m_midiCC[128] = { 0 };
float m_spectrum[256] = { 0 };
float m_wave[256] = { 0 };

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(GLSLComponent)
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (GLSLComponent)
};
Loading

0 comments on commit c6151c5

Please sign in to comment.