Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogre/RenderSystems/GL/include/OgreGLPrerequisites.h @ 48

Last change on this file since 48 was 5, checked in by anonymous, 17 years ago

=hoffentlich gehts jetzt

File size: 3.7 KB
Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2006 Torus Knot Software Ltd
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://www.gnu.org/copyleft/lesser.txt.
23
24You may alternatively use this source under the terms of a specific version of
25the OGRE Unrestricted License provided you have obtained such a license from
26Torus Knot Software Ltd.
27-----------------------------------------------------------------------------
28*/
29#ifndef __GLPrerequisites_H__
30#define __GLPrerequisites_H__
31
32#include "OgrePrerequisites.h"
33
34namespace Ogre {
35    // Forward declarations
36    class GLSupport;
37    class GLRenderSystem;
38    class GLTexture;
39    class GLTextureManager;
40    class GLGpuProgram;
41    class GLContext;
42    class GLRTTManager;
43    class GLFBOManager;
44    class GLHardwarePixelBuffer;
45    class GLRenderBuffer;
46}
47
48#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
49#if !defined( __MINGW32__ )
50#   define NOMINMAX // required to stop windows.h messing up std::min
51#endif
52#   include <windows.h>
53#   include <wingdi.h>
54#   include <GL/glew.h>
55#   include <GL/wglew.h>
56#   include <GL/glu.h>
57#elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX
58#   include <GL/glew.h>
59#   include <GL/glu.h>
60#   define GL_GLEXT_PROTOTYPES
61#elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE
62#   include <GL/glew.h>
63#   include <OpenGL/glu.h>
64#endif
65
66/// Lots of generated code in here which triggers the new VC CRT security warnings
67#if !defined( _CRT_SECURE_NO_DEPRECATE )
68#define _CRT_SECURE_NO_DEPRECATE
69#endif
70
71#ifdef  OGRE_DEBUG_MODE
72
73#ifndef GL_ERROR_EXCEPT
74
75#define OGRE_GL_GETERROR(ERROR_MSG) {const GLubyte *errString; \
76    GLenum errCode = glGetError(); \
77    if (errCode != GL_NO_ERROR) {  \
78    errString = gluErrorString (errCode);  \
79    LogManager::getSingleton().logMessage  ("[GL] :" + Ogre::String(ERROR_MSG) +  \
80    " : " + Ogre::String( (const char*) errString)); \
81        } \
82    }
83
84#else //GL_ERROR_EXCEPT
85
86#define OGRE_GL_GETERROR(ERROR_MSG) {const GLubyte *errString; \
87    GLenum errCode = glGetError(); \
88    if (errCode != GL_NO_ERROR) {  \
89    errString = gluErrorString (errCode);  \
90    OGRE_EXCEPT (Exception::ERR_INTERNAL_ERROR,  \
91    Ogre::String(ERROR_MSG) +  \
92    " : " + Ogre::String( (const char*) errString), String("")); \
93        } \
94    }
95
96#endif //GL_ERROR_EXCEPT
97
98#else //OGRE_DEBUG_MODE
99
100#define OGRE_GL_GETERROR()
101
102#endif //OGRE_DEBUG_MODE
103
104#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32) && !defined(__MINGW32__) && !defined(OGRE_STATIC_LIB)
105#       ifdef OGRE_GLPLUGIN_EXPORTS
106#               define _OgreGLExport __declspec(dllexport)
107#       else
108#       if defined( __MINGW32__ )
109#           define _OgreGLExport
110#       else
111#               define _OgreGLExport __declspec(dllimport)
112#       endif
113#       endif
114#elif defined ( OGRE_GCC_VISIBILITY )
115#    define _OgreGLExport  __attribute__ ((visibility("default")))
116#else
117#    define _OgreGLExport
118#endif
119
120#endif //#ifndef __GLPrerequisites_H__
Note: See TracBrowser for help on using the repository browser.