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.

71 lines
3.1KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifndef JUCE_OPENGLPIXELFORMAT_H_INCLUDED
  18. #define JUCE_OPENGLPIXELFORMAT_H_INCLUDED
  19. //==============================================================================
  20. /**
  21. Represents the various properties of an OpenGL pixel format.
  22. @see OpenGLContext::setPixelFormat
  23. */
  24. class JUCE_API OpenGLPixelFormat
  25. {
  26. public:
  27. //==============================================================================
  28. /** Creates an OpenGLPixelFormat.
  29. The default constructor just initialises the object as a simple 8-bit
  30. RGBA format.
  31. */
  32. OpenGLPixelFormat (int bitsPerRGBComponent = 8,
  33. int alphaBits = 8,
  34. int depthBufferBits = 16,
  35. int stencilBufferBits = 0) noexcept;
  36. bool operator== (const OpenGLPixelFormat&) const noexcept;
  37. bool operator!= (const OpenGLPixelFormat&) const noexcept;
  38. //==============================================================================
  39. int redBits; /**< The number of bits per pixel to use for the red channel. */
  40. int greenBits; /**< The number of bits per pixel to use for the green channel. */
  41. int blueBits; /**< The number of bits per pixel to use for the blue channel. */
  42. int alphaBits; /**< The number of bits per pixel to use for the alpha channel. */
  43. int depthBufferBits; /**< The number of bits per pixel to use for a depth buffer. */
  44. int stencilBufferBits; /**< The number of bits per pixel to use for a stencil buffer. */
  45. int accumulationBufferRedBits; /**< The number of bits per pixel to use for an accumulation buffer's red channel. */
  46. int accumulationBufferGreenBits; /**< The number of bits per pixel to use for an accumulation buffer's green channel. */
  47. int accumulationBufferBlueBits; /**< The number of bits per pixel to use for an accumulation buffer's blue channel. */
  48. int accumulationBufferAlphaBits; /**< The number of bits per pixel to use for an accumulation buffer's alpha channel. */
  49. uint8 multisamplingLevel; /**< The number of samples to use for full-scene multisampled anti-aliasing (if available). */
  50. };
  51. #endif // JUCE_OPENGLPIXELFORMAT_H_INCLUDED