CmGLPrerequisites.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 "CmPrerequisites.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 GLHardwarePixelBuffer;
  37. class GLRenderBuffer;
  38. enum TypeID_D3D9
  39. {
  40. TID_GL_GLSLProgram = 11000
  41. };
  42. }
  43. #if CM_THREAD_SUPPORT == 1
  44. # define GLEW_MX
  45. #endif
  46. #if CM_PLATFORM == CM_PLATFORM_WIN32
  47. #if !defined( __MINGW32__ )
  48. # define WIN32_LEAN_AND_MEAN
  49. # ifndef NOMINMAX
  50. # define NOMINMAX // required to stop windows.h messing up std::min
  51. # endif
  52. #endif
  53. # include <windows.h>
  54. # include <wingdi.h>
  55. # include <GL/glew.h>
  56. # include <GL/wglew.h>
  57. # include <GL/glu.h>
  58. #elif CM_PLATFORM == CM_PLATFORM_LINUX
  59. # include <GL/glew.h>
  60. # include <GL/glu.h>
  61. # define GL_GLEXT_PROTOTYPES
  62. #elif CM_PLATFORM == CM_PLATFORM_APPLE
  63. # include <GL/glew.h>
  64. # include <OpenGL/glu.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 CM_RSGL_EXPORTS
  80. # define CM_RSGL_EXPORT __declspec(dllexport)
  81. # else
  82. # if defined( __MINGW32__ )
  83. # define CM_RSGL_EXPORT
  84. # else
  85. # define CM_RSGL_EXPORT __declspec(dllimport)
  86. # endif
  87. # endif
  88. #elif defined ( CM_GCC_VISIBILITY )
  89. # define CM_RSGL_EXPORT __attribute__ ((visibility("default")))
  90. #else
  91. # define CM_RSGL_EXPORT
  92. #endif
  93. #endif //#ifndef __GLPrerequisites_H__