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.

130 lines
5.0KB

  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. #if JUCE_WINDOWS
  19. #define JUCE_DECLARE_GL_EXTENSION_FUNCTION(name, returnType, params, callparams) \
  20. typedef returnType (__stdcall *type_ ## name) params; static type_ ## name name = nullptr;
  21. #else
  22. #define JUCE_DECLARE_GL_EXTENSION_FUNCTION(name, returnType, params, callparams) \
  23. typedef returnType (*type_ ## name) params; static type_ ## name name = nullptr;
  24. #endif
  25. namespace
  26. {
  27. #ifndef GL_BGRA_EXT
  28. enum { GL_BGRA_EXT = 0x80e1 };
  29. #endif
  30. #ifndef GL_CLAMP_TO_EDGE
  31. enum { GL_CLAMP_TO_EDGE = 0x812f };
  32. #endif
  33. #ifndef GL_NUM_EXTENSIONS
  34. enum { GL_NUM_EXTENSIONS = 0x821d };
  35. #endif
  36. #ifndef GL_RGBA8
  37. #define GL_RGBA8 GL_RGBA
  38. #endif
  39. #if (! defined (GL_DEPTH24_STENCIL8)) && ! JUCE_WINDOWS
  40. enum { GL_DEPTH24_STENCIL8 = 0x88F0 };
  41. #endif
  42. #if JUCE_ANDROID
  43. enum { JUCE_RGBA_FORMAT = GL_RGBA };
  44. #else
  45. enum { JUCE_RGBA_FORMAT = GL_BGRA_EXT };
  46. #endif
  47. #if JUCE_WINDOWS
  48. enum
  49. {
  50. WGL_NUMBER_PIXEL_FORMATS_ARB = 0x2000,
  51. WGL_DRAW_TO_WINDOW_ARB = 0x2001,
  52. WGL_ACCELERATION_ARB = 0x2003,
  53. WGL_SWAP_METHOD_ARB = 0x2007,
  54. WGL_SUPPORT_OPENGL_ARB = 0x2010,
  55. WGL_PIXEL_TYPE_ARB = 0x2013,
  56. WGL_DOUBLE_BUFFER_ARB = 0x2011,
  57. WGL_COLOR_BITS_ARB = 0x2014,
  58. WGL_RED_BITS_ARB = 0x2015,
  59. WGL_GREEN_BITS_ARB = 0x2017,
  60. WGL_BLUE_BITS_ARB = 0x2019,
  61. WGL_ALPHA_BITS_ARB = 0x201B,
  62. WGL_DEPTH_BITS_ARB = 0x2022,
  63. WGL_STENCIL_BITS_ARB = 0x2023,
  64. WGL_FULL_ACCELERATION_ARB = 0x2027,
  65. WGL_ACCUM_RED_BITS_ARB = 0x201E,
  66. WGL_ACCUM_GREEN_BITS_ARB = 0x201F,
  67. WGL_ACCUM_BLUE_BITS_ARB = 0x2020,
  68. WGL_ACCUM_ALPHA_BITS_ARB = 0x2021,
  69. WGL_STEREO_ARB = 0x2012,
  70. WGL_SAMPLE_BUFFERS_ARB = 0x2041,
  71. WGL_SAMPLES_ARB = 0x2042,
  72. WGL_TYPE_RGBA_ARB = 0x202B,
  73. GL_OPERAND0_RGB = 0x8590,
  74. GL_OPERAND1_RGB = 0x8591,
  75. GL_OPERAND0_ALPHA = 0x8598,
  76. GL_OPERAND1_ALPHA = 0x8599,
  77. GL_SRC0_RGB = 0x8580,
  78. GL_SRC1_RGB = 0x8581,
  79. GL_SRC0_ALPHA = 0x8588,
  80. GL_SRC1_ALPHA = 0x8589,
  81. GL_TEXTURE0 = 0x84C0,
  82. GL_TEXTURE1 = 0x84C1,
  83. GL_TEXTURE2 = 0x84C2,
  84. GL_COMBINE = 0x8570,
  85. GL_COMBINE_RGB = 0x8571,
  86. GL_COMBINE_ALPHA = 0x8572,
  87. GL_PREVIOUS = 0x8578,
  88. GL_COMPILE_STATUS = 0x8B81,
  89. GL_LINK_STATUS = 0x8B82,
  90. GL_SHADING_LANGUAGE_VERSION = 0x8B8C,
  91. GL_FRAGMENT_SHADER = 0x8B30,
  92. GL_VERTEX_SHADER = 0x8B31,
  93. GL_FRAMEBUFFER = 0x8D40,
  94. GL_RENDERBUFFER = 0x8D41,
  95. GL_FRAMEBUFFER_BINDING = 0x8CA6,
  96. GL_COLOR_ATTACHMENT0 = 0x8CE0,
  97. GL_DEPTH_ATTACHMENT = 0x8D00,
  98. GL_STENCIL_ATTACHMENT = 0x8D20,
  99. GL_FRAMEBUFFER_COMPLETE = 0x8CD5,
  100. GL_DEPTH24_STENCIL8 = 0x88F0,
  101. GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54,
  102. GL_ARRAY_BUFFER = 0x8892,
  103. GL_ELEMENT_ARRAY_BUFFER = 0x8893,
  104. GL_STATIC_DRAW = 0x88E4,
  105. GL_DYNAMIC_DRAW = 0x88E8
  106. };
  107. typedef char GLchar;
  108. typedef pointer_sized_int GLsizeiptr;
  109. typedef pointer_sized_int GLintptr;
  110. #endif
  111. }