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
4.5KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 6 End-User License
  8. Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
  9. End User License Agreement: www.juce.com/juce-6-licence
  10. Privacy Policy: www.juce.com/juce-privacy-policy
  11. Or: You may also use this code under the terms of the GPL v3 (see
  12. www.gnu.org/licenses).
  13. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  14. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  15. DISCLAIMED.
  16. ==============================================================================
  17. */
  18. /*******************************************************************************
  19. The block below describes the properties of this module, and is read by
  20. the Projucer to automatically generate project code that uses it.
  21. For details about the syntax and how to create or use a module, see the
  22. JUCE Module Format.md file.
  23. BEGIN_JUCE_MODULE_DECLARATION
  24. ID: juce_opengl
  25. vendor: juce
  26. version: 6.0.8
  27. name: JUCE OpenGL classes
  28. description: Classes for rendering OpenGL in a JUCE window.
  29. website: http://www.juce.com/juce
  30. license: GPL/Commercial
  31. dependencies: juce_gui_extra
  32. OSXFrameworks: OpenGL
  33. iOSFrameworks: OpenGLES
  34. linuxLibs: GL
  35. mingwLibs: opengl32
  36. END_JUCE_MODULE_DECLARATION
  37. *******************************************************************************/
  38. #pragma once
  39. #define JUCE_OPENGL_H_INCLUDED
  40. #include <juce_core/system/juce_TargetPlatform.h>
  41. #undef JUCE_OPENGL
  42. #define JUCE_OPENGL 1
  43. #if JUCE_IOS || JUCE_ANDROID
  44. #define JUCE_OPENGL_ES 1
  45. #include "opengl/juce_gles2.h"
  46. #else
  47. #include "opengl/juce_gl.h"
  48. #endif
  49. #include <juce_gui_extra/juce_gui_extra.h>
  50. //==============================================================================
  51. /** This macro is a helper for use in GLSL shader code which needs to compile on both OpenGL 2.1 and OpenGL 3.0.
  52. It's mandatory in OpenGL 3.0 to specify the GLSL version.
  53. */
  54. #if JUCE_OPENGL_ES
  55. #define JUCE_GLSL_VERSION "#version 300 es"
  56. #else
  57. #define JUCE_GLSL_VERSION "#version 150"
  58. #endif
  59. //==============================================================================
  60. #if JUCE_OPENGL_ES || defined (DOXYGEN)
  61. /** This macro is a helper for use in GLSL shader code which needs to compile on both GLES and desktop GL.
  62. Since it's mandatory in GLES to mark a variable with a precision, but the keywords don't exist in normal GLSL,
  63. these macros define the various precision keywords only on GLES.
  64. */
  65. #define JUCE_MEDIUMP "mediump"
  66. /** This macro is a helper for use in GLSL shader code which needs to compile on both GLES and desktop GL.
  67. Since it's mandatory in GLES to mark a variable with a precision, but the keywords don't exist in normal GLSL,
  68. these macros define the various precision keywords only on GLES.
  69. */
  70. #define JUCE_HIGHP "highp"
  71. /** This macro is a helper for use in GLSL shader code which needs to compile on both GLES and desktop GL.
  72. Since it's mandatory in GLES to mark a variable with a precision, but the keywords don't exist in normal GLSL,
  73. these macros define the various precision keywords only on GLES.
  74. */
  75. #define JUCE_LOWP "lowp"
  76. #else
  77. #define JUCE_MEDIUMP
  78. #define JUCE_HIGHP
  79. #define JUCE_LOWP
  80. #endif
  81. //==============================================================================
  82. namespace juce
  83. {
  84. class OpenGLTexture;
  85. class OpenGLFrameBuffer;
  86. class OpenGLShaderProgram;
  87. }
  88. #include "geometry/juce_Vector3D.h"
  89. #include "geometry/juce_Matrix3D.h"
  90. #include "geometry/juce_Quaternion.h"
  91. #include "geometry/juce_Draggable3DOrientation.h"
  92. #include "opengl/juce_OpenGLHelpers.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_OpenGLImage.h"
  100. #include "opengl/juce_OpenGLShaderProgram.h"
  101. #include "opengl/juce_OpenGLTexture.h"
  102. #include "utils/juce_OpenGLAppComponent.h"