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.

62 lines
2.5KB

  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. OpenGLPixelFormat::OpenGLPixelFormat (const int bitsPerRGBComponent,
  18. const int alphaBits_,
  19. const int depthBufferBits_,
  20. const int stencilBufferBits_) noexcept
  21. : redBits (bitsPerRGBComponent),
  22. greenBits (bitsPerRGBComponent),
  23. blueBits (bitsPerRGBComponent),
  24. alphaBits (alphaBits_),
  25. depthBufferBits (depthBufferBits_),
  26. stencilBufferBits (stencilBufferBits_),
  27. accumulationBufferRedBits (0),
  28. accumulationBufferGreenBits (0),
  29. accumulationBufferBlueBits (0),
  30. accumulationBufferAlphaBits (0),
  31. multisamplingLevel (0)
  32. {
  33. }
  34. bool OpenGLPixelFormat::operator== (const OpenGLPixelFormat& other) const noexcept
  35. {
  36. return redBits == other.redBits
  37. && greenBits == other.greenBits
  38. && blueBits == other.blueBits
  39. && alphaBits == other.alphaBits
  40. && depthBufferBits == other.depthBufferBits
  41. && stencilBufferBits == other.stencilBufferBits
  42. && accumulationBufferRedBits == other.accumulationBufferRedBits
  43. && accumulationBufferGreenBits == other.accumulationBufferGreenBits
  44. && accumulationBufferBlueBits == other.accumulationBufferBlueBits
  45. && accumulationBufferAlphaBits == other.accumulationBufferAlphaBits
  46. && multisamplingLevel == other.multisamplingLevel;
  47. }
  48. bool OpenGLPixelFormat::operator!= (const OpenGLPixelFormat& other) const noexcept
  49. {
  50. return ! operator== (other);
  51. }