CmGLPrerequisites.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 GLFBOManager;
  37. class GLHardwarePixelBuffer;
  38. class GLRenderBuffer;
  39. enum TypeID_D3D9
  40. {
  41. TID_GL_GLSLProgram = 11000
  42. };
  43. }
  44. #if CM_THREAD_SUPPORT == 1
  45. # define GLEW_MX
  46. #endif
  47. #if CM_PLATFORM == CM_PLATFORM_WIN32
  48. #if !defined( __MINGW32__ )
  49. # define WIN32_LEAN_AND_MEAN
  50. # ifndef NOMINMAX
  51. # define NOMINMAX // required to stop windows.h messing up std::min
  52. # endif
  53. #endif
  54. # include <windows.h>
  55. # include <wingdi.h>
  56. # include <GL/glew.h>
  57. # include <GL/wglew.h>
  58. # include <GL/glu.h>
  59. #elif CM_PLATFORM == CM_PLATFORM_LINUX
  60. # include <GL/glew.h>
  61. # include <GL/glu.h>
  62. # define GL_GLEXT_PROTOTYPES
  63. #elif CM_PLATFORM == CM_PLATFORM_APPLE
  64. # include <GL/glew.h>
  65. # include <OpenGL/glu.h>
  66. #elif CM_PLATFORM == OGRE_PLATFORM_IPHONE
  67. # include <OpenGLES/ES1/gl.h>
  68. # include <OpenGLES/ES1/glext.h>
  69. #endif
  70. #if CM_THREAD_SUPPORT == 1
  71. // implemented in OgreGLContext.cpp
  72. GLEWContext * glewGetContext();
  73. # if CM_PLATFORM == CM_PLATFORM_WIN32
  74. // implemented in OgreWin32Context.cpp
  75. WGLEWContext * wglewGetContext();
  76. # endif
  77. #endif
  78. /// Lots of generated code in here which triggers the new VC CRT security warnings
  79. #if !defined( _CRT_SECURE_NO_DEPRECATE )
  80. #define _CRT_SECURE_NO_DEPRECATE
  81. #endif
  82. #if (CM_PLATFORM == CM_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(CM_STATIC_LIB)
  83. # ifdef CM_RSGL_EXPORTS
  84. # define CM_RSGL_EXPORT __declspec(dllexport)
  85. # else
  86. # if defined( __MINGW32__ )
  87. # define CM_RSGL_EXPORT
  88. # else
  89. # define CM_RSGL_EXPORT __declspec(dllimport)
  90. # endif
  91. # endif
  92. #elif defined ( CM_GCC_VISIBILITY )
  93. # define CM_RSGL_EXPORT __attribute__ ((visibility("default")))
  94. #else
  95. # define CM_RSGL_EXPORT
  96. #endif
  97. #endif //#ifndef __GLPrerequisites_H__