The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.9KB

  1. #pragma once
  2. %%include_juce%%
  3. //==============================================================================
  4. /*
  5. This component lives inside our window, and this is where you should put all
  6. your controls and content.
  7. */
  8. class %%content_component_class%% : public juce::OpenGLAppComponent
  9. {
  10. public:
  11. //==============================================================================
  12. %%content_component_class%%()
  13. {
  14. // Make sure you set the size of the component after
  15. // you add any child components.
  16. setSize (800, 600);
  17. }
  18. ~%%content_component_class%%() override
  19. {
  20. // This shuts down the GL system and stops the rendering calls.
  21. shutdownOpenGL();
  22. }
  23. //==============================================================================
  24. void initialise() override
  25. {
  26. // Initialise GL objects for rendering here.
  27. }
  28. void shutdown() override
  29. {
  30. // Free any GL objects created for rendering here.
  31. }
  32. void render() override
  33. {
  34. // This clears the context with a black background.
  35. juce::OpenGLHelpers::clear (Colours::black);
  36. // Add your rendering code here...
  37. }
  38. //==============================================================================
  39. void paint (juce::Graphics& g) override
  40. {
  41. // You can add your component specific drawing code here!
  42. // This will draw over the top of the openGL background.
  43. }
  44. void resized() override
  45. {
  46. // This is called when the MainContentComponent is resized.
  47. // If you add any child components, this is where you should
  48. // update their positions.
  49. }
  50. private:
  51. //==============================================================================
  52. // Your private member variables go here...
  53. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (%%content_component_class%%)
  54. };