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 glVertexAttribPointerARB function 00127 typedef void (APIENTRY *GL_VertexAttribPointerARB_Func) (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); 00128 extern GL_VertexAttribPointerARB_Func glVertexAttribPointerARB_ptr; 00129 // Pointer to glEnableVertexAttribArrayARB function 00130 typedef void (APIENTRY *GL_EnableVertexAttribArrayARB_Func) (GLuint); 00131 extern GL_EnableVertexAttribArrayARB_Func glEnableVertexAttribArrayARB_ptr; 00132 // Pointer to glDisableVertexAttribArrayARB function 00133 typedef void (APIENTRY *GL_DisableVertexAttribArrayARB_Func) (GLuint); 00134 extern GL_DisableVertexAttribArrayARB_Func glDisableVertexAttribArrayARB_ptr; 00135 00136 00137 00138 // Pointer to glCombinerStageParameterfvNV function 00139 typedef void (APIENTRY *GL_CombinerStageParameterfvNV_Func)(GLenum, GLenum, const GLfloat *); 00140 extern GL_CombinerStageParameterfvNV_Func glCombinerStageParameterfvNV_ptr; 00141 00142 // Pointer to glCombinerParameterfvNV function 00143 typedef void (APIENTRY *GL_CombinerParameterfvNV_Func)(GLenum, const GLfloat *); 00144 extern GL_CombinerParameterfvNV_Func glCombinerParameterfvNV_ptr; 00145 00146 // Pointer to glCombinerParameteriNV function 00147 typedef void (APIENTRY *GL_CombinerParameteriNV_Func)(GLenum, GLint); 00148 extern GL_CombinerParameteriNV_Func glCombinerParameteriNV_ptr; 00149 00150 // Pointer to glCombinerInputNV function 00151 typedef void (APIENTRY *GL_CombinerInputNV_Func)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum); 00152 extern GL_CombinerInputNV_Func glCombinerInputNV_ptr; 00153 00154 // Pointer to glCombinerOutputNV function 00155 typedef void (APIENTRY *GL_CombinerOutputNV_Func)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean); 00156 00157 extern GL_CombinerOutputNV_Func glCombinerOutputNV_ptr; 00158 00159 // Pointer to glFinalCombinerInputNV function 00160 typedef void (APIENTRY *GL_FinalCombinerInputNV_Func)(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); 00161 00162 extern GL_FinalCombinerInputNV_Func glFinalCombinerInputNV_ptr; 00163 00164 // Pointer to glGetProgramivARB function 00165 typedef void (APIENTRY *GL_GetProgramivARB_Func)(GLenum, GLenum, GLint *); 00166 extern GL_GetProgramivARB_Func glGetProgramivARB_ptr; 00167 00168 // Pointer to glLoadProgramNV function 00169 typedef void (APIENTRY *GL_LoadProgramNV_Func)(GLenum, GLuint, GLsizei, const GLubyte *); 00170 extern GL_LoadProgramNV_Func glLoadProgramNV_ptr; 00171 00172 // Pointer to glTrackMatrixNV function 00173 typedef void (APIENTRY *GL_TrackMatrixNV_Func)(GLenum, GLuint, GLenum, GLenum); 00174 extern GL_TrackMatrixNV_Func glTrackMatrixNV_ptr; 00175 00176 // Pointer to glActiveStencilFaceEXT function 00177 typedef void (APIENTRY *GL_ActiveStencilFaceEXT_Func)(GLenum); 00178 extern GL_ActiveStencilFaceEXT_Func glActiveStencilFaceEXT_ptr; 00179 00180 // Pointer to glGenOcclusionQueriesNV function 00181 typedef void (APIENTRY *GL_GenOcclusionQueriesNV_Func) (GLsizei n, GLuint *ids); 00182 extern GL_GenOcclusionQueriesNV_Func glGenOcclusionQueriesNV_ptr; 00183 00184 // Pointer to glDeleteOcclusionQueriesNV function 00185 typedef void (APIENTRY *GL_DeleteOcclusionQueriesNV_Func) (GLsizei n, const GLuint *ids); 00186 extern GL_DeleteOcclusionQueriesNV_Func glDeleteOcclusionQueriesNV_ptr; 00187 00188 // Pointer to glIsOcclusionQueryNV function 00189 typedef GLboolean (APIENTRY *GL_IsOcclusionQueryNV_Func) (GLuint id); 00190 extern GL_IsOcclusionQueryNV_Func glIsOcclusionQueryNV_ptr; 00191 00192 // Pointer to glBeginOcclusionQueryNV function 00193 typedef void (APIENTRY *GL_BeginOcclusionQueryNV_Func) (GLuint id); 00194 extern GL_BeginOcclusionQueryNV_Func glBeginOcclusionQueryNV_ptr; 00195 00196 // Pointer to glEndOcclusionQueryNV function 00197 typedef void (APIENTRY *GL_EndOcclusionQueryNV_Func) (void); 00198 extern GL_EndOcclusionQueryNV_Func glEndOcclusionQueryNV_ptr; 00199 00200 // Pointer to glGetOcclusionQueryivNV function 00201 typedef void (APIENTRY *GL_GetOcclusionQueryivNV_Func) (GLuint id, GLenum pname, GLint *params); 00202 extern GL_GetOcclusionQueryivNV_Func glGetOcclusionQueryivNV_ptr; 00203 00204 // Pointer to glGetOcclusionQueryuivNV function 00205 typedef void (APIENTRY *GL_GetOcclusionQueryuivNV_Func) (GLuint id, GLenum pname, GLuint *params); 00206 extern GL_GetOcclusionQueryuivNV_Func glGetOcclusionQueryuivNV_ptr; 00207 00208 00209 }; 00210 00211 extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB_ptr; 00212 00213 namespace Ogre { 00214 // Forward declarations 00215 class GLSupport; 00216 class GLRenderSystem; 00217 class GLTexture; 00218 class GLTextureManager; 00219 class GLGpuProgram; 00220 00221 } 00222 00223 00224 #endif
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:22:11 2004