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.

76 lines
2.1KB

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