source: OGRE/trunk/ogrenew/RenderSystems/GL/include/OgreGLPrerequisites.h @ 692

Revision 692, 2.9 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

RevLine 
[692]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-2005 The OGRE Team
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-----------------------------------------------------------------------------
24*/
25#ifndef __GLPrerequisites_H__
26#define __GLPrerequisites_H__
27
28#include "OgrePrerequisites.h"
29
30namespace Ogre {
31    // Forward declarations
32    class GLSupport;
33    class GLRenderSystem;
34    class GLTexture;
35    class GLTextureManager;
36    class GLGpuProgram;
37    class GLContext;
38    class GLRTTManager;
39    class GLFBOManager;
40    class GLHardwarePixelBuffer;
41    class GLRenderBuffer;
42}
43
44#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
45#if !defined( __MINGW32__ )
46#   define NOMINMAX // required to stop windows.h messing up std::min
47#endif
48#   include <windows.h>
49#   include <wingdi.h>
50#   include <GL/glew.h>
51#   include <GL/wglew.h>
52#   include <GL/glu.h>
53#elif OGRE_PLATFORM == OGRE_PLATFORM_LINUX
54#   include <GL/glew.h>
55#   include <GL/glu.h>
56#   define GL_GLEXT_PROTOTYPES
57#elif OGRE_PLATFORM == OGRE_PLATFORM_APPLE
58#   include <GL/glew.h>
59#   include <OpenGL/glu.h>
60#endif
61
62
63
64
65#ifdef  OGRE_DEBUG_MODE
66
67#ifndef GL_ERROR_EXCEPT
68
69#define OGRE_GL_GETERROR(ERROR_MSG) {const GLubyte *errString; \
70    GLenum errCode = glGetError(); \
71    if (errCode != GL_NO_ERROR) {  \
72    errString = gluErrorString (errCode);  \
73    LogManager::getSingleton().logMessage  ("[GL] :" + Ogre::String(ERROR_MSG) +  \
74    " : " + Ogre::String( (const char*) errString)); \
75        } \
76    }
77
78#else //GL_ERROR_EXCEPT
79
80#define OGRE_GL_GETERROR(ERROR_MSG) {const GLubyte *errString; \
81    GLenum errCode = glGetError(); \
82    if (errCode != GL_NO_ERROR) {  \
83    errString = gluErrorString (errCode);  \
84    OGRE_EXCEPT (Exception::ERR_INTERNAL_ERROR,  \
85    Ogre::String(ERROR_MSG) +  \
86    " : " + Ogre::String( (const char*) errString), String("")); \
87        } \
88    }
89
90#endif //GL_ERROR_EXCEPT
91
92#else //OGRE_DEBUG_MODE
93
94#define OGRE_GL_GETERROR()
95
96#endif //OGRE_DEBUG_MODE
97
98#endif
Note: See TracBrowser for help on using the repository browser.