From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- .../nel/driver__opengl__extension_8cpp-source.html | 986 +++++++++++++++++++++ 1 file changed, 986 insertions(+) create mode 100644 docs/doxygen/nel/driver__opengl__extension_8cpp-source.html (limited to 'docs/doxygen/nel/driver__opengl__extension_8cpp-source.html') diff --git a/docs/doxygen/nel/driver__opengl__extension_8cpp-source.html b/docs/doxygen/nel/driver__opengl__extension_8cpp-source.html new file mode 100644 index 00000000..c24c89ae --- /dev/null +++ b/docs/doxygen/nel/driver__opengl__extension_8cpp-source.html @@ -0,0 +1,986 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

driver_opengl_extension.cpp

Go to the documentation of this file.
00001 
+00007 /* Copyright, 2000 Nevrax Ltd.
+00008  *
+00009  * This file is part of NEVRAX NEL.
+00010  * NEVRAX NEL is free software; you can redistribute it and/or modify
+00011  * it under the terms of the GNU General Public License as published by
+00012  * the Free Software Foundation; either version 2, or (at your option)
+00013  * any later version.
+00014 
+00015  * NEVRAX NEL is distributed in the hope that it will be useful, but
+00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
+00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+00018  * General Public License for more details.
+00019 
+00020  * You should have received a copy of the GNU General Public License
+00021  * along with NEVRAX NEL; see the file COPYING. If not, write to the
+00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+00023  * MA 02111-1307, USA.
+00024  */
+00025 
+00026 
+00027 #include "stdopengl.h"
+00028 
+00029 #include "driver_opengl_extension.h"
+00030 #include "3d/material.h"
+00031 
+00032 // ***************************************************************************
+00033 #ifdef NL_OS_WINDOWS
+00034 #define nelglGetProcAddress wglGetProcAddress
+00035 #else   // NL_OS_WINDOWS
+00036 void (*nelglGetProcAddress(const char *procName))()
+00037 {
+00038         return glXGetProcAddressARB((const GLubyte *)procName);
+00039 }
+00040 #endif  // NL_OS_WINDOWS
+00041 
+00042 
+00043 // ***************************************************************************
+00044 // The exported function names
+00045 
+00046 // ARB_multitexture
+00047 //=================
+00048 NEL_PFNGLACTIVETEXTUREARBPROC nglActiveTextureARB;
+00049 NEL_PFNGLCLIENTACTIVETEXTUREARBPROC nglClientActiveTextureARB;
+00050 
+00051 NEL_PFNGLMULTITEXCOORD1SARBPROC nglMultiTexCoord1sARB;
+00052 NEL_PFNGLMULTITEXCOORD1IARBPROC nglMultiTexCoord1iARB;
+00053 NEL_PFNGLMULTITEXCOORD1FARBPROC nglMultiTexCoord1fARB;
+00054 NEL_PFNGLMULTITEXCOORD1DARBPROC nglMultiTexCoord1dARB;
+00055 NEL_PFNGLMULTITEXCOORD2SARBPROC nglMultiTexCoord2sARB;
+00056 NEL_PFNGLMULTITEXCOORD2IARBPROC nglMultiTexCoord2iARB;
+00057 NEL_PFNGLMULTITEXCOORD2FARBPROC nglMultiTexCoord2fARB;
+00058 NEL_PFNGLMULTITEXCOORD2DARBPROC nglMultiTexCoord2dARB;
+00059 NEL_PFNGLMULTITEXCOORD3SARBPROC nglMultiTexCoord3sARB;
+00060 NEL_PFNGLMULTITEXCOORD3IARBPROC nglMultiTexCoord3iARB;
+00061 NEL_PFNGLMULTITEXCOORD3FARBPROC nglMultiTexCoord3fARB;
+00062 NEL_PFNGLMULTITEXCOORD3DARBPROC nglMultiTexCoord3dARB;
+00063 NEL_PFNGLMULTITEXCOORD4SARBPROC nglMultiTexCoord4sARB;
+00064 NEL_PFNGLMULTITEXCOORD4IARBPROC nglMultiTexCoord4iARB;
+00065 NEL_PFNGLMULTITEXCOORD4FARBPROC nglMultiTexCoord4fARB;
+00066 NEL_PFNGLMULTITEXCOORD4DARBPROC nglMultiTexCoord4dARB;
+00067 
+00068 NEL_PFNGLMULTITEXCOORD1SVARBPROC nglMultiTexCoord1svARB;
+00069 NEL_PFNGLMULTITEXCOORD1IVARBPROC nglMultiTexCoord1ivARB;
+00070 NEL_PFNGLMULTITEXCOORD1FVARBPROC nglMultiTexCoord1fvARB;
+00071 NEL_PFNGLMULTITEXCOORD1DVARBPROC nglMultiTexCoord1dvARB;
+00072 NEL_PFNGLMULTITEXCOORD2SVARBPROC nglMultiTexCoord2svARB;
+00073 NEL_PFNGLMULTITEXCOORD2IVARBPROC nglMultiTexCoord2ivARB;
+00074 NEL_PFNGLMULTITEXCOORD2FVARBPROC nglMultiTexCoord2fvARB;
+00075 NEL_PFNGLMULTITEXCOORD2DVARBPROC nglMultiTexCoord2dvARB;
+00076 NEL_PFNGLMULTITEXCOORD3SVARBPROC nglMultiTexCoord3svARB;
+00077 NEL_PFNGLMULTITEXCOORD3IVARBPROC nglMultiTexCoord3ivARB;
+00078 NEL_PFNGLMULTITEXCOORD3FVARBPROC nglMultiTexCoord3fvARB;
+00079 NEL_PFNGLMULTITEXCOORD3DVARBPROC nglMultiTexCoord3dvARB;
+00080 NEL_PFNGLMULTITEXCOORD4SVARBPROC nglMultiTexCoord4svARB;
+00081 NEL_PFNGLMULTITEXCOORD4IVARBPROC nglMultiTexCoord4ivARB;
+00082 NEL_PFNGLMULTITEXCOORD4FVARBPROC nglMultiTexCoord4fvARB;
+00083 NEL_PFNGLMULTITEXCOORD4DVARBPROC nglMultiTexCoord4dvARB;
+00084 
+00085 
+00086 // ARB_TextureCompression.
+00087 //========================
+00088 NEL_PFNGLCOMPRESSEDTEXIMAGE3DARBPROC    nglCompressedTexImage3DARB;
+00089 NEL_PFNGLCOMPRESSEDTEXIMAGE2DARBPROC    nglCompressedTexImage2DARB;
+00090 NEL_PFNGLCOMPRESSEDTEXIMAGE1DARBPROC    nglCompressedTexImage1DARB;
+00091 NEL_PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC nglCompressedTexSubImage3DARB;
+00092 NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC nglCompressedTexSubImage2DARB;
+00093 NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC nglCompressedTexSubImage1DARB;
+00094 NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC   nglGetCompressedTexImageARB;
+00095 
+00096 
+00097 // VertexArrayRangeNV.
+00098 //====================
+00099 NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC    nglFlushVertexArrayRangeNV;
+00100 NEL_PFNGLVERTEXARRAYRANGENVPROC                 nglVertexArrayRangeNV;
+00101 #ifdef NL_OS_WINDOWS
+00102 PFNWGLALLOCATEMEMORYNVPROC                      wglAllocateMemoryNV;
+00103 PFNWGLFREEMEMORYNVPROC                          wglFreeMemoryNV;
+00104 #endif
+00105 
+00106 
+00107 // FenceNV.
+00108 //====================
+00109 NEL_PFNGLDELETEFENCESNVPROC                             nglDeleteFencesNV;
+00110 NEL_PFNGLGENFENCESNVPROC                                nglGenFencesNV;
+00111 NEL_PFNGLISFENCENVPROC                                  nglIsFenceNV;
+00112 NEL_PFNGLTESTFENCENVPROC                                nglTestFenceNV;
+00113 NEL_PFNGLGETFENCEIVNVPROC                               nglGetFenceivNV;
+00114 NEL_PFNGLFINISHFENCENVPROC                              nglFinishFenceNV;
+00115 NEL_PFNGLSETFENCENVPROC                                 nglSetFenceNV;
+00116 
+00117 
+00118 // VertexWeighting.
+00119 //====================
+00120 NEL_PFNGLVERTEXWEIGHTFEXTPROC                   nglVertexWeightfEXT;
+00121 NEL_PFNGLVERTEXWEIGHTFVEXTPROC                  nglVertexWeightfvEXT;
+00122 NEL_PFNGLVERTEXWEIGHTPOINTEREXTPROC             nglVertexWeightPointerEXT;
+00123 
+00124 
+00125 // VertexProgramExtension.
+00126 //========================
+00127 NEL_PFNGLAREPROGRAMSRESIDENTNVPROC              nglAreProgramsResidentNV;
+00128 NEL_PFNGLBINDPROGRAMNVPROC                              nglBindProgramNV;
+00129 NEL_PFNGLDELETEPROGRAMSNVPROC                   nglDeleteProgramsNV;
+00130 NEL_PFNGLEXECUTEPROGRAMNVPROC                   nglExecuteProgramNV;
+00131 NEL_PFNGLGENPROGRAMSNVPROC                              nglGenProgramsNV;
+00132 NEL_PFNGLGETPROGRAMPARAMETERDVNVPROC    nglGetProgramParameterdvNV;
+00133 NEL_PFNGLGETPROGRAMPARAMETERFVNVPROC    nglGetProgramParameterfvNV;
+00134 NEL_PFNGLGETPROGRAMIVNVPROC                             nglGetProgramivNV;
+00135 NEL_PFNGLGETPROGRAMSTRINGNVPROC                 nglGetProgramStringNV;
+00136 NEL_PFNGLGETTRACKMATRIXIVNVPROC                 nglGetTrackMatrixivNV;
+00137 NEL_PFNGLGETVERTEXATTRIBDVNVPROC                nglGetVertexAttribdvNV;
+00138 NEL_PFNGLGETVERTEXATTRIBFVNVPROC                nglGetVertexAttribfvNV;
+00139 NEL_PFNGLGETVERTEXATTRIBIVNVPROC                nglGetVertexAttribivNV;
+00140 NEL_PFNGLGETVERTEXATTRIBPOINTERVNVPROC  nglGetVertexAttribPointervNV;
+00141 NEL_PFNGLISPROGRAMNVPROC                                nglIsProgramNV;
+00142 NEL_PFNGLLOADPROGRAMNVPROC                              nglLoadProgramNV;
+00143 NEL_PFNGLPROGRAMPARAMETER4DNVPROC               nglProgramParameter4dNV;
+00144 NEL_PFNGLPROGRAMPARAMETER4DVNVPROC              nglProgramParameter4dvNV;
+00145 NEL_PFNGLPROGRAMPARAMETER4FNVPROC               nglProgramParameter4fNV;
+00146 NEL_PFNGLPROGRAMPARAMETER4FVNVPROC              nglProgramParameter4fvNV;
+00147 NEL_PFNGLPROGRAMPARAMETERS4DVNVPROC             nglProgramParameters4dvNV;
+00148 NEL_PFNGLPROGRAMPARAMETERS4FVNVPROC             nglProgramParameters4fvNV;
+00149 NEL_PFNGLREQUESTRESIDENTPROGRAMSNVPROC  nglRequestResidentProgramsNV;
+00150 NEL_PFNGLTRACKMATRIXNVPROC                              nglTrackMatrixNV;
+00151 NEL_PFNGLVERTEXATTRIBPOINTERNVPROC              nglVertexAttribPointerNV;
+00152 NEL_PFNGLVERTEXATTRIB1DNVPROC                   nglVertexAttrib1dNV;
+00153 NEL_PFNGLVERTEXATTRIB1DVNVPROC                  nglVertexAttrib1dvNV;
+00154 NEL_PFNGLVERTEXATTRIB1FNVPROC                   nglVertexAttrib1fNV;
+00155 NEL_PFNGLVERTEXATTRIB1FVNVPROC                  nglVertexAttrib1fvNV;
+00156 NEL_PFNGLVERTEXATTRIB1SNVPROC                   nglVertexAttrib1sNV;
+00157 NEL_PFNGLVERTEXATTRIB1SVNVPROC                  nglVertexAttrib1svNV;
+00158 NEL_PFNGLVERTEXATTRIB2DNVPROC                   nglVertexAttrib2dNV;
+00159 NEL_PFNGLVERTEXATTRIB2DVNVPROC                  nglVertexAttrib2dvNV;
+00160 NEL_PFNGLVERTEXATTRIB2FNVPROC                   nglVertexAttrib2fNV;
+00161 NEL_PFNGLVERTEXATTRIB2FVNVPROC                  nglVertexAttrib2fvNV;
+00162 NEL_PFNGLVERTEXATTRIB2SNVPROC                   nglVertexAttrib2sNV;
+00163 NEL_PFNGLVERTEXATTRIB2SVNVPROC                  nglVertexAttrib2svNV;
+00164 NEL_PFNGLVERTEXATTRIB3DNVPROC                   nglVertexAttrib3dNV;
+00165 NEL_PFNGLVERTEXATTRIB3DVNVPROC                  nglVertexAttrib3dvNV;
+00166 NEL_PFNGLVERTEXATTRIB3FNVPROC                   nglVertexAttrib3fNV;
+00167 NEL_PFNGLVERTEXATTRIB3FVNVPROC                  nglVertexAttrib3fvNV;
+00168 NEL_PFNGLVERTEXATTRIB3SNVPROC                   nglVertexAttrib3sNV;
+00169 NEL_PFNGLVERTEXATTRIB3SVNVPROC                  nglVertexAttrib3svNV;
+00170 NEL_PFNGLVERTEXATTRIB4DNVPROC                   nglVertexAttrib4dNV;
+00171 NEL_PFNGLVERTEXATTRIB4DVNVPROC                  nglVertexAttrib4dvNV;
+00172 NEL_PFNGLVERTEXATTRIB4FNVPROC                   nglVertexAttrib4fNV;
+00173 NEL_PFNGLVERTEXATTRIB4FVNVPROC                  nglVertexAttrib4fvNV;
+00174 NEL_PFNGLVERTEXATTRIB4SNVPROC                   nglVertexAttrib4sNV;
+00175 NEL_PFNGLVERTEXATTRIB4SVNVPROC                  nglVertexAttrib4svNV;
+00176 NEL_PFNGLVERTEXATTRIB4UBVNVPROC                 nglVertexAttrib4ubvNV;
+00177 NEL_PFNGLVERTEXATTRIBS1DVNVPROC                 nglVertexAttribs1dvNV;
+00178 NEL_PFNGLVERTEXATTRIBS1FVNVPROC                 nglVertexAttribs1fvNV;
+00179 NEL_PFNGLVERTEXATTRIBS1SVNVPROC                 nglVertexAttribs1svNV;
+00180 NEL_PFNGLVERTEXATTRIBS2DVNVPROC                 nglVertexAttribs2dvNV;
+00181 NEL_PFNGLVERTEXATTRIBS2FVNVPROC                 nglVertexAttribs2fvNV;
+00182 NEL_PFNGLVERTEXATTRIBS2SVNVPROC                 nglVertexAttribs2svNV;
+00183 NEL_PFNGLVERTEXATTRIBS3DVNVPROC                 nglVertexAttribs3dvNV;
+00184 NEL_PFNGLVERTEXATTRIBS3FVNVPROC                 nglVertexAttribs3fvNV;
+00185 NEL_PFNGLVERTEXATTRIBS3SVNVPROC                 nglVertexAttribs3svNV;
+00186 NEL_PFNGLVERTEXATTRIBS4DVNVPROC                 nglVertexAttribs4dvNV;
+00187 NEL_PFNGLVERTEXATTRIBS4FVNVPROC                 nglVertexAttribs4fvNV;
+00188 NEL_PFNGLVERTEXATTRIBS4SVNVPROC                 nglVertexAttribs4svNV;
+00189 NEL_PFNGLVERTEXATTRIBS4UBVNVPROC                nglVertexAttribs4ubvNV;
+00190 
+00191 // VertexShaderExt extension
+00192 //==========================
+00193 NEL_PFNGLBEGINVERTEXSHADEREXTPROC                       nglBeginVertexShaderEXT;
+00194 NEL_PFNGLENDVERTEXSHADEREXTPROC                         nglEndVertexShaderEXT;
+00195 NEL_PFNGLBINDVERTEXSHADEREXTPROC                        nglBindVertexShaderEXT;
+00196 NEL_PFNGLGENVERTEXSHADERSEXTPROC                        nglGenVertexShadersEXT;
+00197 NEL_PFNGLDELETEVERTEXSHADEREXTPROC                      nglDeleteVertexShaderEXT;
+00198 NEL_PFNGLSHADEROP1EXTPROC                                       nglShaderOp1EXT;
+00199 NEL_PFNGLSHADEROP2EXTPROC                                       nglShaderOp2EXT;
+00200 NEL_PFNGLSHADEROP3EXTPROC                                       nglShaderOp3EXT;
+00201 NEL_PFNGLSWIZZLEEXTPROC                                         nglSwizzleEXT;
+00202 NEL_PFNGLWRITEMASKEXTPROC                                       nglWriteMaskEXT;
+00203 NEL_PFNGLINSERTCOMPONENTEXTPROC                         nglInsertComponentEXT;
+00204 NEL_PFNGLEXTRACTCOMPONENTEXTPROC                        nglExtractComponentEXT;
+00205 NEL_PFNGLGENSYMBOLSEXTPROC                                      nglGenSymbolsEXT;
+00206 NEL_PFNGLSETINVARIANTEXTPROC                            nglSetInvariantEXT;
+00207 NEL_PFNGLSETLOCALCONSTANTEXTPROC                        nglSetLocalConstantEXT;
+00208 NEL_PFNGLVARIANTPOINTEREXTPROC                          nglVariantPointerEXT;
+00209 NEL_PFNGLENABLEVARIANTCLIENTSTATEEXTPROC        nglEnableVariantClientStateEXT;
+00210 NEL_PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC       nglDisableVariantClientStateEXT;
+00211 NEL_PFNGLBINDLIGHTPARAMETEREXTPROC                      nglBindLightParameterEXT;
+00212 NEL_PFNGLBINDMATERIALPARAMETEREXTPROC           nglBindMaterialParameterEXT;
+00213 NEL_PFNGLBINDTEXGENPARAMETEREXTPROC                     nglBindTexGenParameterEXT;
+00214 NEL_PFNGLBINDTEXTUREUNITPARAMETEREXTPROC        nglBindTextureUnitParameterEXT;
+00215 NEL_PFNGLBINDPARAMETEREXTPROC                           nglBindParameterEXT;
+00216 NEL_PFNGLISVARIANTENABLEDEXTPROC                        nglIsVariantEnabledEXT;
+00217 NEL_PFNGLGETVARIANTBOOLEANVEXTPROC                      nglGetVariantBooleanvEXT;
+00218 NEL_PFNGLGETVARIANTINTEGERVEXTPROC                      nglGetVariantIntegervEXT;
+00219 NEL_PFNGLGETVARIANTFLOATVEXTPROC                        nglGetVariantFloatvEXT;
+00220 NEL_PFNGLGETVARIANTPOINTERVEXTPROC                      nglGetVariantPointervEXT;
+00221 NEL_PFNGLGETINVARIANTBOOLEANVEXTPROC            nglGetInvariantBooleanvEXT;
+00222 NEL_PFNGLGETINVARIANTINTEGERVEXTPROC            nglGetInvariantIntegervEXT;
+00223 NEL_PFNGLGETINVARIANTFLOATVEXTPROC                      nglGetInvariantFloatvEXT;
+00224 NEL_PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC        nglGetLocalConstantBooleanvEXT;
+00225 NEL_PFNGLGETLOCALCONSTANTINTEGERVEXTPROC        nglGetLocalConstantIntegervEXT;
+00226 NEL_PFNGLGETLOCALCONSTANTFLOATVEXTPROC          nglGetLocalConstantFloatvEXT;
+00227 
+00228 
+00229 // SecondaryColor extension
+00230 //========================
+00231 NEL_PFNGLSECONDARYCOLOR3BEXTPROC                nglSecondaryColor3bEXT;
+00232 NEL_PFNGLSECONDARYCOLOR3BVEXTPROC               nglSecondaryColor3bvEXT;
+00233 NEL_PFNGLSECONDARYCOLOR3DEXTPROC                nglSecondaryColor3dEXT;
+00234 NEL_PFNGLSECONDARYCOLOR3DVEXTPROC               nglSecondaryColor3dvEXT;
+00235 NEL_PFNGLSECONDARYCOLOR3FEXTPROC                nglSecondaryColor3fEXT;
+00236 NEL_PFNGLSECONDARYCOLOR3FVEXTPROC               nglSecondaryColor3fvEXT;
+00237 NEL_PFNGLSECONDARYCOLOR3IEXTPROC                nglSecondaryColor3iEXT;
+00238 NEL_PFNGLSECONDARYCOLOR3IVEXTPROC               nglSecondaryColor3ivEXT;
+00239 NEL_PFNGLSECONDARYCOLOR3SEXTPROC                nglSecondaryColor3sEXT;
+00240 NEL_PFNGLSECONDARYCOLOR3SVEXTPROC               nglSecondaryColor3svEXT;
+00241 NEL_PFNGLSECONDARYCOLOR3UBEXTPROC               nglSecondaryColor3ubEXT;
+00242 NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC              nglSecondaryColor3ubvEXT;
+00243 NEL_PFNGLSECONDARYCOLOR3UIEXTPROC               nglSecondaryColor3uiEXT;
+00244 NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC              nglSecondaryColor3uivEXT;
+00245 NEL_PFNGLSECONDARYCOLOR3USEXTPROC               nglSecondaryColor3usEXT;
+00246 NEL_PFNGLSECONDARYCOLOR3USVEXTPROC              nglSecondaryColor3usvEXT;
+00247 NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC   nglSecondaryColorPointerEXT;
+00248 
+00249 
+00250 // BlendColor extension
+00251 //========================
+00252 NEL_PFNGLBLENDCOLOREXTPROC                              nglBlendColorEXT;
+00253 
+00254 
+00255 // GL_ATI_vertex_array_object extension
+00256 //========================
+00257 NEL_PFNGLNEWOBJECTBUFFERATIPROC                 nglNewObjectBufferATI;
+00258 NEL_PFNGLISOBJECTBUFFERATIPROC                  nglIsObjectBufferATI;
+00259 NEL_PFNGLUPDATEOBJECTBUFFERATIPROC              nglUpdateObjectBufferATI;
+00260 NEL_PFNGLGETOBJECTBUFFERFVATIPROC               nglGetObjectBufferfvATI;
+00261 NEL_PFNGLGETOBJECTBUFFERIVATIPROC               nglGetObjectBufferivATI;
+00262 NEL_PFNGLDELETEOBJECTBUFFERATIPROC              nglDeleteObjectBufferATI;
+00263 NEL_PFNGLARRAYOBJECTATIPROC                             nglArrayObjectATI;
+00264 NEL_PFNGLGETARRAYOBJECTFVATIPROC                nglGetArrayObjectfvATI;
+00265 NEL_PFNGLGETARRAYOBJECTIVATIPROC                nglGetArrayObjectivATI;
+00266 NEL_PFNGLVARIANTARRAYOBJECTATIPROC              nglVariantArrayObjectATI;
+00267 NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC nglGetVariantArrayObjectfvATI;
+00268 NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC nglGetVariantArrayObjectivATI;
+00269 
+00270 
+00271 // GL_ATI_envmap_bumpmap extension
+00272 //========================
+00273 PFNGLTEXBUMPPARAMETERIVATIPROC nglTexBumpParameterivATI;
+00274 PFNGLTEXBUMPPARAMETERFVATIPROC nglTexBumpParameterfvATI;
+00275 PFNGLGETTEXBUMPPARAMETERIVATIPROC nglGetTexBumpParameterivATI;
+00276 PFNGLGETTEXBUMPPARAMETERFVATIPROC nglGetTexBumpParameterfvATI;
+00277 
+00278 
+00279 // Pbuffer extension
+00280 //==================
+00281 #ifdef NL_OS_WINDOWS
+00282 PFNWGLCREATEPBUFFERARBPROC                      wglCreatePbufferARB;
+00283 PFNWGLGETPUFFERDCARBPROC                        wglGetPbufferDCARB;
+00284 PFNWGLRELEASEPUFFERDCARBPROC            wglReleasePbufferDCARB;
+00285 PFNWGLDESTROYPUFFERARBPROC                      wglDestroyPbufferARB;
+00286 PFNWGLQUERYPBUFFERARBPROC                       wglQueryPbufferARB;
+00287 #endif
+00288 
+00289 
+00290 // Get Pixel format extension
+00291 //===========================
+00292 #ifdef NL_OS_WINDOWS
+00293 PFNWGLGETPIXELFORMATATTRIBIVARBPROC     wglGetPixelFormatAttribivARB;
+00294 PFNWGLGETPIXELFORMATATTRIBFVARBPROC     wglGetPixelFormatAttribfvARB;
+00295 PFNWGLCHOOSEPIXELFORMATARBPROC          wglChoosePixelFormatARB;
+00296 #endif
+00297 
+00298 
+00299 // WGL_ARB_extensions_string
+00300 #ifdef NL_OS_WINDOWS
+00301 PFNWGFGETEXTENSIONSSTRINGARB            wglGetExtensionsStringARB;
+00302 #endif
+00303 
+00304 
+00305 
+00306 
+00307 
+00308 // ***************************************************************************
+00309 // ***************************************************************************
+00310 // ***************************************************************************
+00311 // ***************************************************************************
+00312 
+00313 
+00314 namespace       NL3D
+00315 {
+00316 
+00317 
+00318 // ***************************************************************************
+00319 // Extensions registrations, and Windows function Registration.
+00320 
+00321 
+00322 // *********************************
+00323 static bool setupARBMultiTexture(const char     *glext)
+00324 {
+00325         if(strstr(glext, "GL_ARB_multitexture")==NULL)
+00326                 return false;
+00327 
+00328         if(!(nglActiveTextureARB=(NEL_PFNGLACTIVETEXTUREARBPROC)nelglGetProcAddress("glActiveTextureARB")))return false;
+00329         if(!(nglClientActiveTextureARB=(NEL_PFNGLCLIENTACTIVETEXTUREARBPROC)nelglGetProcAddress("glClientActiveTextureARB")))return false;
+00330 
+00331         if(!(nglMultiTexCoord1sARB=(NEL_PFNGLMULTITEXCOORD1SARBPROC)nelglGetProcAddress("glMultiTexCoord1sARB")))return false;
+00332         if(!(nglMultiTexCoord1iARB=(NEL_PFNGLMULTITEXCOORD1IARBPROC)nelglGetProcAddress("glMultiTexCoord1iARB")))return false;
+00333         if(!(nglMultiTexCoord1fARB=(NEL_PFNGLMULTITEXCOORD1FARBPROC)nelglGetProcAddress("glMultiTexCoord1fARB")))return false;
+00334         if(!(nglMultiTexCoord1dARB=(NEL_PFNGLMULTITEXCOORD1DARBPROC)nelglGetProcAddress("glMultiTexCoord1dARB")))return false;
+00335         if(!(nglMultiTexCoord2sARB=(NEL_PFNGLMULTITEXCOORD2SARBPROC)nelglGetProcAddress("glMultiTexCoord2sARB")))return false;
+00336         if(!(nglMultiTexCoord2iARB=(NEL_PFNGLMULTITEXCOORD2IARBPROC)nelglGetProcAddress("glMultiTexCoord2iARB")))return false;
+00337         if(!(nglMultiTexCoord2fARB=(NEL_PFNGLMULTITEXCOORD2FARBPROC)nelglGetProcAddress("glMultiTexCoord2fARB")))return false;
+00338         if(!(nglMultiTexCoord2dARB=(NEL_PFNGLMULTITEXCOORD2DARBPROC)nelglGetProcAddress("glMultiTexCoord2dARB")))return false;
+00339         if(!(nglMultiTexCoord3sARB=(NEL_PFNGLMULTITEXCOORD3SARBPROC)nelglGetProcAddress("glMultiTexCoord3sARB")))return false;
+00340         if(!(nglMultiTexCoord3iARB=(NEL_PFNGLMULTITEXCOORD3IARBPROC)nelglGetProcAddress("glMultiTexCoord3iARB")))return false;
+00341         if(!(nglMultiTexCoord3fARB=(NEL_PFNGLMULTITEXCOORD3FARBPROC)nelglGetProcAddress("glMultiTexCoord3fARB")))return false;
+00342         if(!(nglMultiTexCoord3dARB=(NEL_PFNGLMULTITEXCOORD3DARBPROC)nelglGetProcAddress("glMultiTexCoord3dARB")))return false;
+00343         if(!(nglMultiTexCoord4sARB=(NEL_PFNGLMULTITEXCOORD4SARBPROC)nelglGetProcAddress("glMultiTexCoord4sARB")))return false;
+00344         if(!(nglMultiTexCoord4iARB=(NEL_PFNGLMULTITEXCOORD4IARBPROC)nelglGetProcAddress("glMultiTexCoord4iARB")))return false;
+00345         if(!(nglMultiTexCoord4fARB=(NEL_PFNGLMULTITEXCOORD4FARBPROC)nelglGetProcAddress("glMultiTexCoord4fARB")))return false;
+00346         if(!(nglMultiTexCoord4dARB=(NEL_PFNGLMULTITEXCOORD4DARBPROC)nelglGetProcAddress("glMultiTexCoord4dARB")))return false;
+00347 
+00348         if(!(nglMultiTexCoord1svARB=(NEL_PFNGLMULTITEXCOORD1SVARBPROC)nelglGetProcAddress("glMultiTexCoord1svARB")))return false;
+00349         if(!(nglMultiTexCoord1ivARB=(NEL_PFNGLMULTITEXCOORD1IVARBPROC)nelglGetProcAddress("glMultiTexCoord1ivARB")))return false;
+00350         if(!(nglMultiTexCoord1fvARB=(NEL_PFNGLMULTITEXCOORD1FVARBPROC)nelglGetProcAddress("glMultiTexCoord1fvARB")))return false;
+00351         if(!(nglMultiTexCoord1dvARB=(NEL_PFNGLMULTITEXCOORD1DVARBPROC)nelglGetProcAddress("glMultiTexCoord1dvARB")))return false;
+00352         if(!(nglMultiTexCoord2svARB=(NEL_PFNGLMULTITEXCOORD2SVARBPROC)nelglGetProcAddress("glMultiTexCoord2svARB")))return false;
+00353         if(!(nglMultiTexCoord2ivARB=(NEL_PFNGLMULTITEXCOORD2IVARBPROC)nelglGetProcAddress("glMultiTexCoord2ivARB")))return false;
+00354         if(!(nglMultiTexCoord2fvARB=(NEL_PFNGLMULTITEXCOORD2FVARBPROC)nelglGetProcAddress("glMultiTexCoord2fvARB")))return false;
+00355         if(!(nglMultiTexCoord2dvARB=(NEL_PFNGLMULTITEXCOORD2DVARBPROC)nelglGetProcAddress("glMultiTexCoord2dvARB")))return false;
+00356         if(!(nglMultiTexCoord3svARB=(NEL_PFNGLMULTITEXCOORD3SVARBPROC)nelglGetProcAddress("glMultiTexCoord3svARB")))return false;
+00357         if(!(nglMultiTexCoord3ivARB=(NEL_PFNGLMULTITEXCOORD3IVARBPROC)nelglGetProcAddress("glMultiTexCoord3ivARB")))return false;
+00358         if(!(nglMultiTexCoord3fvARB=(NEL_PFNGLMULTITEXCOORD3FVARBPROC)nelglGetProcAddress("glMultiTexCoord3fvARB")))return false;
+00359         if(!(nglMultiTexCoord3dvARB=(NEL_PFNGLMULTITEXCOORD3DVARBPROC)nelglGetProcAddress("glMultiTexCoord3dvARB")))return false;
+00360         if(!(nglMultiTexCoord4svARB=(NEL_PFNGLMULTITEXCOORD4SVARBPROC)nelglGetProcAddress("glMultiTexCoord4svARB")))return false;
+00361         if(!(nglMultiTexCoord4ivARB=(NEL_PFNGLMULTITEXCOORD4IVARBPROC)nelglGetProcAddress("glMultiTexCoord4ivARB")))return false;
+00362         if(!(nglMultiTexCoord4fvARB=(NEL_PFNGLMULTITEXCOORD4FVARBPROC)nelglGetProcAddress("glMultiTexCoord4fvARB")))return false;
+00363         if(!(nglMultiTexCoord4dvARB=(NEL_PFNGLMULTITEXCOORD4DVARBPROC)nelglGetProcAddress("glMultiTexCoord4dvARB")))return false;
+00364 
+00365         return true;
+00366 }
+00367 
+00368 
+00369 // *********************************
+00370 static bool setupEXTTextureEnvCombine(const char        *glext)
+00371 {
+00372         if(strstr(glext, "GL_EXT_texture_env_combine")==NULL)
+00373                 return false;
+00374 
+00375         return true;
+00376 }
+00377 
+00378 
+00379 // *********************************
+00380 static bool     setupARBTextureCompression(const char   *glext)
+00381 {
+00382         if(strstr(glext, "GL_ARB_texture_compression")==NULL)
+00383           return false;
+00384 
+00385         if(!(nglCompressedTexImage3DARB=(NEL_PFNGLCOMPRESSEDTEXIMAGE3DARBPROC)nelglGetProcAddress("glCompressedTexImage3DARB")))return false;
+00386         if(!(nglCompressedTexImage2DARB=(NEL_PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)nelglGetProcAddress("glCompressedTexImage2DARB")))return false;
+00387         if(!(nglCompressedTexImage1DARB=(NEL_PFNGLCOMPRESSEDTEXIMAGE1DARBPROC)nelglGetProcAddress("glCompressedTexImage1DARB")))return false;
+00388         if(!(nglCompressedTexSubImage3DARB=(NEL_PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC)nelglGetProcAddress("glCompressedTexSubImage3DARB")))return false;
+00389         if(!(nglCompressedTexSubImage2DARB=(NEL_PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC)nelglGetProcAddress("glCompressedTexSubImage2DARB")))return false;
+00390         if(!(nglCompressedTexSubImage1DARB=(NEL_PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC)nelglGetProcAddress("glCompressedTexSubImage1DARB")))return false;
+00391         if(!(nglGetCompressedTexImageARB=(NEL_PFNGLGETCOMPRESSEDTEXIMAGEARBPROC)nelglGetProcAddress("glGetCompressedTexImageARB")))return false;
+00392 
+00393         return true;
+00394 }
+00395 
+00396 
+00397 // *********************************
+00398 static bool     setupNVVertexArrayRange(const char      *glext)
+00399 {
+00400         // \todo_yoyo: TODO_LINUX: for now, just return false.
+00401 #ifndef NL_OS_WINDOWS
+00402         return false;
+00403 #endif
+00404 
+00405 
+00406         // Test if VAR is present.
+00407         if(strstr(glext, "GL_NV_vertex_array_range")==NULL)
+00408                 return false;
+00409         // Tess Fence too.
+00410         if( strstr(glext, "GL_NV_fence")==NULL )
+00411                 return false;
+00412 
+00413 
+00414         // Get VAR adress.
+00415         if(!(nglFlushVertexArrayRangeNV=(NEL_PFNGLFLUSHVERTEXARRAYRANGENVPROC)nelglGetProcAddress("glFlushVertexArrayRangeNV")))return false;
+00416         if(!(nglVertexArrayRangeNV=(NEL_PFNGLVERTEXARRAYRANGENVPROC)nelglGetProcAddress("glVertexArrayRangeNV")))return false;
+00417 #ifdef NL_OS_WINDOWS
+00418         if(!(wglAllocateMemoryNV= (PFNWGLALLOCATEMEMORYNVPROC)nelglGetProcAddress("wglAllocateMemoryNV")))return false;
+00419         if(!(wglFreeMemoryNV= (PFNWGLFREEMEMORYNVPROC)nelglGetProcAddress("wglFreeMemoryNV")))return false;
+00420 #endif
+00421 
+00422         // Get fence adress.
+00423         if(!(nglDeleteFencesNV= (NEL_PFNGLDELETEFENCESNVPROC)nelglGetProcAddress("glDeleteFencesNV")))return false;
+00424         if(!(nglGenFencesNV= (NEL_PFNGLGENFENCESNVPROC)nelglGetProcAddress("glGenFencesNV")))return false;
+00425         if(!(nglIsFenceNV= (NEL_PFNGLISFENCENVPROC)nelglGetProcAddress("glIsFenceNV")))return false;
+00426         if(!(nglTestFenceNV= (NEL_PFNGLTESTFENCENVPROC)nelglGetProcAddress("glTestFenceNV")))return false;
+00427         if(!(nglGetFenceivNV= (NEL_PFNGLGETFENCEIVNVPROC)nelglGetProcAddress("glGetFenceivNV")))return false;
+00428         if(!(nglFinishFenceNV= (NEL_PFNGLFINISHFENCENVPROC)nelglGetProcAddress("glFinishFenceNV")))return false;
+00429         if(!(nglSetFenceNV= (NEL_PFNGLSETFENCENVPROC)nelglGetProcAddress("glSetFenceNV")))return false;
+00430 
+00431 
+00432         return true;
+00433 }
+00434 
+00435 
+00436 // *********************************
+00437 static bool     setupEXTTextureCompressionS3TC(const char       *glext)
+00438 {
+00439         if(strstr(glext, "GL_EXT_texture_compression_s3tc")==NULL)
+00440                 return false;
+00441 
+00442         return true;
+00443 }
+00444 
+00445 
+00446 // *********************************
+00447 static bool     setupEXTVertexWeighting(const char      *glext)
+00448 {
+00449         if(strstr (glext, "GL_EXT_vertex_weighting")==NULL)
+00450                 return false;
+00451 
+00452 
+00453         if(!(nglVertexWeightfEXT=(NEL_PFNGLVERTEXWEIGHTFEXTPROC)nelglGetProcAddress("glVertexWeightfEXT")))return false;
+00454         if(!(nglVertexWeightfvEXT=(NEL_PFNGLVERTEXWEIGHTFVEXTPROC)nelglGetProcAddress("glVertexWeightfvEXT")))return false;
+00455         if(!(nglVertexWeightPointerEXT=(NEL_PFNGLVERTEXWEIGHTPOINTEREXTPROC)nelglGetProcAddress("glVertexWeightPointerEXT")))return false;
+00456 
+00457         return true;
+00458 }
+00459 
+00460 
+00461 // *********************************
+00462 static bool     setupEXTSeparateSpecularColor(const char        *glext)
+00463 {
+00464         if(strstr(glext, "GL_EXT_separate_specular_color")==NULL)
+00465                 return false;
+00466 
+00467         return true;
+00468 }
+00469 
+00470 
+00471 // *********************************
+00472 static bool     setupNVTextureEnvCombine4(const char    *glext)
+00473 {
+00474         if(strstr(glext, "GL_NV_texture_env_combine4")==NULL)
+00475                 return false;
+00476 
+00477         return true;
+00478 }
+00479 
+00480 // *********************************
+00481 static bool     setupATIXTextureEnvCombine3(const char  *glext)
+00482 {
+00483         if(strstr(glext, "GL_ATIX_texture_env_combine3")==NULL)
+00484                 return false;
+00485 
+00486         return true;
+00487 }
+00488 
+00489 // *********************************
+00490 static bool     setupATIEnvMapBumpMap(const char        *glext)
+00491 {
+00492         if(strstr(glext, "GL_ATI_envmap_bumpmap")==NULL)
+00493                 return false;
+00494         if (!(nglTexBumpParameterivATI = (PFNGLTEXBUMPPARAMETERIVATIPROC) nelglGetProcAddress("glTexBumpParameterivATI"))) return false;
+00495         if (!(nglTexBumpParameterfvATI = (PFNGLTEXBUMPPARAMETERFVATIPROC) nelglGetProcAddress("glTexBumpParameterfvATI"))) return false;
+00496         if (!(nglGetTexBumpParameterivATI = (PFNGLGETTEXBUMPPARAMETERIVATIPROC) nelglGetProcAddress("glGetTexBumpParameterivATI"))) return false;
+00497         if (!(nglGetTexBumpParameterfvATI = (PFNGLGETTEXBUMPPARAMETERFVATIPROC) nelglGetProcAddress("glGetTexBumpParameterfvATI"))) return false;               
+00498 
+00499         return true;
+00500 }
+00501 
+00502 // *********************************
+00503 static bool     setupARBTextureCubeMap(const char       *glext)
+00504 {
+00505         if(strstr(glext, "GL_ARB_texture_cube_map")==NULL)
+00506                 return false;
+00507 
+00508         return true;
+00509 }
+00510 
+00511 
+00512 // *********************************
+00513 static bool     setupNVVertexProgram(const char *glext)
+00514 {       
+00515         if(strstr(glext, "GL_NV_vertex_program")==NULL)
+00516                 return false;
+00517 
+00518 
+00519         if(!(nglAreProgramsResidentNV= (NEL_PFNGLAREPROGRAMSRESIDENTNVPROC)nelglGetProcAddress("glAreProgramsResidentNV"))) return false;
+00520         if(!(nglBindProgramNV= (NEL_PFNGLBINDPROGRAMNVPROC)nelglGetProcAddress("glBindProgramNV"))) return false;
+00521         if(!(nglDeleteProgramsNV= (NEL_PFNGLDELETEPROGRAMSNVPROC)nelglGetProcAddress("glDeleteProgramsNV"))) return false;
+00522         if(!(nglExecuteProgramNV= (NEL_PFNGLEXECUTEPROGRAMNVPROC)nelglGetProcAddress("glExecuteProgramNV"))) return false;
+00523         if(!(nglGenProgramsNV= (NEL_PFNGLGENPROGRAMSNVPROC)nelglGetProcAddress("glGenProgramsNV"))) return false;
+00524         if(!(nglGetProgramParameterdvNV= (NEL_PFNGLGETPROGRAMPARAMETERDVNVPROC)nelglGetProcAddress("glGetProgramParameterdvNV"))) return false;
+00525         if(!(nglGetProgramParameterfvNV= (NEL_PFNGLGETPROGRAMPARAMETERFVNVPROC)nelglGetProcAddress("glGetProgramParameterfvNV"))) return false;
+00526         if(!(nglGetProgramivNV= (NEL_PFNGLGETPROGRAMIVNVPROC)nelglGetProcAddress("glGetProgramivNV"))) return false;
+00527         if(!(nglGetProgramStringNV= (NEL_PFNGLGETPROGRAMSTRINGNVPROC)nelglGetProcAddress("glGetProgramStringNV"))) return false;
+00528         if(!(nglGetTrackMatrixivNV= (NEL_PFNGLGETTRACKMATRIXIVNVPROC)nelglGetProcAddress("glGetTrackMatrixivNV"))) return false;
+00529         if(!(nglGetVertexAttribdvNV= (NEL_PFNGLGETVERTEXATTRIBDVNVPROC)nelglGetProcAddress("glGetVertexAttribdvNV"))) return false;
+00530         if(!(nglGetVertexAttribfvNV= (NEL_PFNGLGETVERTEXATTRIBFVNVPROC)nelglGetProcAddress("glGetVertexAttribfvNV"))) return false;
+00531         if(!(nglGetVertexAttribivNV= (NEL_PFNGLGETVERTEXATTRIBIVNVPROC)nelglGetProcAddress("glGetVertexAttribivNV"))) return false;
+00532         if(!(nglGetVertexAttribPointervNV= (NEL_PFNGLGETVERTEXATTRIBPOINTERVNVPROC)nelglGetProcAddress("glGetVertexAttribPointervNV"))) return false;
+00533         if(!(nglIsProgramNV= (NEL_PFNGLISPROGRAMNVPROC)nelglGetProcAddress("glIsProgramNV"))) return false;
+00534         if(!(nglLoadProgramNV= (NEL_PFNGLLOADPROGRAMNVPROC)nelglGetProcAddress("glLoadProgramNV"))) return false;
+00535         if(!(nglProgramParameter4dNV= (NEL_PFNGLPROGRAMPARAMETER4DNVPROC)nelglGetProcAddress("glProgramParameter4dNV"))) return false;
+00536         if(!(nglProgramParameter4dvNV= (NEL_PFNGLPROGRAMPARAMETER4DVNVPROC)nelglGetProcAddress("glProgramParameter4dvNV"))) return false;
+00537         if(!(nglProgramParameter4fNV= (NEL_PFNGLPROGRAMPARAMETER4FNVPROC)nelglGetProcAddress("glProgramParameter4fNV"))) return false;
+00538         if(!(nglProgramParameter4fvNV= (NEL_PFNGLPROGRAMPARAMETER4FVNVPROC)nelglGetProcAddress("glProgramParameter4fvNV"))) return false;
+00539         if(!(nglProgramParameters4dvNV= (NEL_PFNGLPROGRAMPARAMETERS4DVNVPROC)nelglGetProcAddress("glProgramParameters4dvNV"))) return false;
+00540         if(!(nglProgramParameters4fvNV= (NEL_PFNGLPROGRAMPARAMETERS4FVNVPROC)nelglGetProcAddress("glProgramParameters4fvNV"))) return false;
+00541         if(!(nglRequestResidentProgramsNV= (NEL_PFNGLREQUESTRESIDENTPROGRAMSNVPROC)nelglGetProcAddress("glRequestResidentProgramsNV"))) return false;
+00542         if(!(nglTrackMatrixNV= (NEL_PFNGLTRACKMATRIXNVPROC)nelglGetProcAddress("glTrackMatrixNV"))) return false;
+00543         if(!(nglVertexAttribPointerNV= (NEL_PFNGLVERTEXATTRIBPOINTERNVPROC)nelglGetProcAddress("glVertexAttribPointerNV"))) return false;
+00544         if(!(nglVertexAttrib1dNV= (NEL_PFNGLVERTEXATTRIB1DNVPROC)nelglGetProcAddress("glVertexAttrib1dNV"))) return false;
+00545         if(!(nglVertexAttrib1dvNV= (NEL_PFNGLVERTEXATTRIB1DVNVPROC)nelglGetProcAddress("glVertexAttrib1dvNV"))) return false;
+00546         if(!(nglVertexAttrib1fNV= (NEL_PFNGLVERTEXATTRIB1FNVPROC)nelglGetProcAddress("glVertexAttrib1fNV"))) return false;
+00547         if(!(nglVertexAttrib1fvNV= (NEL_PFNGLVERTEXATTRIB1FVNVPROC)nelglGetProcAddress("glVertexAttrib1fvNV"))) return false;
+00548         if(!(nglVertexAttrib1sNV= (NEL_PFNGLVERTEXATTRIB1SNVPROC)nelglGetProcAddress("glVertexAttrib1sNV"))) return false;
+00549         if(!(nglVertexAttrib1svNV= (NEL_PFNGLVERTEXATTRIB1SVNVPROC)nelglGetProcAddress("glVertexAttrib1svNV"))) return false;
+00550         if(!(nglVertexAttrib2dNV= (NEL_PFNGLVERTEXATTRIB2DNVPROC)nelglGetProcAddress("glVertexAttrib2dNV"))) return false;
+00551         if(!(nglVertexAttrib2dvNV= (NEL_PFNGLVERTEXATTRIB2DVNVPROC)nelglGetProcAddress("glVertexAttrib2dvNV"))) return false;
+00552         if(!(nglVertexAttrib2fNV= (NEL_PFNGLVERTEXATTRIB2FNVPROC)nelglGetProcAddress("glVertexAttrib2fNV"))) return false;
+00553         if(!(nglVertexAttrib2fvNV= (NEL_PFNGLVERTEXATTRIB2FVNVPROC)nelglGetProcAddress("glVertexAttrib2fvNV"))) return false;
+00554         if(!(nglVertexAttrib2sNV= (NEL_PFNGLVERTEXATTRIB2SNVPROC)nelglGetProcAddress("glVertexAttrib2sNV"))) return false;
+00555         if(!(nglVertexAttrib2svNV= (NEL_PFNGLVERTEXATTRIB2SVNVPROC)nelglGetProcAddress("glVertexAttrib2svNV"))) return false;
+00556         if(!(nglVertexAttrib3dNV= (NEL_PFNGLVERTEXATTRIB3DNVPROC)nelglGetProcAddress("glVertexAttrib3dNV"))) return false;
+00557         if(!(nglVertexAttrib3dvNV= (NEL_PFNGLVERTEXATTRIB3DVNVPROC)nelglGetProcAddress("glVertexAttrib3dvNV"))) return false;
+00558         if(!(nglVertexAttrib3fNV= (NEL_PFNGLVERTEXATTRIB3FNVPROC)nelglGetProcAddress("glVertexAttrib3fNV"))) return false;
+00559         if(!(nglVertexAttrib3fvNV= (NEL_PFNGLVERTEXATTRIB3FVNVPROC)nelglGetProcAddress("glVertexAttrib3fvNV"))) return false;
+00560         if(!(nglVertexAttrib3sNV= (NEL_PFNGLVERTEXATTRIB3SNVPROC)nelglGetProcAddress("glVertexAttrib3sNV"))) return false;
+00561         if(!(nglVertexAttrib3svNV= (NEL_PFNGLVERTEXATTRIB3SVNVPROC)nelglGetProcAddress("glVertexAttrib3svNV"))) return false;
+00562         if(!(nglVertexAttrib4dNV= (NEL_PFNGLVERTEXATTRIB4DNVPROC)nelglGetProcAddress("glVertexAttrib4dNV"))) return false;
+00563         if(!(nglVertexAttrib4dvNV= (NEL_PFNGLVERTEXATTRIB4DVNVPROC)nelglGetProcAddress("glVertexAttrib4dvNV"))) return false;
+00564         if(!(nglVertexAttrib4fNV= (NEL_PFNGLVERTEXATTRIB4FNVPROC)nelglGetProcAddress("glVertexAttrib4fNV"))) return false;
+00565         if(!(nglVertexAttrib4fvNV= (NEL_PFNGLVERTEXATTRIB4FVNVPROC)nelglGetProcAddress("glVertexAttrib4fvNV"))) return false;
+00566         if(!(nglVertexAttrib4sNV= (NEL_PFNGLVERTEXATTRIB4SNVPROC)nelglGetProcAddress("glVertexAttrib4sNV"))) return false;
+00567         if(!(nglVertexAttrib4svNV= (NEL_PFNGLVERTEXATTRIB4SVNVPROC)nelglGetProcAddress("glVertexAttrib4svNV"))) return false;
+00568         if(!(nglVertexAttrib4ubvNV= (NEL_PFNGLVERTEXATTRIB4UBVNVPROC)nelglGetProcAddress("glVertexAttrib4ubvNV"))) return false;
+00569         if(!(nglVertexAttribs1dvNV= (NEL_PFNGLVERTEXATTRIBS1DVNVPROC)nelglGetProcAddress("glVertexAttribs1dvNV"))) return false;
+00570         if(!(nglVertexAttribs1fvNV= (NEL_PFNGLVERTEXATTRIBS1FVNVPROC)nelglGetProcAddress("glVertexAttribs1fvNV"))) return false;
+00571         if(!(nglVertexAttribs1svNV= (NEL_PFNGLVERTEXATTRIBS1SVNVPROC)nelglGetProcAddress("glVertexAttribs1svNV"))) return false;
+00572         if(!(nglVertexAttribs2dvNV= (NEL_PFNGLVERTEXATTRIBS2DVNVPROC)nelglGetProcAddress("glVertexAttribs2dvNV"))) return false;
+00573         if(!(nglVertexAttribs2fvNV= (NEL_PFNGLVERTEXATTRIBS2FVNVPROC)nelglGetProcAddress("glVertexAttribs2fvNV"))) return false;
+00574         if(!(nglVertexAttribs2svNV= (NEL_PFNGLVERTEXATTRIBS2SVNVPROC)nelglGetProcAddress("glVertexAttribs2svNV"))) return false;
+00575         if(!(nglVertexAttribs3dvNV= (NEL_PFNGLVERTEXATTRIBS3DVNVPROC)nelglGetProcAddress("glVertexAttribs3dvNV"))) return false;
+00576         if(!(nglVertexAttribs3fvNV= (NEL_PFNGLVERTEXATTRIBS3FVNVPROC)nelglGetProcAddress("glVertexAttribs3fvNV"))) return false;
+00577         if(!(nglVertexAttribs3svNV= (NEL_PFNGLVERTEXATTRIBS3SVNVPROC)nelglGetProcAddress("glVertexAttribs3svNV"))) return false;
+00578         if(!(nglVertexAttribs4dvNV= (NEL_PFNGLVERTEXATTRIBS4DVNVPROC)nelglGetProcAddress("glVertexAttribs4dvNV"))) return false;
+00579         if(!(nglVertexAttribs4fvNV= (NEL_PFNGLVERTEXATTRIBS4FVNVPROC)nelglGetProcAddress("glVertexAttribs4fvNV"))) return false;
+00580         if(!(nglVertexAttribs4svNV= (NEL_PFNGLVERTEXATTRIBS4SVNVPROC)nelglGetProcAddress("glVertexAttribs4svNV"))) return false;
+00581         if(!(nglVertexAttribs4ubvNV= (NEL_PFNGLVERTEXATTRIBS4UBVNVPROC)nelglGetProcAddress("glVertexAttribs4ubvNV"))) return false;
+00582 
+00583 
+00584         return true;
+00585 }
+00586 
+00587 // *********************************
+00588 static bool     setupEXTVertexShader(const char *glext)
+00589 {                                       
+00590         if(strstr(glext, "GL_EXT_vertex_shader")==NULL)
+00591                 return false;
+00592         if (!(nglBeginVertexShaderEXT = (NEL_PFNGLBEGINVERTEXSHADEREXTPROC)nelglGetProcAddress("glBeginVertexShaderEXT"))) return false;
+00593         if (!(nglEndVertexShaderEXT = (NEL_PFNGLENDVERTEXSHADEREXTPROC)nelglGetProcAddress("glEndVertexShaderEXT"))) return false;
+00594         if (!(nglBindVertexShaderEXT = (NEL_PFNGLBINDVERTEXSHADEREXTPROC)nelglGetProcAddress("glBindVertexShaderEXT"))) return false;
+00595         if (!(nglGenVertexShadersEXT = (NEL_PFNGLGENVERTEXSHADERSEXTPROC)nelglGetProcAddress("glGenVertexShadersEXT"))) return false;
+00596         if (!(nglDeleteVertexShaderEXT = (NEL_PFNGLDELETEVERTEXSHADEREXTPROC)nelglGetProcAddress("glDeleteVertexShaderEXT"))) return false;
+00597         if (!(nglShaderOp1EXT = (NEL_PFNGLSHADEROP1EXTPROC)nelglGetProcAddress("glShaderOp1EXT"))) return false;
+00598         if (!(nglShaderOp2EXT = (NEL_PFNGLSHADEROP2EXTPROC)nelglGetProcAddress("glShaderOp2EXT"))) return false;
+00599         if (!(nglShaderOp3EXT = (NEL_PFNGLSHADEROP3EXTPROC)nelglGetProcAddress("glShaderOp3EXT"))) return false;
+00600         if (!(nglSwizzleEXT = (NEL_PFNGLSWIZZLEEXTPROC)nelglGetProcAddress("glSwizzleEXT"))) return false;
+00601         if (!(nglWriteMaskEXT = (NEL_PFNGLWRITEMASKEXTPROC)nelglGetProcAddress("glWriteMaskEXT"))) return false;
+00602         if (!(nglInsertComponentEXT = (NEL_PFNGLINSERTCOMPONENTEXTPROC)nelglGetProcAddress("glInsertComponentEXT"))) return false;
+00603         if (!(nglExtractComponentEXT = (NEL_PFNGLEXTRACTCOMPONENTEXTPROC)nelglGetProcAddress("glExtractComponentEXT"))) return false;
+00604         if (!(nglGenSymbolsEXT = (NEL_PFNGLGENSYMBOLSEXTPROC)nelglGetProcAddress("glGenSymbolsEXT"))) return false;
+00605         if (!(nglSetInvariantEXT = (NEL_PFNGLSETINVARIANTEXTPROC)nelglGetProcAddress("glSetInvariantEXT"))) return false;
+00606         if (!(nglSetLocalConstantEXT = (NEL_PFNGLSETLOCALCONSTANTEXTPROC)nelglGetProcAddress("glSetLocalConstantEXT"))) return false;
+00607         if (!(nglVariantPointerEXT = (NEL_PFNGLVARIANTPOINTEREXTPROC)nelglGetProcAddress("glVariantPointerEXT"))) return false;
+00608         if (!(nglEnableVariantClientStateEXT = (NEL_PFNGLENABLEVARIANTCLIENTSTATEEXTPROC)nelglGetProcAddress("glEnableVariantClientStateEXT"))) return false;
+00609         if (!(nglDisableVariantClientStateEXT = (NEL_PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC)nelglGetProcAddress("glDisableVariantClientStateEXT"))) return false;
+00610         if (!(nglBindLightParameterEXT = (NEL_PFNGLBINDLIGHTPARAMETEREXTPROC)nelglGetProcAddress("glBindLightParameterEXT"))) return false;
+00611         if (!(nglBindMaterialParameterEXT = (NEL_PFNGLBINDMATERIALPARAMETEREXTPROC)nelglGetProcAddress("glBindMaterialParameterEXT"))) return false;
+00612         if (!(nglBindTexGenParameterEXT = (NEL_PFNGLBINDTEXGENPARAMETEREXTPROC)nelglGetProcAddress("glBindTexGenParameterEXT"))) return false;
+00613         if (!(nglBindTextureUnitParameterEXT = (NEL_PFNGLBINDTEXTUREUNITPARAMETEREXTPROC)nelglGetProcAddress("glBindTextureUnitParameterEXT"))) return false;
+00614         if (!(nglBindParameterEXT = (NEL_PFNGLBINDPARAMETEREXTPROC)nelglGetProcAddress("glBindParameterEXT"))) return false;
+00615         if (!(nglIsVariantEnabledEXT = (NEL_PFNGLISVARIANTENABLEDEXTPROC)nelglGetProcAddress("glIsVariantEnabledEXT"))) return false;
+00616         if (!(nglGetVariantBooleanvEXT = (NEL_PFNGLGETVARIANTBOOLEANVEXTPROC)nelglGetProcAddress("glGetVariantBooleanvEXT"))) return false;
+00617         if (!(nglGetVariantIntegervEXT = (NEL_PFNGLGETVARIANTINTEGERVEXTPROC)nelglGetProcAddress("glGetVariantIntegervEXT"))) return false;
+00618         if (!(nglGetVariantFloatvEXT = (NEL_PFNGLGETVARIANTFLOATVEXTPROC)nelglGetProcAddress("glGetVariantFloatvEXT"))) return false;
+00619         if (!(nglGetVariantPointervEXT = (NEL_PFNGLGETVARIANTPOINTERVEXTPROC)nelglGetProcAddress("glGetVariantPointervEXT"))) return false;
+00620         if (!(nglGetInvariantBooleanvEXT = (NEL_PFNGLGETINVARIANTBOOLEANVEXTPROC)nelglGetProcAddress("glGetInvariantBooleanvEXT"))) return false;
+00621         if (!(nglGetInvariantIntegervEXT = (NEL_PFNGLGETINVARIANTINTEGERVEXTPROC)nelglGetProcAddress("glGetInvariantIntegervEXT"))) return false;
+00622         if (!(nglGetInvariantFloatvEXT = (NEL_PFNGLGETINVARIANTFLOATVEXTPROC)nelglGetProcAddress("glGetInvariantFloatvEXT"))) return false;
+00623         if (!(nglGetLocalConstantBooleanvEXT = (NEL_PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC)nelglGetProcAddress("glGetLocalConstantBooleanvEXT"))) return false;
+00624         if (!(nglGetLocalConstantIntegervEXT = (NEL_PFNGLGETLOCALCONSTANTINTEGERVEXTPROC)nelglGetProcAddress("glGetLocalConstantIntegervEXT"))) return false;
+00625         if (!(nglGetLocalConstantFloatvEXT = (NEL_PFNGLGETLOCALCONSTANTFLOATVEXTPROC)nelglGetProcAddress("glGetLocalConstantFloatvEXT"))) return false;
+00626 
+00627         // we require at least 128 instructions, 15 local register (r0, r1,..,r11) + 3 temporary vector for swizzle emulation + 1 vector for indexing temp + 3 temporary scalar for LOGG, EXPP and LIT emulation,  1 address register
+00628         // we require 11 variants (4 textures + position + normal + primary color + secondary color + weight + palette skin + fog)
+00629         // we also require 2 local constants (0 and 1)
+00630         // 96 invariants (c[0], c[1] ..) + 1 invariants for fog emulation (fog coordinate must range from 0 to 1 with EXT_VERTEX_shader)
+00631         GLint numVSInst;
+00632         glGetIntegerv(GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT, &numVSInst);
+00633         if (numVSInst < 128) return false;
+00634         //
+00635         GLint numVSLocals;
+00636         glGetIntegerv(GL_MAX_VERTEX_SHADER_LOCALS_EXT, &numVSLocals);
+00637         if (numVSLocals < 4 * (12 + 4) + 1 + 3) return false;   
+00638         //
+00639         GLint numVSLocalConstants;
+00640         glGetIntegerv(GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT, &numVSLocalConstants);
+00641         if (numVSLocalConstants < 2) return false;      
+00642         //
+00643         GLint numVSInvariants;
+00644         glGetIntegerv(GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT, &numVSInvariants);
+00645         if (numVSInvariants < 96 + 1) return false;
+00646         //      
+00647         return true;
+00648         
+00649 }
+00650 
+00651 
+00652 
+00653 // *********************************
+00654 static bool     setupEXTSecondaryColor(const char       *glext)
+00655 {
+00656         if(strstr(glext, "GL_EXT_secondary_color")==NULL)
+00657                 return false;
+00658 
+00659 
+00660         if(!(nglSecondaryColor3bEXT= (NEL_PFNGLSECONDARYCOLOR3BEXTPROC)nelglGetProcAddress("glSecondaryColor3bEXT"))) return false;
+00661         if(!(nglSecondaryColor3bvEXT= (NEL_PFNGLSECONDARYCOLOR3BVEXTPROC)nelglGetProcAddress("glSecondaryColor3bvEXT"))) return false;
+00662         if(!(nglSecondaryColor3dEXT= (NEL_PFNGLSECONDARYCOLOR3DEXTPROC)nelglGetProcAddress("glSecondaryColor3dEXT"))) return false;
+00663         if(!(nglSecondaryColor3dvEXT= (NEL_PFNGLSECONDARYCOLOR3DVEXTPROC)nelglGetProcAddress("glSecondaryColor3dvEXT"))) return false;
+00664         if(!(nglSecondaryColor3fEXT= (NEL_PFNGLSECONDARYCOLOR3FEXTPROC)nelglGetProcAddress("glSecondaryColor3fEXT"))) return false;
+00665         if(!(nglSecondaryColor3fvEXT= (NEL_PFNGLSECONDARYCOLOR3FVEXTPROC)nelglGetProcAddress("glSecondaryColor3fvEXT"))) return false;
+00666         if(!(nglSecondaryColor3iEXT= (NEL_PFNGLSECONDARYCOLOR3IEXTPROC)nelglGetProcAddress("glSecondaryColor3iEXT"))) return false;
+00667         if(!(nglSecondaryColor3ivEXT= (NEL_PFNGLSECONDARYCOLOR3IVEXTPROC)nelglGetProcAddress("glSecondaryColor3ivEXT"))) return false;
+00668         if(!(nglSecondaryColor3sEXT= (NEL_PFNGLSECONDARYCOLOR3SEXTPROC)nelglGetProcAddress("glSecondaryColor3sEXT"))) return false;
+00669         if(!(nglSecondaryColor3svEXT= (NEL_PFNGLSECONDARYCOLOR3SVEXTPROC)nelglGetProcAddress("glSecondaryColor3svEXT"))) return false;
+00670         if(!(nglSecondaryColor3ubEXT= (NEL_PFNGLSECONDARYCOLOR3UBEXTPROC)nelglGetProcAddress("glSecondaryColor3ubEXT"))) return false;
+00671         if(!(nglSecondaryColor3ubvEXT= (NEL_PFNGLSECONDARYCOLOR3UBVEXTPROC)nelglGetProcAddress("glSecondaryColor3ubvEXT"))) return false;
+00672         if(!(nglSecondaryColor3uiEXT= (NEL_PFNGLSECONDARYCOLOR3UIEXTPROC)nelglGetProcAddress("glSecondaryColor3uiEXT"))) return false;
+00673         if(!(nglSecondaryColor3uivEXT= (NEL_PFNGLSECONDARYCOLOR3UIVEXTPROC)nelglGetProcAddress("glSecondaryColor3uivEXT"))) return false;
+00674         if(!(nglSecondaryColor3usEXT= (NEL_PFNGLSECONDARYCOLOR3USEXTPROC)nelglGetProcAddress("glSecondaryColor3usEXT"))) return false;
+00675         if(!(nglSecondaryColor3usvEXT= (NEL_PFNGLSECONDARYCOLOR3USVEXTPROC)nelglGetProcAddress("glSecondaryColor3usvEXT"))) return false;
+00676         if(!(nglSecondaryColorPointerEXT= (NEL_PFNGLSECONDARYCOLORPOINTEREXTPROC)nelglGetProcAddress("glSecondaryColorPointerEXT"))) return false;
+00677 
+00678 
+00679         return true;
+00680 }
+00681 
+00682 // *********************************
+00683 static bool     setupWGLARBPBuffer(const char   *glext)
+00684 {
+00685         if(strstr(glext, "WGL_ARB_pbuffer")==NULL)
+00686                 return false;
+00687 
+00688 #ifdef NL_OS_WINDOWS
+00689         if(!(wglCreatePbufferARB= (PFNWGLCREATEPBUFFERARBPROC)nelglGetProcAddress("wglCreatePbufferARB"))) return false;
+00690         if(!(wglGetPbufferDCARB= (PFNWGLGETPUFFERDCARBPROC)nelglGetProcAddress("wglGetPbufferDCARB"))) return false;
+00691         if(!(wglReleasePbufferDCARB= (PFNWGLRELEASEPUFFERDCARBPROC)nelglGetProcAddress("wglReleasePbufferDCARB"))) return false;
+00692         if(!(wglDestroyPbufferARB= (PFNWGLDESTROYPUFFERARBPROC)nelglGetProcAddress("wglDestroyPbufferARB"))) return false;
+00693         if(!(wglQueryPbufferARB= (PFNWGLQUERYPBUFFERARBPROC)nelglGetProcAddress("wglQueryPbufferARB"))) return false;
+00694 #endif
+00695 
+00696         return true;
+00697 }
+00698 
+00699 #ifdef NL_OS_WINDOWS
+00700 // *********************************
+00701 static bool     setupWGLARBPixelFormat (const char      *glext)
+00702 {
+00703         if(strstr(glext, "WGL_ARB_pixel_format")==NULL)
+00704                 return false;
+00705 
+00706         if(!(wglGetPixelFormatAttribivARB= (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)nelglGetProcAddress("wglGetPixelFormatAttribivARB"))) return false;
+00707         if(!(wglGetPixelFormatAttribfvARB= (PFNWGLGETPIXELFORMATATTRIBFVARBPROC)nelglGetProcAddress("wglGetPixelFormatAttribfvARB"))) return false;
+00708         if(!(wglChoosePixelFormatARB= (PFNWGLCHOOSEPIXELFORMATARBPROC)nelglGetProcAddress("wglChoosePixelFormatARB"))) return false;
+00709 
+00710         return true;
+00711 }
+00712 #endif
+00713 
+00714 // *********************************
+00715 static bool     setupNVTextureShader(const char *glext)
+00716 {
+00717         if(strstr(glext, "GL_NV_texture_shader")==NULL)
+00718                 return false;
+00719 
+00720         return true;
+00721 }
+00722 
+00723 
+00724 // *********************************
+00725 static bool     setupEXTBlendColor(const char   *glext)
+00726 {
+00727         if(strstr(glext, "GL_EXT_blend_color")==NULL)
+00728                 return false;
+00729 
+00730         if(!(nglBlendColorEXT= (NEL_PFNGLBLENDCOLOREXTPROC)nelglGetProcAddress("glBlendColorEXT"))) return false;
+00731 
+00732         return true;
+00733 }
+00734 
+00735 
+00736 // *********************************
+00737 static bool     setupNVVertexArrayRange2(const char     *glext)
+00738 {
+00739         if(strstr(glext, "GL_NV_vertex_array_range2")==NULL)
+00740                 return false;
+00741 
+00742         return true;
+00743 }
+00744 
+00745 
+00746 // *********************************
+00747 static bool     setupATIVertexArrayObject(const char *glext)
+00748 {
+00749         if(strstr(glext, "GL_ATI_vertex_array_object")==NULL)
+00750                 return false;
+00751 
+00752         if(!(nglBlendColorEXT= (NEL_PFNGLBLENDCOLOREXTPROC)nelglGetProcAddress("glBlendColorEXT"))) return false;
+00753         if(!(nglNewObjectBufferATI= (NEL_PFNGLNEWOBJECTBUFFERATIPROC)nelglGetProcAddress("glNewObjectBufferATI"))) return false;
+00754         if(!(nglIsObjectBufferATI= (NEL_PFNGLISOBJECTBUFFERATIPROC)nelglGetProcAddress("glIsObjectBufferATI"))) return false;
+00755         if(!(nglUpdateObjectBufferATI= (NEL_PFNGLUPDATEOBJECTBUFFERATIPROC)nelglGetProcAddress("glUpdateObjectBufferATI"))) return false;
+00756         if(!(nglGetObjectBufferfvATI= (NEL_PFNGLGETOBJECTBUFFERFVATIPROC)nelglGetProcAddress("glGetObjectBufferfvATI"))) return false;
+00757         if(!(nglGetObjectBufferivATI= (NEL_PFNGLGETOBJECTBUFFERIVATIPROC)nelglGetProcAddress("glGetObjectBufferivATI"))) return false;
+00758         if(!(nglDeleteObjectBufferATI= (NEL_PFNGLDELETEOBJECTBUFFERATIPROC)nelglGetProcAddress("glDeleteObjectBufferATI"))) return false;
+00759         if(!(nglArrayObjectATI= (NEL_PFNGLARRAYOBJECTATIPROC)nelglGetProcAddress("glArrayObjectATI"))) return false;
+00760         if(!(nglGetArrayObjectfvATI= (NEL_PFNGLGETARRAYOBJECTFVATIPROC)nelglGetProcAddress("glGetArrayObjectfvATI"))) return false;
+00761         if(!(nglGetArrayObjectivATI= (NEL_PFNGLGETARRAYOBJECTIVATIPROC)nelglGetProcAddress("glGetArrayObjectivATI"))) return false;
+00762         if(!(nglVariantArrayObjectATI= (NEL_PFNGLVARIANTARRAYOBJECTATIPROC)nelglGetProcAddress("glVariantArrayObjectATI"))) return false;
+00763         if(!(nglGetVariantArrayObjectfvATI= (NEL_PFNGLGETVARIANTARRAYOBJECTFVATIPROC)nelglGetProcAddress("glGetVariantArrayObjectfvATI"))) return false;
+00764         if(!(nglGetVariantArrayObjectivATI= (NEL_PFNGLGETVARIANTARRAYOBJECTIVATIPROC)nelglGetProcAddress("glGetVariantArrayObjectivATI"))) return false;
+00765 
+00766         return true;
+00767 }
+00768 
+00769 
+00770 
+00771 // ***************************************************************************
+00772 // Extension Check.
+00773 void    registerGlExtensions(CGlExtensions &ext)
+00774 {
+00775         // OpenGL 1.2 ??
+00776         const char      *glVersion= (const char *) glGetString (GL_VERSION);
+00777         sint    a=0, b=0;
+00778         // 1.2***  ???
+00779         sscanf(glVersion, "%d.%d", &a, &b);
+00780         ext.Version1_2= a>=1 && b>=2;
+00781 
+00782 
+00783         // Extensions.
+00784         const char      *glext= (const char*)glGetString(GL_EXTENSIONS);
+00785         GLint   ntext;
+00786 
+00787         nldebug("GLExt: %s", glext);
+00788 
+00789 
+00790         // Check ARBMultiTexture
+00791         ext.ARBMultiTexture= setupARBMultiTexture(glext);
+00792         if(ext.ARBMultiTexture)
+00793         {
+00794                 glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &ntext);
+00795                 // We could have more than IDRV_MAT_MAXTEXTURES but the interface only 
+00796                 // support IDRV_MAT_MAXTEXTURES texture stages so take min
+00797                 ext.NbTextureStages= (ntext<((GLint)IDRV_MAT_MAXTEXTURES)?ntext:IDRV_MAT_MAXTEXTURES);
+00798         }
+00799 
+00800         // Check EXTTextureEnvCombine
+00801         ext.EXTTextureEnvCombine= setupEXTTextureEnvCombine(glext);
+00802 
+00803         // Check ARBTextureCompression
+00804         ext.ARBTextureCompression= setupARBTextureCompression(glext);
+00805 
+00806         // Check NVVertexArrayRange
+00807         // Disable feature ???
+00808         if(!ext.DisableHardwareVertexArrayAGP)
+00809                 ext.NVVertexArrayRange= setupNVVertexArrayRange(glext);
+00810         if(ext.NVVertexArrayRange)
+00811         {
+00812                 GLint   nverts;
+00813                 glGetIntegerv((GLenum)GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV, &nverts);
+00814                 ext.NVVertexArrayRangeMaxVertex= nverts;
+00815         }
+00816 
+00817         // Compression S3TC OK iff ARBTextureCompression.
+00818         ext.EXTTextureCompressionS3TC= (ext.ARBTextureCompression && setupEXTTextureCompressionS3TC(glext)); 
+00819 
+00820         // Check if NVidia GL_EXT_vertex_weighting is available.
+00821         ext.EXTVertexWeighting= setupEXTVertexWeighting(glext);
+00822 
+00823         // Check EXTSeparateSpecularColor.
+00824         ext.EXTSeparateSpecularColor= setupEXTSeparateSpecularColor(glext);
+00825 
+00826         // Check NVTextureEnvCombine4.
+00827         ext.NVTextureEnvCombine4= setupNVTextureEnvCombine4(glext);
+00828         
+00829 
+00830         // Check for cube mapping
+00831         ext.ARBTextureCubeMap = setupARBTextureCubeMap(glext);
+00832 
+00833         // Check vertex program
+00834         // Disable feature ???
+00835         if(!ext.DisableHardwareVertexProgram)
+00836         {       
+00837                 ext.NVVertexProgram = setupNVVertexProgram(glext);
+00838                 ext.EXTVertexShader = setupEXTVertexShader(glext);
+00839         }
+00840 
+00841 
+00842 
+00843         // Check texture shaders
+00844         // Disable feature ???
+00845         if(!ext.DisableHardwareTextureShader)
+00846                 ext.NVTextureShader = setupNVTextureShader(glext);
+00847 
+00848         // For now, the only way to know if emulation, is to test some extension which exist only on GeForce3.
+00849         // if GL_NV_texture_shader is not here, then we are not on GeForce3.
+00850         ext.NVVertexProgramEmulated= ext.NVVertexProgram && (strstr(glext, "GL_NV_texture_shader")==NULL);
+00851 
+00852         // Check EXTSecondaryColor
+00853         ext.EXTSecondaryColor= setupEXTSecondaryColor(glext);
+00854 
+00855         // Check EXTBlendColor
+00856         ext.EXTBlendColor= setupEXTBlendColor(glext);
+00857 
+00858         // Check NVVertexArrayRange2
+00859         ext.NVVertexArrayRange2= setupNVVertexArrayRange2(glext);
+00860         // if supported
+00861         if(ext.NVVertexArrayRange2)
+00862                 // VBHard swap without flush of the VAR.
+00863                 ext.NVStateVARWithoutFlush= GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV;
+00864         else
+00865                 // VBHard with unusefull flush of the VAR.
+00866                 ext.NVStateVARWithoutFlush= GL_VERTEX_ARRAY_RANGE_NV;
+00867 
+00868 
+00869         // ATI extensions
+00870         // -------------
+00871 
+00872         // Check ATIVertexArrayObject
+00873         // Disable feature ???
+00874         if(!ext.DisableHardwareVertexArrayAGP)
+00875                 ext.ATIVertexArrayObject= setupATIVertexArrayObject(glext);
+00876         // Check ATIXTextureEnvCombine3.
+00877         ext.ATIXTextureEnvCombine3= setupATIXTextureEnvCombine3(glext);
+00878         // Check ATIEnvMapBumpMap
+00879         ext.ATIEnvMapBumpMap = setupATIEnvMapBumpMap(glext);
+00880 }
+00881 
+00882 
+00883 #ifdef NL_OS_WINDOWS
+00884 // ***************************************************************************
+00885 void    registerWGlExtensions(CGlExtensions &ext, HDC hDC)
+00886 {
+00887         // Get proc adress
+00888         if(!(wglGetExtensionsStringARB=(PFNWGFGETEXTENSIONSSTRINGARB)nelglGetProcAddress("wglGetExtensionsStringARB")))
+00889         {
+00890                 nlwarning ("wglGetExtensionsStringARB not supported");
+00891                 return;
+00892         }
+00893 
+00894         // Get extension string
+00895         const char *glext = wglGetExtensionsStringARB (hDC);
+00896         if (glext == NULL)
+00897         {
+00898                 nlwarning ("wglGetExtensionsStringARB failed");
+00899                 return;
+00900         }
+00901 
+00902         nldebug("WGLExt: %s", glext);
+00903 
+00904         // Check for pbuffer
+00905         ext.WGLARBPBuffer= setupWGLARBPBuffer(glext);
+00906 
+00907         // Check for pixel format
+00908         ext.WGLARBPixelFormat= setupWGLARBPixelFormat(glext);
+00909 }
+00910 #endif // NL_OS_WINDOWS
+00911 
+00912 
+00913 }
+00914 
+00915 
+00916 
+00917 
+
+ + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1