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