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.

89 lines
3.9KB

  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. OpenGLPixelFormat::OpenGLPixelFormat (const OpenGLPixelFormat& other) noexcept
  36. : 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. }
  49. OpenGLPixelFormat& OpenGLPixelFormat::operator= (const OpenGLPixelFormat& other) noexcept
  50. {
  51. redBits = other.redBits;
  52. greenBits = other.greenBits;
  53. blueBits = other.blueBits;
  54. alphaBits = other.alphaBits;
  55. depthBufferBits = other.depthBufferBits;
  56. stencilBufferBits = other.stencilBufferBits;
  57. accumulationBufferRedBits = other.accumulationBufferRedBits;
  58. accumulationBufferGreenBits = other.accumulationBufferGreenBits;
  59. accumulationBufferBlueBits = other.accumulationBufferBlueBits;
  60. accumulationBufferAlphaBits = other.accumulationBufferAlphaBits;
  61. multisamplingLevel = other.multisamplingLevel;
  62. return *this;
  63. }
  64. bool OpenGLPixelFormat::operator== (const OpenGLPixelFormat& other) const noexcept
  65. {
  66. return redBits == other.redBits
  67. && greenBits == other.greenBits
  68. && blueBits == other.blueBits
  69. && alphaBits == other.alphaBits
  70. && depthBufferBits == other.depthBufferBits
  71. && stencilBufferBits == other.stencilBufferBits
  72. && accumulationBufferRedBits == other.accumulationBufferRedBits
  73. && accumulationBufferGreenBits == other.accumulationBufferGreenBits
  74. && accumulationBufferBlueBits == other.accumulationBufferBlueBits
  75. && accumulationBufferAlphaBits == other.accumulationBufferAlphaBits
  76. && multisamplingLevel == other.multisamplingLevel;
  77. }