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.

48 lines
1.5KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 6 technical preview.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For this technical preview, this file is not subject to commercial licensing.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. namespace juce
  14. {
  15. //==============================================================================
  16. /**
  17. A type of ImagePixelData that stores its image data in an OpenGL
  18. framebuffer, allowing a JUCE Image object to wrap a framebuffer.
  19. By creating an Image from an instance of an OpenGLFrameBufferImage,
  20. you can then use a Graphics object to draw into the framebuffer using normal
  21. JUCE 2D operations.
  22. @see Image, ImageType, ImagePixelData, OpenGLFrameBuffer
  23. @tags{OpenGL}
  24. */
  25. class JUCE_API OpenGLImageType : public ImageType
  26. {
  27. public:
  28. OpenGLImageType();
  29. ~OpenGLImageType() override;
  30. ImagePixelData::Ptr create (Image::PixelFormat, int width, int height, bool shouldClearImage) const override;
  31. int getTypeID() const override;
  32. static OpenGLFrameBuffer* getFrameBufferFrom (const Image&);
  33. };
  34. } // namespace juce