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.

OpenGlWidget.hpp 546B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
1234567891011121314151617181920212223
  1. #pragma once
  2. #include <widget/FramebufferWidget.hpp>
  3. namespace rack {
  4. namespace widget {
  5. /** A FramebufferWidget that can be drawn on with OpenGL commands */
  6. struct OpenGlWidget : FramebufferWidget {
  7. /** Draws every frame by default
  8. Override this and call `FramebufferWidget::step()` to restore the default behavior of FramebufferWidget.
  9. */
  10. void step() override;
  11. /** Draws to the framebuffer.
  12. Override to initialize, draw, and flush the OpenGL state.
  13. */
  14. void drawFramebuffer() override;
  15. };
  16. } // namespace widget
  17. } // namespace rack