2
0

OgreGLPrerequisites.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. -----------------------------------------------------------------------------
  3. This source file is part of OGRE
  4. (Object-oriented Graphics Rendering Engine)
  5. For the latest info, see http://www.ogre3d.org/
  6. Copyright (c) 2000-2011 Torus Knot Software Ltd
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. THE SOFTWARE.
  22. -----------------------------------------------------------------------------
  23. */
  24. #ifndef __GLPrerequisites_H__
  25. #define __GLPrerequisites_H__
  26. #include "OgrePrerequisites.h"
  27. namespace CamelotEngine {
  28. // Forward declarations
  29. class GLSupport;
  30. class GLRenderSystem;
  31. class GLTexture;
  32. class GLTextureManager;
  33. class GLGpuProgram;
  34. class GLContext;
  35. class GLRTTManager;
  36. class GLFBOManager;
  37. class GLHardwarePixelBuffer;
  38. class GLRenderBuffer;
  39. }
  40. #if CM_THREAD_SUPPORT == 1
  41. # define GLEW_MX
  42. #endif
  43. #if CM_PLATFORM == CM_PLATFORM_WIN32
  44. #if !defined( __MINGW32__ )
  45. # define WIN32_LEAN_AND_MEAN
  46. # ifndef NOMINMAX
  47. # define NOMINMAX // required to stop windows.h messing up std::min
  48. # endif
  49. #endif
  50. # include <windows.h>
  51. # include <wingdi.h>
  52. # include <GL/glew.h>
  53. # include <GL/wglew.h>
  54. # include <GL/glu.h>
  55. #elif CM_PLATFORM == CM_PLATFORM_LINUX
  56. # include <GL/glew.h>
  57. # include <GL/glu.h>
  58. # define GL_GLEXT_PROTOTYPES
  59. #elif CM_PLATFORM == CM_PLATFORM_APPLE
  60. # include <GL/glew.h>
  61. # include <OpenGL/glu.h>
  62. #elif CM_PLATFORM == OGRE_PLATFORM_IPHONE
  63. # include <OpenGLES/ES1/gl.h>
  64. # include <OpenGLES/ES1/glext.h>
  65. #endif
  66. #if CM_THREAD_SUPPORT == 1
  67. // implemented in OgreGLContext.cpp
  68. GLEWContext * glewGetContext();
  69. # if CM_PLATFORM == CM_PLATFORM_WIN32
  70. // implemented in OgreWin32Context.cpp
  71. WGLEWContext * wglewGetContext();
  72. # endif
  73. #endif
  74. /// Lots of generated code in here which triggers the new VC CRT security warnings
  75. #if !defined( _CRT_SECURE_NO_DEPRECATE )
  76. #define _CRT_SECURE_NO_DEPRECATE
  77. #endif
  78. #if (CM_PLATFORM == CM_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(CM_STATIC_LIB)
  79. # ifdef OGRE_GLPLUGIN_EXPORTS
  80. # define _OgreGLExport __declspec(dllexport)
  81. # else
  82. # if defined( __MINGW32__ )
  83. # define _OgreGLExport
  84. # else
  85. # define _OgreGLExport __declspec(dllimport)
  86. # endif
  87. # endif
  88. #elif defined ( CM_GCC_VISIBILITY )
  89. # define _OgreGLExport __attribute__ ((visibility("default")))
  90. #else
  91. # define _OgreGLExport
  92. #endif
  93. #endif //#ifndef __GLPrerequisites_H__