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.

63 lines
2.7KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-11 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. OpenGLPixelFormat::OpenGLPixelFormat (const int bitsPerRGBComponent,
  19. const int alphaBits_,
  20. const int depthBufferBits_,
  21. const int stencilBufferBits_) noexcept
  22. : redBits (bitsPerRGBComponent),
  23. greenBits (bitsPerRGBComponent),
  24. blueBits (bitsPerRGBComponent),
  25. alphaBits (alphaBits_),
  26. depthBufferBits (depthBufferBits_),
  27. stencilBufferBits (stencilBufferBits_),
  28. accumulationBufferRedBits (0),
  29. accumulationBufferGreenBits (0),
  30. accumulationBufferBlueBits (0),
  31. accumulationBufferAlphaBits (0),
  32. multisamplingLevel (0)
  33. {
  34. }
  35. bool OpenGLPixelFormat::operator== (const OpenGLPixelFormat& other) const noexcept
  36. {
  37. return redBits == other.redBits
  38. && greenBits == other.greenBits
  39. && blueBits == other.blueBits
  40. && alphaBits == other.alphaBits
  41. && depthBufferBits == other.depthBufferBits
  42. && stencilBufferBits == other.stencilBufferBits
  43. && accumulationBufferRedBits == other.accumulationBufferRedBits
  44. && accumulationBufferGreenBits == other.accumulationBufferGreenBits
  45. && accumulationBufferBlueBits == other.accumulationBufferBlueBits
  46. && accumulationBufferAlphaBits == other.accumulationBufferAlphaBits
  47. && multisamplingLevel == other.multisamplingLevel;
  48. }
  49. bool OpenGLPixelFormat::operator!= (const OpenGLPixelFormat& other) const noexcept
  50. {
  51. return ! operator== (other);
  52. }