#pragma once #include "JuceHeader.h" class MainComponent : public Component { public: //============================================================================== MainComponent() { setSize(600, 400); setOpaque(true); openGLContext.attachTo(*getTopLevelComponent()); } //============================================================================== void paint (Graphics& g) override { // (Our component is opaque, so we must completely fill the background with a solid colour) g.fillAll(getLookAndFeel().findColour(ResizableWindow::backgroundColourId)); } private: //============================================================================== OpenGLContext openGLContext; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainComponent) };