llglheaders.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLGLHEADERS_H
00033 #define LL_LLGLHEADERS_H
00034 
00035 #if LL_LINUX
00036 # ifndef LL_MESA
00037 #  define LL_MESA 1 // force MESA
00038 # endif
00039 # ifndef LL_MESA_HEADLESS
00040 #  define LL_MESA_HEADLESS 1 // force MESA HEADLESS
00041 # endif
00042 #endif
00043 
00044 #if LL_MESA
00045 //----------------------------------------------------------------------------
00046 // MESA headers
00047 // quotes so we get libraries/.../GL/ version
00048 #define GL_GLEXT_PROTOTYPES
00049 #include "GL/gl.h"
00050 #include "GL/glext.h"
00051 #include "GL/glu.h"
00052 
00053 #elif LL_LINUX
00054 //----------------------------------------------------------------------------
00055 // Linux, MESA headers, but not necessarily assuming MESA runtime.
00056 // quotes so we get libraries/.../GL/ version
00057 #include "GL/gl.h"
00058 #include "GL/glext.h"
00059 #include "GL/glu.h"
00060 
00061 // GL_ARB_vertex_buffer_object
00062 extern PFNGLBINDBUFFERARBPROC           glBindBufferARB;
00063 extern PFNGLDELETEBUFFERSARBPROC        glDeleteBuffersARB;
00064 extern PFNGLGENBUFFERSARBPROC           glGenBuffersARB;
00065 extern PFNGLISBUFFERARBPROC                     glIsBufferARB;
00066 extern PFNGLBUFFERDATAARBPROC           glBufferDataARB;
00067 extern PFNGLBUFFERSUBDATAARBPROC        glBufferSubDataARB;
00068 extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB;
00069 extern PFNGLMAPBUFFERARBPROC            glMapBufferARB;
00070 extern PFNGLUNMAPBUFFERARBPROC          glUnmapBufferARB;
00071 extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
00072 extern PFNGLGETBUFFERPOINTERVARBPROC    glGetBufferPointervARB;
00073 
00074 // GL_ATI_vertex_array_object
00075 extern PFNGLNEWOBJECTBUFFERATIPROC                      glNewObjectBufferATI;
00076 extern PFNGLISOBJECTBUFFERATIPROC                       glIsObjectBufferATI;
00077 extern PFNGLUPDATEOBJECTBUFFERATIPROC           glUpdateObjectBufferATI;
00078 extern PFNGLGETOBJECTBUFFERFVATIPROC            glGetObjectBufferfvATI;
00079 extern PFNGLGETOBJECTBUFFERIVATIPROC            glGetObjectBufferivATI;
00080 extern PFNGLFREEOBJECTBUFFERATIPROC                 glFreeObjectBufferATI;
00081 extern PFNGLARRAYOBJECTATIPROC                          glArrayObjectATI;
00082 extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC      glVertexAttribArrayObjectATI;
00083 extern PFNGLGETARRAYOBJECTFVATIPROC                     glGetArrayObjectfvATI;
00084 extern PFNGLGETARRAYOBJECTIVATIPROC                     glGetArrayObjectivATI;
00085 extern PFNGLVARIANTARRAYOBJECTATIPROC           glVariantObjectArrayATI;
00086 extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC      glGetVariantArrayObjectfvATI;
00087 extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC      glGetVariantArrayObjectivATI;
00088 
00089 // GL_ARB_occlusion_query
00090 extern PFNGLGENQUERIESARBPROC glGenQueriesARB;
00091 extern PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB;
00092 extern PFNGLISQUERYARBPROC glIsQueryARB;
00093 extern PFNGLBEGINQUERYARBPROC glBeginQueryARB;
00094 extern PFNGLENDQUERYARBPROC glEndQueryARB;
00095 extern PFNGLGETQUERYIVARBPROC glGetQueryivARB;
00096 extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB;
00097 extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB;
00098 
00099 // GL_ARB_point_parameters
00100 extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB;
00101 extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB;
00102 
00103 // GL_ARB_shader_objects
00104 extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
00105 extern PFNGLGETHANDLEARBPROC glGetHandleARB;
00106 extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
00107 extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
00108 extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
00109 extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
00110 extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
00111 extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
00112 extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
00113 extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
00114 extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB;
00115 extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
00116 extern PFNGLUNIFORM2FARBPROC glUniform2fARB;
00117 extern PFNGLUNIFORM3FARBPROC glUniform3fARB;
00118 extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
00119 extern PFNGLUNIFORM1IARBPROC glUniform1iARB;
00120 extern PFNGLUNIFORM2IARBPROC glUniform2iARB;
00121 extern PFNGLUNIFORM3IARBPROC glUniform3iARB;
00122 extern PFNGLUNIFORM4IARBPROC glUniform4iARB;
00123 extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB;
00124 extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB;
00125 extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB;
00126 extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB;
00127 extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB;
00128 extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB;
00129 extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
00130 extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
00131 extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
00132 extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
00133 extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
00134 extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
00135 extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
00136 extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
00137 extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB;
00138 extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
00139 extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB;
00140 extern PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB;
00141 extern PFNGLGETUNIFORMIVARBPROC glGetUniformivARB;
00142 extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB;
00143 
00144 // GL_ARB_vertex_shader
00145 extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB;
00146 extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB;
00147 extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB;
00148 extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB;
00149 extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB;
00150 extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB;
00151 extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB;
00152 extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB;
00153 extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB;
00154 extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB;
00155 extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB;
00156 extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB;
00157 extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB;
00158 extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB;
00159 extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB;
00160 extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB;
00161 extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB;
00162 extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB;
00163 extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB;
00164 extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB;
00165 extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB;
00166 extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB;
00167 extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB;
00168 extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB;
00169 extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB;
00170 extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB;
00171 extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB;
00172 extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB;
00173 extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB;
00174 extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
00175 extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB;
00176 extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB;
00177 extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB;
00178 extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB;
00179 extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB;
00180 extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB;
00181 extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
00182 extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
00183 extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
00184 extern PFNGLPROGRAMSTRINGARBPROC glProgramStringARB;
00185 extern PFNGLBINDPROGRAMARBPROC glBindProgramARB;
00186 extern PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB;
00187 extern PFNGLGENPROGRAMSARBPROC glGenProgramsARB;
00188 extern PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB;
00189 extern PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB;
00190 extern PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB;
00191 extern PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB;
00192 extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB;
00193 extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB;
00194 extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB;
00195 extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB;
00196 extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB;
00197 extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB;
00198 extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB;
00199 extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB;
00200 extern PFNGLGETPROGRAMIVARBPROC glGetProgramivARB;
00201 extern PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB;
00202 extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB;
00203 extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB;
00204 extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB;
00205 extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB;
00206 extern PFNGLISPROGRAMARBPROC glIsProgramARB;
00207 extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
00208 extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB;
00209 extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
00210 
00211 extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC glCompressedTexImage2DARB;
00212 extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC glGetCompressedTexImageARB;
00213 
00214 extern PFNGLCOLORTABLEEXTPROC glColorTableEXT;
00215 
00216 //GL_EXT_framebuffer_object
00217 extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT;
00218 extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
00219 extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
00220 extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT;
00221 extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
00222 extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT;
00223 extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT;
00224 extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
00225 extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
00226 extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
00227 extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
00228 extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT;
00229 extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
00230 extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT;
00231 extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT;
00232 extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT;
00233 extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;
00234 
00235 
00236 #elif LL_WINDOWS
00237 //----------------------------------------------------------------------------
00238 #include <GL/gl.h>
00239 #include <GL/glu.h>
00240 
00241 // quotes so we get libraries/.../GL/ version
00242 #include "GL/glext.h"
00243 #include "GL/glh_extensions.h"
00244 
00245 
00246 // GL_ARB_vertex_buffer_object
00247 extern PFNGLBINDBUFFERARBPROC           glBindBufferARB;
00248 extern PFNGLDELETEBUFFERSARBPROC        glDeleteBuffersARB;
00249 extern PFNGLGENBUFFERSARBPROC           glGenBuffersARB;
00250 extern PFNGLISBUFFERARBPROC                     glIsBufferARB;
00251 extern PFNGLBUFFERDATAARBPROC           glBufferDataARB;
00252 extern PFNGLBUFFERSUBDATAARBPROC        glBufferSubDataARB;
00253 extern PFNGLGETBUFFERSUBDATAARBPROC glGetBufferSubDataARB;
00254 extern PFNGLMAPBUFFERARBPROC            glMapBufferARB;
00255 extern PFNGLUNMAPBUFFERARBPROC          glUnmapBufferARB;
00256 extern PFNGLGETBUFFERPARAMETERIVARBPROC glGetBufferParameterivARB;
00257 extern PFNGLGETBUFFERPOINTERVARBPROC    glGetBufferPointervARB;
00258 
00259 // GL_ATI_vertex_array_object
00260 extern PFNGLNEWOBJECTBUFFERATIPROC                      glNewObjectBufferATI;
00261 extern PFNGLISOBJECTBUFFERATIPROC                       glIsObjectBufferATI;
00262 extern PFNGLUPDATEOBJECTBUFFERATIPROC           glUpdateObjectBufferATI;
00263 extern PFNGLGETOBJECTBUFFERFVATIPROC            glGetObjectBufferfvATI;
00264 extern PFNGLGETOBJECTBUFFERIVATIPROC            glGetObjectBufferivATI;
00265 extern PFNGLFREEOBJECTBUFFERATIPROC                 glFreeObjectBufferATI;
00266 extern PFNGLARRAYOBJECTATIPROC                          glArrayObjectATI;
00267 extern PFNGLVERTEXATTRIBARRAYOBJECTATIPROC      glVertexAttribArrayObjectATI;
00268 extern PFNGLGETARRAYOBJECTFVATIPROC                     glGetArrayObjectfvATI;
00269 extern PFNGLGETARRAYOBJECTIVATIPROC                     glGetArrayObjectivATI;
00270 extern PFNGLVARIANTARRAYOBJECTATIPROC           glVariantObjectArrayATI;
00271 extern PFNGLGETVARIANTARRAYOBJECTFVATIPROC      glGetVariantArrayObjectfvATI;
00272 extern PFNGLGETVARIANTARRAYOBJECTIVATIPROC      glGetVariantArrayObjectivATI;
00273 
00274 extern PFNWGLSWAPINTERVALEXTPROC                        wglSwapIntervalEXT;
00275 
00276 // GL_ARB_occlusion_query
00277 extern PFNGLGENQUERIESARBPROC glGenQueriesARB;
00278 extern PFNGLDELETEQUERIESARBPROC glDeleteQueriesARB;
00279 extern PFNGLISQUERYARBPROC glIsQueryARB;
00280 extern PFNGLBEGINQUERYARBPROC glBeginQueryARB;
00281 extern PFNGLENDQUERYARBPROC glEndQueryARB;
00282 extern PFNGLGETQUERYIVARBPROC glGetQueryivARB;
00283 extern PFNGLGETQUERYOBJECTIVARBPROC glGetQueryObjectivARB;
00284 extern PFNGLGETQUERYOBJECTUIVARBPROC glGetQueryObjectuivARB;
00285 
00286 // GL_ARB_point_parameters
00287 extern PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB;
00288 extern PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB;
00289 
00290 // GL_ARB_shader_objects
00291 extern PFNGLDELETEOBJECTARBPROC glDeleteObjectARB;
00292 extern PFNGLGETHANDLEARBPROC glGetHandleARB;
00293 extern PFNGLDETACHOBJECTARBPROC glDetachObjectARB;
00294 extern PFNGLCREATESHADEROBJECTARBPROC glCreateShaderObjectARB;
00295 extern PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
00296 extern PFNGLCOMPILESHADERARBPROC glCompileShaderARB;
00297 extern PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB;
00298 extern PFNGLATTACHOBJECTARBPROC glAttachObjectARB;
00299 extern PFNGLLINKPROGRAMARBPROC glLinkProgramARB;
00300 extern PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
00301 extern PFNGLVALIDATEPROGRAMARBPROC glValidateProgramARB;
00302 extern PFNGLUNIFORM1FARBPROC glUniform1fARB;
00303 extern PFNGLUNIFORM2FARBPROC glUniform2fARB;
00304 extern PFNGLUNIFORM3FARBPROC glUniform3fARB;
00305 extern PFNGLUNIFORM4FARBPROC glUniform4fARB;
00306 extern PFNGLUNIFORM1IARBPROC glUniform1iARB;
00307 extern PFNGLUNIFORM2IARBPROC glUniform2iARB;
00308 extern PFNGLUNIFORM3IARBPROC glUniform3iARB;
00309 extern PFNGLUNIFORM4IARBPROC glUniform4iARB;
00310 extern PFNGLUNIFORM1FVARBPROC glUniform1fvARB;
00311 extern PFNGLUNIFORM2FVARBPROC glUniform2fvARB;
00312 extern PFNGLUNIFORM3FVARBPROC glUniform3fvARB;
00313 extern PFNGLUNIFORM4FVARBPROC glUniform4fvARB;
00314 extern PFNGLUNIFORM1IVARBPROC glUniform1ivARB;
00315 extern PFNGLUNIFORM2IVARBPROC glUniform2ivARB;
00316 extern PFNGLUNIFORM3IVARBPROC glUniform3ivARB;
00317 extern PFNGLUNIFORM4IVARBPROC glUniform4ivARB;
00318 extern PFNGLUNIFORMMATRIX2FVARBPROC glUniformMatrix2fvARB;
00319 extern PFNGLUNIFORMMATRIX3FVARBPROC glUniformMatrix3fvARB;
00320 extern PFNGLUNIFORMMATRIX4FVARBPROC glUniformMatrix4fvARB;
00321 extern PFNGLGETOBJECTPARAMETERFVARBPROC glGetObjectParameterfvARB;
00322 extern PFNGLGETOBJECTPARAMETERIVARBPROC glGetObjectParameterivARB;
00323 extern PFNGLGETINFOLOGARBPROC glGetInfoLogARB;
00324 extern PFNGLGETATTACHEDOBJECTSARBPROC glGetAttachedObjectsARB;
00325 extern PFNGLGETUNIFORMLOCATIONARBPROC glGetUniformLocationARB;
00326 extern PFNGLGETACTIVEUNIFORMARBPROC glGetActiveUniformARB;
00327 extern PFNGLGETUNIFORMFVARBPROC glGetUniformfvARB;
00328 extern PFNGLGETUNIFORMIVARBPROC glGetUniformivARB;
00329 extern PFNGLGETSHADERSOURCEARBPROC glGetShaderSourceARB;
00330 
00331 // GL_ARB_vertex_shader
00332 extern PFNGLVERTEXATTRIB1DARBPROC glVertexAttrib1dARB;
00333 extern PFNGLVERTEXATTRIB1DVARBPROC glVertexAttrib1dvARB;
00334 extern PFNGLVERTEXATTRIB1FARBPROC glVertexAttrib1fARB;
00335 extern PFNGLVERTEXATTRIB1FVARBPROC glVertexAttrib1fvARB;
00336 extern PFNGLVERTEXATTRIB1SARBPROC glVertexAttrib1sARB;
00337 extern PFNGLVERTEXATTRIB1SVARBPROC glVertexAttrib1svARB;
00338 extern PFNGLVERTEXATTRIB2DARBPROC glVertexAttrib2dARB;
00339 extern PFNGLVERTEXATTRIB2DVARBPROC glVertexAttrib2dvARB;
00340 extern PFNGLVERTEXATTRIB2FARBPROC glVertexAttrib2fARB;
00341 extern PFNGLVERTEXATTRIB2FVARBPROC glVertexAttrib2fvARB;
00342 extern PFNGLVERTEXATTRIB2SARBPROC glVertexAttrib2sARB;
00343 extern PFNGLVERTEXATTRIB2SVARBPROC glVertexAttrib2svARB;
00344 extern PFNGLVERTEXATTRIB3DARBPROC glVertexAttrib3dARB;
00345 extern PFNGLVERTEXATTRIB3DVARBPROC glVertexAttrib3dvARB;
00346 extern PFNGLVERTEXATTRIB3FARBPROC glVertexAttrib3fARB;
00347 extern PFNGLVERTEXATTRIB3FVARBPROC glVertexAttrib3fvARB;
00348 extern PFNGLVERTEXATTRIB3SARBPROC glVertexAttrib3sARB;
00349 extern PFNGLVERTEXATTRIB3SVARBPROC glVertexAttrib3svARB;
00350 extern PFNGLVERTEXATTRIB4NBVARBPROC glVertexAttrib4nbvARB;
00351 extern PFNGLVERTEXATTRIB4NIVARBPROC glVertexAttrib4nivARB;
00352 extern PFNGLVERTEXATTRIB4NSVARBPROC glVertexAttrib4nsvARB;
00353 extern PFNGLVERTEXATTRIB4NUBARBPROC glVertexAttrib4nubARB;
00354 extern PFNGLVERTEXATTRIB4NUBVARBPROC glVertexAttrib4nubvARB;
00355 extern PFNGLVERTEXATTRIB4NUIVARBPROC glVertexAttrib4nuivARB;
00356 extern PFNGLVERTEXATTRIB4NUSVARBPROC glVertexAttrib4nusvARB;
00357 extern PFNGLVERTEXATTRIB4BVARBPROC glVertexAttrib4bvARB;
00358 extern PFNGLVERTEXATTRIB4DARBPROC glVertexAttrib4dARB;
00359 extern PFNGLVERTEXATTRIB4DVARBPROC glVertexAttrib4dvARB;
00360 extern PFNGLVERTEXATTRIB4FARBPROC glVertexAttrib4fARB;
00361 extern PFNGLVERTEXATTRIB4FVARBPROC glVertexAttrib4fvARB;
00362 extern PFNGLVERTEXATTRIB4IVARBPROC glVertexAttrib4ivARB;
00363 extern PFNGLVERTEXATTRIB4SARBPROC glVertexAttrib4sARB;
00364 extern PFNGLVERTEXATTRIB4SVARBPROC glVertexAttrib4svARB;
00365 extern PFNGLVERTEXATTRIB4UBVARBPROC glVertexAttrib4ubvARB;
00366 extern PFNGLVERTEXATTRIB4UIVARBPROC glVertexAttrib4uivARB;
00367 extern PFNGLVERTEXATTRIB4USVARBPROC glVertexAttrib4usvARB;
00368 extern PFNGLVERTEXATTRIBPOINTERARBPROC glVertexAttribPointerARB;
00369 extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC glEnableVertexAttribArrayARB;
00370 extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC glDisableVertexAttribArrayARB;
00371 extern PFNGLPROGRAMSTRINGARBPROC glProgramStringARB;
00372 extern PFNGLBINDPROGRAMARBPROC glBindProgramARB;
00373 extern PFNGLDELETEPROGRAMSARBPROC glDeleteProgramsARB;
00374 extern PFNGLGENPROGRAMSARBPROC glGenProgramsARB;
00375 extern PFNGLPROGRAMENVPARAMETER4DARBPROC glProgramEnvParameter4dARB;
00376 extern PFNGLPROGRAMENVPARAMETER4DVARBPROC glProgramEnvParameter4dvARB;
00377 extern PFNGLPROGRAMENVPARAMETER4FARBPROC glProgramEnvParameter4fARB;
00378 extern PFNGLPROGRAMENVPARAMETER4FVARBPROC glProgramEnvParameter4fvARB;
00379 extern PFNGLPROGRAMLOCALPARAMETER4DARBPROC glProgramLocalParameter4dARB;
00380 extern PFNGLPROGRAMLOCALPARAMETER4DVARBPROC glProgramLocalParameter4dvARB;
00381 extern PFNGLPROGRAMLOCALPARAMETER4FARBPROC glProgramLocalParameter4fARB;
00382 extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC glProgramLocalParameter4fvARB;
00383 extern PFNGLGETPROGRAMENVPARAMETERDVARBPROC glGetProgramEnvParameterdvARB;
00384 extern PFNGLGETPROGRAMENVPARAMETERFVARBPROC glGetProgramEnvParameterfvARB;
00385 extern PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC glGetProgramLocalParameterdvARB;
00386 extern PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC glGetProgramLocalParameterfvARB;
00387 extern PFNGLGETPROGRAMIVARBPROC glGetProgramivARB;
00388 extern PFNGLGETPROGRAMSTRINGARBPROC glGetProgramStringARB;
00389 extern PFNGLGETVERTEXATTRIBDVARBPROC glGetVertexAttribdvARB;
00390 extern PFNGLGETVERTEXATTRIBFVARBPROC glGetVertexAttribfvARB;
00391 extern PFNGLGETVERTEXATTRIBIVARBPROC glGetVertexAttribivARB;
00392 extern PFNGLGETVERTEXATTRIBPOINTERVARBPROC glGetVertexAttribPointervARB;
00393 extern PFNGLISPROGRAMARBPROC glIsProgramARB;
00394 extern PFNGLBINDATTRIBLOCATIONARBPROC glBindAttribLocationARB;
00395 extern PFNGLGETACTIVEATTRIBARBPROC glGetActiveAttribARB;
00396 extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB;
00397 
00398 //GL_EXT_framebuffer_object
00399 extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT;
00400 extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT;
00401 extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT;
00402 extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT;
00403 extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT;
00404 extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT;
00405 extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT;
00406 extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT;
00407 extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT;
00408 extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT;
00409 extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT;
00410 extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT;
00411 extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT;
00412 extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT;
00413 extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT;
00414 extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT;
00415 extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;
00416 
00417 
00418 #elif LL_DARWIN
00419 //----------------------------------------------------------------------------
00420 // LL_DARWIN
00421 
00422 #include <OpenGL/gl.h>
00423 #include <OpenGL/glu.h>
00424 
00425 #define GL_EXT_separate_specular_color 1
00426 #include <OpenGL/glext.h>
00427 
00428 #include "GL/glh_extensions.h"
00429 
00430 // These symbols don't exist on 10.3.9, so they have to be declared weak.  Redeclaring them here fixes the problem.
00431 // Note that they also must not be called on 10.3.9.  This should be taken care of by a runtime check for the existence of the GL extension.
00432 #include <AvailabilityMacros.h>
00433 
00434 // GL_EXT_framebuffer_object
00435 extern GLboolean glIsRenderbufferEXT(GLuint renderbuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00436 extern void glBindRenderbufferEXT(GLenum target, GLuint renderbuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00437 extern void glDeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00438 extern void glGenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00439 extern void glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00440 extern void glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00441 extern GLboolean glIsFramebufferEXT(GLuint framebuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00442 extern void glBindFramebufferEXT(GLenum target, GLuint framebuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00443 extern void glDeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00444 extern void glGenFramebuffersEXT(GLsizei n, GLuint *framebuffers) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00445 extern GLenum glCheckFramebufferStatusEXT(GLenum target) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00446 extern void glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00447 extern void glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00448 extern void glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00449 extern void glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00450 extern void glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint *params) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00451 extern void glGenerateMipmapEXT(GLenum target) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER;
00452 
00453 
00454 #ifdef __cplusplus
00455 extern "C" {
00456 #endif
00457 //
00458 // Define vertex buffer object headers on Mac
00459 //
00460 #ifndef GL_ARB_vertex_buffer_object
00461 #define GL_BUFFER_SIZE_ARB                0x8764
00462 #define GL_BUFFER_USAGE_ARB               0x8765
00463 #define GL_ARRAY_BUFFER_ARB               0x8892
00464 #define GL_ELEMENT_ARRAY_BUFFER_ARB       0x8893
00465 #define GL_ARRAY_BUFFER_BINDING_ARB       0x8894
00466 #define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895
00467 #define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896
00468 #define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897
00469 #define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898
00470 #define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899
00471 #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A
00472 #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B
00473 #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C
00474 #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D
00475 #define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E
00476 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F
00477 #define GL_READ_ONLY_ARB                  0x88B8
00478 #define GL_WRITE_ONLY_ARB                 0x88B9
00479 #define GL_READ_WRITE_ARB                 0x88BA
00480 #define GL_BUFFER_ACCESS_ARB              0x88BB
00481 #define GL_BUFFER_MAPPED_ARB              0x88BC
00482 #define GL_BUFFER_MAP_POINTER_ARB         0x88BD
00483 #define GL_STREAM_DRAW_ARB                0x88E0
00484 #define GL_STREAM_READ_ARB                0x88E1
00485 #define GL_STREAM_COPY_ARB                0x88E2
00486 #define GL_STATIC_DRAW_ARB                0x88E4
00487 #define GL_STATIC_READ_ARB                0x88E5
00488 #define GL_STATIC_COPY_ARB                0x88E6
00489 #define GL_DYNAMIC_DRAW_ARB               0x88E8
00490 #define GL_DYNAMIC_READ_ARB               0x88E9
00491 #define GL_DYNAMIC_COPY_ARB               0x88EA
00492 #endif
00493 
00494 
00495 
00496 #ifndef GL_ARB_vertex_buffer_object
00497 /* GL types for handling large vertex buffer objects */
00498 typedef intptr_t GLintptrARB;
00499 typedef intptr_t GLsizeiptrARB;
00500 #endif
00501 
00502 
00503 #ifndef GL_ARB_vertex_buffer_object
00504 #define GL_ARB_vertex_buffer_object 1
00505 #ifdef GL_GLEXT_FUNCTION_POINTERS
00506 typedef void (* glBindBufferARBProcPtr) (GLenum target, GLuint buffer);
00507 typedef void (* glDeleteBufferARBProcPtr) (GLsizei n, const GLuint *buffers);
00508 typedef void (* glGenBuffersARBProcPtr) (GLsizei n, GLuint *buffers);
00509 typedef GLboolean (* glIsBufferARBProcPtr) (GLuint buffer);
00510 typedef void (* glBufferDataARBProcPtr) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
00511 typedef void (* glBufferSubDataARBProcPtr) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
00512 typedef void (* glGetBufferSubDataARBProcPtr) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
00513 typedef GLvoid* (* glMapBufferARBProcPtr) (GLenum target, GLenum access);       /* Flawfinder: ignore */
00514 typedef GLboolean (* glUnmapBufferARBProcPtr) (GLenum target);
00515 typedef void (* glGetBufferParameterivARBProcPtr) (GLenum target, GLenum pname, GLint *params);
00516 typedef void (* glGetBufferPointervARBProcPtr) (GLenum target, GLenum pname, GLvoid* *params);
00517 #else
00518 extern void glBindBufferARB (GLenum, GLuint);
00519 extern void glDeleteBuffersARB (GLsizei, const GLuint *);
00520 extern void glGenBuffersARB (GLsizei, GLuint *);
00521 extern GLboolean glIsBufferARB (GLuint);
00522 extern void glBufferDataARB (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
00523 extern void glBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
00524 extern void glGetBufferSubDataARB (GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
00525 extern GLvoid* glMapBufferARB (GLenum, GLenum);
00526 extern GLboolean glUnmapBufferARB (GLenum);
00527 extern void glGetBufferParameterivARB (GLenum, GLenum, GLint *);
00528 extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *);
00529 #endif /* GL_GLEXT_FUNCTION_POINTERS */
00530 #endif
00531 
00532 // May be needed for DARWIN...
00533 // #ifndef GL_ARB_compressed_tex_image
00534 // #define GL_ARB_compressed_tex_image 1
00535 // #ifdef GL_GLEXT_FUNCTION_POINTERS
00536 // typedef void (* glCompressedTexImage1D) (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*);
00537 // typedef void (* glCompressedTexImage2D) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
00538 // typedef void (* glCompressedTexImage3D) (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
00539 // typedef void (* glCompressedTexSubImage1D) (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*);
00540 // typedef void (* glCompressedTexSubImage2D) (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
00541 // typedef void (* glCompressedTexSubImage3D) (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
00542 // typedef void (* glGetCompressedTexImage) (GLenum, GLint, GLvoid*);
00543 // #else
00544 // extern void glCompressedTexImage1D (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*);
00545 // extern void glCompressedTexImage2D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
00546 // extern void glCompressedTexImage3D (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*);
00547 // extern void glCompressedTexSubImage1D (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*);
00548 // extern void glCompressedTexSubImage2D (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
00549 // extern void glCompressedTexSubImage3D (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*);
00550 // extern void glGetCompressedTexImage (GLenum, GLint, GLvoid*);
00551 // #endif /* GL_GLEXT_FUNCTION_POINTERS */
00552 // #endif
00553 
00554 #ifdef __cplusplus
00555 }
00556 #endif
00557 
00558 #endif // LL_MESA / LL_WINDOWS / LL_DARWIN
00559 
00560 
00561 #endif // LL_LLGLHEADERS_H

Generated on Thu Jul 1 06:08:40 2010 for Second Life Viewer by  doxygen 1.4.7