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.

61 lines
2.2KB

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