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.

127 lines
4.1KB

  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. #ifndef JUCE_OPENGL_H_INCLUDED
  18. #define JUCE_OPENGL_H_INCLUDED
  19. #include "../juce_gui_extra/juce_gui_extra.h"
  20. #undef JUCE_OPENGL
  21. #define JUCE_OPENGL 1
  22. #if JUCE_IOS || JUCE_ANDROID
  23. #define JUCE_OPENGL_ES 1
  24. #endif
  25. #if JUCE_WINDOWS
  26. #ifndef APIENTRY
  27. #define APIENTRY __stdcall
  28. #define CLEAR_TEMP_APIENTRY 1
  29. #endif
  30. #ifndef WINGDIAPI
  31. #define WINGDIAPI __declspec(dllimport)
  32. #define CLEAR_TEMP_WINGDIAPI 1
  33. #endif
  34. #include <gl/GL.h>
  35. #ifdef CLEAR_TEMP_WINGDIAPI
  36. #undef WINGDIAPI
  37. #undef CLEAR_TEMP_WINGDIAPI
  38. #endif
  39. #ifdef CLEAR_TEMP_APIENTRY
  40. #undef APIENTRY
  41. #undef CLEAR_TEMP_APIENTRY
  42. #endif
  43. #elif JUCE_LINUX
  44. #include <GL/gl.h>
  45. #undef KeyPress
  46. #elif JUCE_IOS
  47. #include <OpenGLES/ES2/gl.h>
  48. #elif JUCE_MAC
  49. #if defined (MAC_OS_X_VERSION_10_7) && (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7)
  50. #define JUCE_OPENGL3 1
  51. #include <OpenGL/gl3.h>
  52. #include <OpenGL/gl3ext.h>
  53. #else
  54. #include <OpenGL/gl.h>
  55. #include "OpenGL/glext.h"
  56. #endif
  57. #elif JUCE_ANDROID
  58. #include <GLES2/gl2.h>
  59. #endif
  60. //=============================================================================
  61. #if JUCE_OPENGL_ES || defined (DOXYGEN)
  62. /** This macro is a helper for use in GLSL shader code which needs to compile on both GLES and desktop GL.
  63. Since it's mandatory in GLES to mark a variable with a precision, but the keywords don't exist in normal GLSL,
  64. these macros define the various precision keywords only on GLES.
  65. */
  66. #define JUCE_MEDIUMP "mediump"
  67. /** This macro is a helper for use in GLSL shader code which needs to compile on both GLES and desktop GL.
  68. Since it's mandatory in GLES to mark a variable with a precision, but the keywords don't exist in normal GLSL,
  69. these macros define the various precision keywords only on GLES.
  70. */
  71. #define JUCE_HIGHP "highp"
  72. /** This macro is a helper for use in GLSL shader code which needs to compile on both GLES and desktop GL.
  73. Since it's mandatory in GLES to mark a variable with a precision, but the keywords don't exist in normal GLSL,
  74. these macros define the various precision keywords only on GLES.
  75. */
  76. #define JUCE_LOWP "lowp"
  77. #else
  78. #define JUCE_MEDIUMP
  79. #define JUCE_HIGHP
  80. #define JUCE_LOWP
  81. #endif
  82. //=============================================================================
  83. namespace juce
  84. {
  85. class OpenGLTexture;
  86. class OpenGLFrameBuffer;
  87. class OpenGLShaderProgram;
  88. #include "native/juce_MissingGLDefinitions.h"
  89. #include "opengl/juce_OpenGLHelpers.h"
  90. #include "opengl/juce_Quaternion.h"
  91. #include "opengl/juce_Matrix3D.h"
  92. #include "opengl/juce_Draggable3DOrientation.h"
  93. #include "opengl/juce_OpenGLPixelFormat.h"
  94. #include "native/juce_OpenGLExtensions.h"
  95. #include "opengl/juce_OpenGLRenderer.h"
  96. #include "opengl/juce_OpenGLContext.h"
  97. #include "opengl/juce_OpenGLFrameBuffer.h"
  98. #include "opengl/juce_OpenGLGraphicsContext.h"
  99. #include "opengl/juce_OpenGLHelpers.h"
  100. #include "opengl/juce_OpenGLImage.h"
  101. #include "opengl/juce_OpenGLRenderer.h"
  102. #include "opengl/juce_OpenGLShaderProgram.h"
  103. #include "opengl/juce_OpenGLTexture.h"
  104. #include "opengl/juce_Vector3D.h"
  105. }
  106. #endif // JUCE_OPENGL_H_INCLUDED