Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

OgreGLPrerequisites.h

Go to the documentation of this file.
00001 /*
00002 -----------------------------------------------------------------------------
00003 This source file is part of OGRE
00004     (Object-oriented Graphics Rendering Engine)
00005 For the latest info, see http://www.ogre3d.org/
00006 
00007 Copyright © 2000-2002 The OGRE Team
00008 Also see acknowledgements in Readme.html
00009 
00010 This program is free software; you can redistribute it and/or modify it under
00011 the terms of the GNU Lesser General Public License as published by the Free Software
00012 Foundation; either version 2 of the License, or (at your option) any later
00013 version.
00014 
00015 This program is distributed in the hope that it will be useful, but WITHOUT
00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public License along with
00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
00022 http://www.gnu.org/copyleft/lesser.txt.
00023 -----------------------------------------------------------------------------
00024 */
00025 #ifndef __GLPrerequisites_H__
00026 #define __GLPrerequisites_H__
00027 
00028 #include "OgrePrerequisites.h"
00029 
00030 #if OGRE_PLATFORM == PLATFORM_WIN32
00031 #   define NOMINMAX // required to stop windows.h messing up std::min
00032 #   include <windows.h>
00033 #   include <wingdi.h>
00034 #   include <GL/gl.h>
00035 #   define GL_GLEXT_PROTOTYPES
00036 #   include "glprocs.h"
00037 #   include <GL/glu.h>
00038 // Windows library does not include glSecondaryColorPointer even though it's standard now
00039 #   define glSecondaryColorPointer glSecondaryColorPointerEXT
00040 #elif OGRE_PLATFORM == PLATFORM_LINUX
00041 // define GL_GLEXT_LEGACY so that Mesa headers won't try to include their own
00042 // glext.h file.
00043 #   define GL_GLEXT_LEGACY
00044 #   include <GL/gl.h>
00045 #   include <GL/glu.h>
00046 #   define GL_GLEXT_PROTOTYPES
00047 #elif OGRE_PLATFORM == PLATFORM_APPLE
00048 #   define GL_GLEXT_PROTOTYPES
00049 #   ifndef APIENTRY
00050 #       define APIENTRY
00051 #   endif
00052 #   include <OpenGL/gl.h>
00053 #   include <OpenGL/glu.h>
00054 #endif
00055 #include "GL/glext.h"
00056 
00057 extern "C" {
00058 // Pointer to glActiveTextureARB function
00059 typedef void (APIENTRY *GL_ActiveTextureARB_Func)(GLenum);
00060 extern GL_ActiveTextureARB_Func glActiveTextureARB_ptr;
00061 
00062 // Pointer to glClientActiveTextureARB function
00063 typedef void (APIENTRY *GL_ClientActiveTextureARB_Func)(GLenum);
00064 extern GL_ClientActiveTextureARB_Func glClientActiveTextureARB_ptr;
00065 
00066 // Pointer to glSecondaryColorPointerEXT function
00067 typedef void (APIENTRY *GL_SecondaryColorPointerEXT_Func)(GLint, GLenum, GLsizei, const GLvoid*);
00068 extern GL_SecondaryColorPointerEXT_Func glSecondaryColorPointerEXT_ptr;
00069 
00070 // Pointer to glGenBuffersARB function
00071 typedef void (APIENTRY *GL_GenBuffersARB_Func)(GLsizei, GLuint*);
00072 extern GL_GenBuffersARB_Func glGenBuffersARB_ptr;
00073 
00074 // Pointer to glBindBufferARB function
00075 typedef void (APIENTRY *GL_BindBufferARB_Func)(GLenum, GLuint);
00076 extern GL_BindBufferARB_Func glBindBufferARB_ptr;
00077 
00078 // Pointer to glDeleteBuffersARB function
00079 typedef void (APIENTRY *GL_DeleteBuffersARB_Func)(GLsizei, const GLuint*);
00080 extern GL_DeleteBuffersARB_Func glDeleteBuffersARB_ptr;
00081 
00082 // Pointer to glMapBufferARB function
00083 typedef GLvoid* (APIENTRY *GL_MapBufferARB_Func)(GLenum, GLenum);
00084 extern GL_MapBufferARB_Func glMapBufferARB_ptr;
00085 
00086 // Pointer to glUnmapBufferARB function
00087 typedef GLboolean (APIENTRY *GL_UnmapBufferARB_Func)(GLenum);
00088 extern GL_UnmapBufferARB_Func glUnmapBufferARB_ptr;
00089 
00090 // Pointer to glBufferSubDataARB function
00091 typedef void (APIENTRY *GL_BufferSubDataARB_Func)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid*);
00092 extern GL_BufferSubDataARB_Func glBufferSubDataARB_ptr;
00093 
00094 // Pointer to glBufferDataARB function
00095 typedef void (APIENTRY *GL_BufferDataARB_Func)(GLenum, GLsizeiptrARB, const GLvoid* , GLenum);
00096 extern GL_BufferDataARB_Func glBufferDataARB_ptr;
00097 
00098 // Pointer to glGetBufferSubDataARB function
00099 typedef void (APIENTRY *GL_GetBufferSubDataARB_Func)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid*);
00100 extern GL_GetBufferSubDataARB_Func glGetBufferSubDataARB_ptr;
00101 
00102 // Pointer to glGenProgramsARB function
00103 typedef void (APIENTRY *GL_GenProgramsARB_Func)(GLsizei, GLuint*);
00104 extern GL_GenProgramsARB_Func glGenProgramsARB_ptr;
00105 
00106 // Pointer to glDeleteProgramsARB function
00107 typedef void (APIENTRY *GL_DeleteProgramsARB_Func)(GLsizei, const GLuint*);
00108 extern GL_DeleteProgramsARB_Func glDeleteProgramsARB_ptr;
00109 
00110 // Pointer to glBindProgramARB function
00111 typedef void (APIENTRY *GL_BindProgramARB_Func)(GLenum, GLuint);
00112 extern GL_BindProgramARB_Func glBindProgramARB_ptr;
00113 
00114 // Pointer to glProgramStringARB function
00115 typedef void (APIENTRY *GL_ProgramStringARB_Func)(GLenum, GLenum, GLsizei, const GLvoid*);
00116 extern GL_ProgramStringARB_Func glProgramStringARB_ptr;
00117 
00118 // Pointer to glProgramLocalParameter4fvARB function
00119 typedef void (APIENTRY *GL_ProgramLocalParameter4fvARB_Func)(GLenum, GLuint, const GLfloat *);
00120 extern GL_ProgramLocalParameter4fvARB_Func glProgramLocalParameter4fvARB_ptr;
00121 
00122 // Pointer to glProgramParameter4fvNV function
00123 typedef void (APIENTRY *GL_ProgramParameter4fvNV_Func)(GLenum, GLuint, const GLfloat *);
00124 extern GL_ProgramParameter4fvNV_Func glProgramParameter4fvNV_ptr;
00125 
00126 // Pointer to glCombinerStageParameterfvNV function
00127 typedef void (APIENTRY *GL_CombinerStageParameterfvNV_Func)(GLenum, GLenum, const GLfloat *);
00128 extern GL_CombinerStageParameterfvNV_Func glCombinerStageParameterfvNV_ptr;
00129 
00130 // Pointer to glCombinerParameterfvNV function
00131 typedef void (APIENTRY *GL_CombinerParameterfvNV_Func)(GLenum, const GLfloat *);
00132 extern GL_CombinerParameterfvNV_Func glCombinerParameterfvNV_ptr;
00133 
00134 // Pointer to glCombinerParameteriNV function
00135 typedef void (APIENTRY *GL_CombinerParameteriNV_Func)(GLenum, GLint);
00136 extern GL_CombinerParameteriNV_Func glCombinerParameteriNV_ptr;
00137 
00138 // Pointer to glCombinerInputNV function
00139 typedef void (APIENTRY *GL_CombinerInputNV_Func)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
00140 extern GL_CombinerInputNV_Func glCombinerInputNV_ptr;
00141 
00142 // Pointer to glCombinerOutputNV function
00143 typedef void (APIENTRY *GL_CombinerOutputNV_Func)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
00144 
00145 extern GL_CombinerOutputNV_Func glCombinerOutputNV_ptr;
00146 
00147 // Pointer to glFinalCombinerInputNV function
00148 typedef void (APIENTRY *GL_FinalCombinerInputNV_Func)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
00149 
00150 extern GL_FinalCombinerInputNV_Func glFinalCombinerInputNV_ptr;
00151 
00152 // Pointer to glGetProgramivARB function
00153 typedef void (APIENTRY *GL_GetProgramivARB_Func)(GLenum, GLenum, GLint *);
00154 extern GL_GetProgramivARB_Func glGetProgramivARB_ptr;
00155 
00156 // Pointer to glLoadProgramNV function
00157 typedef void (APIENTRY *GL_LoadProgramNV_Func)(GLenum, GLuint, GLsizei, const GLubyte *);
00158 extern GL_LoadProgramNV_Func glLoadProgramNV_ptr;
00159 
00160 // Pointer to glTrackMatrixNV function
00161 typedef void (APIENTRY *GL_TrackMatrixNV_Func)(GLenum, GLuint, GLenum, GLenum);
00162 extern GL_TrackMatrixNV_Func glTrackMatrixNV_ptr;
00163 };
00164 
00165 extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB_ptr;
00166 
00167 namespace Ogre {
00168     // Forward declarations
00169     class GLSupport;
00170     class GLRenderSystem;
00171     class GLTexture;
00172     class GLTextureManager;
00173     class GLGpuProgram;
00174 
00175 }
00176 
00177 
00178 #endif

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:10:11 2004