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.

156 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. #ifdef __JUCE_OPENGL_JUCEHEADER__
  19. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  20. already included any other headers - just put it inside a file on its own, possibly with your config
  21. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  22. header files that the compiler may be using.
  23. */
  24. #error "Incorrect use of JUCE cpp file"
  25. #endif
  26. // Your project must contain an AppConfig.h file with your project-specific settings in it,
  27. // and your header search path must make it accessible to the module's files.
  28. #include "AppConfig.h"
  29. #include "../juce_core/native/juce_BasicNativeHeaders.h"
  30. #include "juce_opengl.h"
  31. //==============================================================================
  32. #if JUCE_IOS
  33. #import <QuartzCore/QuartzCore.h>
  34. //==============================================================================
  35. #elif JUCE_WINDOWS
  36. #include <windowsx.h>
  37. #include <vfw.h>
  38. #include <commdlg.h>
  39. #if JUCE_WEB_BROWSER
  40. #include <Exdisp.h>
  41. #include <exdispid.h>
  42. #endif
  43. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  44. #pragma comment(lib, "vfw32.lib")
  45. #pragma comment(lib, "imm32.lib")
  46. #endif
  47. #if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  48. #pragma comment(lib, "OpenGL32.Lib")
  49. #pragma comment(lib, "GlU32.Lib")
  50. #endif
  51. #if JUCE_QUICKTIME && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  52. #pragma comment (lib, "QTMLClient.lib")
  53. #endif
  54. #if JUCE_DIRECT2D && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
  55. #pragma comment (lib, "Dwrite.lib")
  56. #pragma comment (lib, "D2d1.lib")
  57. #endif
  58. //==============================================================================
  59. #elif JUCE_LINUX
  60. #include <X11/Xlib.h>
  61. #include <X11/Xatom.h>
  62. #include <X11/Xresource.h>
  63. #include <X11/Xutil.h>
  64. #include <X11/Xmd.h>
  65. #include <X11/keysym.h>
  66. #include <X11/cursorfont.h>
  67. #if JUCE_USE_XINERAMA
  68. /* If you're trying to use Xinerama, you'll need to install the "libxinerama-dev" package.. */
  69. #include <X11/extensions/Xinerama.h>
  70. #endif
  71. #if JUCE_USE_XSHM
  72. #include <X11/extensions/XShm.h>
  73. #include <sys/shm.h>
  74. #include <sys/ipc.h>
  75. #endif
  76. #if JUCE_USE_XRENDER
  77. // If you're missing these headers, try installing the libxrender-dev and libxcomposite-dev
  78. #include <X11/extensions/Xrender.h>
  79. #include <X11/extensions/Xcomposite.h>
  80. #endif
  81. #if JUCE_USE_XCURSOR
  82. // If you're missing this header, try installing the libxcursor-dev package
  83. #include <X11/Xcursor/Xcursor.h>
  84. #endif
  85. /* Got an include error here?
  86. If you want to install OpenGL support, the packages to get are "mesa-common-dev"
  87. and "freeglut3-dev".
  88. */
  89. #include <GL/glx.h>
  90. #undef SIZEOF
  91. #undef KeyPress
  92. #endif
  93. //==============================================================================
  94. // START_AUTOINCLUDE opengl/*.cpp
  95. #include "opengl/juce_OpenGLComponent.cpp"
  96. #include "opengl/juce_OpenGLFrameBuffer.cpp"
  97. #include "opengl/juce_OpenGLHelpers.cpp"
  98. #include "opengl/juce_OpenGLImage.cpp"
  99. #include "opengl/juce_OpenGLTexture.cpp"
  100. // END_AUTOINCLUDE
  101. using namespace juce;
  102. //==============================================================================
  103. BEGIN_JUCE_NAMESPACE
  104. #if JUCE_MAC || JUCE_IOS
  105. #include "../juce_core/native/juce_osx_ObjCHelpers.h"
  106. #include "../juce_core/native/juce_mac_ObjCSuffix.h"
  107. #include "../juce_graphics/native/juce_mac_CoreGraphicsHelpers.h"
  108. #if JUCE_MAC
  109. #include "native/juce_mac_OpenGLComponent.mm"
  110. #else
  111. #include "native/juce_ios_OpenGLComponent.mm"
  112. #endif
  113. #elif JUCE_WINDOWS
  114. #include "native/juce_win32_OpenGLComponent.cpp"
  115. #elif JUCE_LINUX
  116. #include "native/juce_linux_OpenGLComponent.cpp"
  117. #elif JUCE_ANDROID
  118. #include "native/juce_android_OpenGLComponent.cpp"
  119. #endif
  120. END_JUCE_NAMESPACE