source: OGRE/trunk/ogrenew/RenderSystems/GL/src/glew.cpp @ 692

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

adding ogre 1.2 and dependencies

Line 
1/*
2** The OpenGL Extension Wrangler Library
3** Copyright (C) 2002-2005, Milan Ikits <milan ikits[]ieee org>
4** Copyright (C) 2002-2005, Marcelo E. Magallon <mmagallo[]debian org>
5** Copyright (C) 2002, Lev Povalahev
6** All rights reserved.
7**
8** Redistribution and use in source and binary forms, with or without
9** modification, are permitted provided that the following conditions are met:
10**
11** * Redistributions of source code must retain the above copyright notice,
12**   this list of conditions and the following disclaimer.
13** * Redistributions in binary form must reproduce the above copyright notice,
14**   this list of conditions and the following disclaimer in the documentation
15**   and/or other materials provided with the distribution.
16** * The name of the author may be used to endorse or promote products
17**   derived from this software without specific prior written permission.
18**
19** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29** THE POSSIBILITY OF SUCH DAMAGE.
30*/
31
32#include <GL/glew.h>
33
34#if defined(_WIN32)
35#include <GL/wglew.h>
36#endif
37
38#include "OgreGLSupport.h"
39/*
40 * Define glewGetContext and related helper macros.
41 */
42#ifdef GLEW_MX
43#  define glewGetContext() ctx
44#  ifdef _WIN32
45#    define GLEW_CONTEXT_ARG_DEF_INIT GLEWContext* ctx
46#    define GLEW_CONTEXT_ARG_VAR_INIT ctx
47#    define wglewGetContext() ctx
48#    define WGLEW_CONTEXT_ARG_DEF_INIT WGLEWContext* ctx
49#    define WGLEW_CONTEXT_ARG_DEF_LIST WGLEWContext* ctx
50#  else /* _WIN32 */
51#    define GLEW_CONTEXT_ARG_DEF_INIT void
52#    define GLEW_CONTEXT_ARG_VAR_INIT
53#    define glxewGetContext() ctx
54#    define GLXEW_CONTEXT_ARG_DEF_INIT void
55#    define GLXEW_CONTEXT_ARG_DEF_LIST GLXEWContext* ctx
56#  endif /* _WIN32 */
57#  define GLEW_CONTEXT_ARG_DEF_LIST GLEWContext* ctx
58#else /* GLEW_MX */
59#  define GLEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport
60#  define GLEW_CONTEXT_ARG_VAR_INIT glSupport
61#  define GLEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport
62#  define WGLEW_CONTEXT_ARG_DEF_INIT Ogre::GLSupport *glSupport
63#  define WGLEW_CONTEXT_ARG_DEF_LIST Ogre::GLSupport *glSupport
64#  define GLXEW_CONTEXT_ARG_DEF_INIT void
65#  define GLXEW_CONTEXT_ARG_DEF_LIST void
66#endif /* GLEW_MX */
67
68/*
69 * GLEW, just like OpenGL or GLU, does not rely on the standard C library.
70 * These functions implement the functionality required in this file.
71 */
72
73static GLuint _glewStrLen (const GLubyte* s)
74{
75  GLuint i=0;
76  while (s+i != NULL && s[i] != '\0') i++;
77  return i;
78}
79
80static GLuint _glewStrCLen (const GLubyte* s, GLubyte c)
81{
82  GLuint i=0;
83  while (s+i != NULL && s[i] != '\0' && s[i] != c) i++;
84  return i;
85}
86
87static GLboolean _glewStrSame (const GLubyte* a, const GLubyte* b, GLuint n)
88{
89  GLuint i=0;
90  while (i < n && a+i != NULL && b+i != NULL && a[i] == b[i]) i++;
91  return i == n ? GL_TRUE : GL_FALSE;
92}
93
94static GLboolean _glewStrSame1 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
95{
96  while (*na > 0 && (**a == ' ' || **a == '\n' || **a == '\r' || **a == '\t'))
97  {
98    (*a)++;
99    (*na)--;
100  }
101  if(*na >= nb)
102  {
103    GLuint i=0;
104    while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
105        if(i == nb)
106        {
107                *a = *a + nb;
108                *na = *na - nb;
109                return GL_TRUE;
110        }
111  }
112  return GL_FALSE;
113}
114
115static GLboolean _glewStrSame2 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
116{
117  if(*na >= nb)
118  {
119    GLuint i=0;
120    while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
121        if(i == nb)
122        {
123                *a = *a + nb;
124                *na = *na - nb;
125                return GL_TRUE;
126        }
127  }
128  return GL_FALSE;
129}
130
131static GLboolean _glewStrSame3 (GLubyte** a, GLuint* na, const GLubyte* b, GLuint nb)
132{
133  if(*na >= nb)
134  {
135    GLuint i=0;
136    while (i < nb && (*a)+i != NULL && b+i != NULL && (*a)[i] == b[i]) i++;
137    if (i == nb && (*na == nb || (*a)[i] == ' ' || (*a)[i] == '\n' || (*a)[i] == '\r' || (*a)[i] == '\t'))
138    {
139      *a = *a + nb;
140      *na = *na - nb;
141      return GL_TRUE;
142    }
143  }
144  return GL_FALSE;
145}
146
147// Define procedure address
148#define glewGetProcAddress(name) glSupport->getProcAddress((const char*)(name))
149// Not experimental
150#define glewExperimental 0
151
152// Shut up MSVC compiler "inconsistent dll linkage" warning
153#if OGRE_COMPILER == OGRE_COMPILER_MSVC
154#  pragma warning (disable : 4273)
155#endif
156
157#if !defined(_WIN32) || !defined(GLEW_MX)
158
159PFNGLCOPYTEXSUBIMAGE3DPROC __glewCopyTexSubImage3D = NULL;
160PFNGLDRAWRANGEELEMENTSPROC __glewDrawRangeElements = NULL;
161PFNGLTEXIMAGE3DPROC __glewTexImage3D = NULL;
162PFNGLTEXSUBIMAGE3DPROC __glewTexSubImage3D = NULL;
163
164PFNGLACTIVETEXTUREPROC __glewActiveTexture = NULL;
165PFNGLCLIENTACTIVETEXTUREPROC __glewClientActiveTexture = NULL;
166PFNGLCOMPRESSEDTEXIMAGE1DPROC __glewCompressedTexImage1D = NULL;
167PFNGLCOMPRESSEDTEXIMAGE2DPROC __glewCompressedTexImage2D = NULL;
168PFNGLCOMPRESSEDTEXIMAGE3DPROC __glewCompressedTexImage3D = NULL;
169PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC __glewCompressedTexSubImage1D = NULL;
170PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC __glewCompressedTexSubImage2D = NULL;
171PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC __glewCompressedTexSubImage3D = NULL;
172PFNGLGETCOMPRESSEDTEXIMAGEPROC __glewGetCompressedTexImage = NULL;
173PFNGLLOADTRANSPOSEMATRIXDPROC __glewLoadTransposeMatrixd = NULL;
174PFNGLLOADTRANSPOSEMATRIXFPROC __glewLoadTransposeMatrixf = NULL;
175PFNGLMULTTRANSPOSEMATRIXDPROC __glewMultTransposeMatrixd = NULL;
176PFNGLMULTTRANSPOSEMATRIXFPROC __glewMultTransposeMatrixf = NULL;
177PFNGLMULTITEXCOORD1DPROC __glewMultiTexCoord1d = NULL;
178PFNGLMULTITEXCOORD1DVPROC __glewMultiTexCoord1dv = NULL;
179PFNGLMULTITEXCOORD1FPROC __glewMultiTexCoord1f = NULL;
180PFNGLMULTITEXCOORD1FVPROC __glewMultiTexCoord1fv = NULL;
181PFNGLMULTITEXCOORD1IPROC __glewMultiTexCoord1i = NULL;
182PFNGLMULTITEXCOORD1IVPROC __glewMultiTexCoord1iv = NULL;
183PFNGLMULTITEXCOORD1SPROC __glewMultiTexCoord1s = NULL;
184PFNGLMULTITEXCOORD1SVPROC __glewMultiTexCoord1sv = NULL;
185PFNGLMULTITEXCOORD2DPROC __glewMultiTexCoord2d = NULL;
186PFNGLMULTITEXCOORD2DVPROC __glewMultiTexCoord2dv = NULL;
187PFNGLMULTITEXCOORD2FPROC __glewMultiTexCoord2f = NULL;
188PFNGLMULTITEXCOORD2FVPROC __glewMultiTexCoord2fv = NULL;
189PFNGLMULTITEXCOORD2IPROC __glewMultiTexCoord2i = NULL;
190PFNGLMULTITEXCOORD2IVPROC __glewMultiTexCoord2iv = NULL;
191PFNGLMULTITEXCOORD2SPROC __glewMultiTexCoord2s = NULL;
192PFNGLMULTITEXCOORD2SVPROC __glewMultiTexCoord2sv = NULL;
193PFNGLMULTITEXCOORD3DPROC __glewMultiTexCoord3d = NULL;
194PFNGLMULTITEXCOORD3DVPROC __glewMultiTexCoord3dv = NULL;
195PFNGLMULTITEXCOORD3FPROC __glewMultiTexCoord3f = NULL;
196PFNGLMULTITEXCOORD3FVPROC __glewMultiTexCoord3fv = NULL;
197PFNGLMULTITEXCOORD3IPROC __glewMultiTexCoord3i = NULL;
198PFNGLMULTITEXCOORD3IVPROC __glewMultiTexCoord3iv = NULL;
199PFNGLMULTITEXCOORD3SPROC __glewMultiTexCoord3s = NULL;
200PFNGLMULTITEXCOORD3SVPROC __glewMultiTexCoord3sv = NULL;
201PFNGLMULTITEXCOORD4DPROC __glewMultiTexCoord4d = NULL;
202PFNGLMULTITEXCOORD4DVPROC __glewMultiTexCoord4dv = NULL;
203PFNGLMULTITEXCOORD4FPROC __glewMultiTexCoord4f = NULL;
204PFNGLMULTITEXCOORD4FVPROC __glewMultiTexCoord4fv = NULL;
205PFNGLMULTITEXCOORD4IPROC __glewMultiTexCoord4i = NULL;
206PFNGLMULTITEXCOORD4IVPROC __glewMultiTexCoord4iv = NULL;
207PFNGLMULTITEXCOORD4SPROC __glewMultiTexCoord4s = NULL;
208PFNGLMULTITEXCOORD4SVPROC __glewMultiTexCoord4sv = NULL;
209PFNGLSAMPLECOVERAGEPROC __glewSampleCoverage = NULL;
210
211PFNGLBLENDCOLORPROC __glewBlendColor = NULL;
212PFNGLBLENDEQUATIONPROC __glewBlendEquation = NULL;
213PFNGLBLENDFUNCSEPARATEPROC __glewBlendFuncSeparate = NULL;
214PFNGLFOGCOORDPOINTERPROC __glewFogCoordPointer = NULL;
215PFNGLFOGCOORDDPROC __glewFogCoordd = NULL;
216PFNGLFOGCOORDDVPROC __glewFogCoorddv = NULL;
217PFNGLFOGCOORDFPROC __glewFogCoordf = NULL;
218PFNGLFOGCOORDFVPROC __glewFogCoordfv = NULL;
219PFNGLMULTIDRAWARRAYSPROC __glewMultiDrawArrays = NULL;
220PFNGLMULTIDRAWELEMENTSPROC __glewMultiDrawElements = NULL;
221PFNGLPOINTPARAMETERFPROC __glewPointParameterf = NULL;
222PFNGLPOINTPARAMETERFVPROC __glewPointParameterfv = NULL;
223PFNGLSECONDARYCOLOR3BPROC __glewSecondaryColor3b = NULL;
224PFNGLSECONDARYCOLOR3BVPROC __glewSecondaryColor3bv = NULL;
225PFNGLSECONDARYCOLOR3DPROC __glewSecondaryColor3d = NULL;
226PFNGLSECONDARYCOLOR3DVPROC __glewSecondaryColor3dv = NULL;
227PFNGLSECONDARYCOLOR3FPROC __glewSecondaryColor3f = NULL;
228PFNGLSECONDARYCOLOR3FVPROC __glewSecondaryColor3fv = NULL;
229PFNGLSECONDARYCOLOR3IPROC __glewSecondaryColor3i = NULL;
230PFNGLSECONDARYCOLOR3IVPROC __glewSecondaryColor3iv = NULL;
231PFNGLSECONDARYCOLOR3SPROC __glewSecondaryColor3s = NULL;
232PFNGLSECONDARYCOLOR3SVPROC __glewSecondaryColor3sv = NULL;
233PFNGLSECONDARYCOLOR3UBPROC __glewSecondaryColor3ub = NULL;
234PFNGLSECONDARYCOLOR3UBVPROC __glewSecondaryColor3ubv = NULL;
235PFNGLSECONDARYCOLOR3UIPROC __glewSecondaryColor3ui = NULL;
236PFNGLSECONDARYCOLOR3UIVPROC __glewSecondaryColor3uiv = NULL;
237PFNGLSECONDARYCOLOR3USPROC __glewSecondaryColor3us = NULL;
238PFNGLSECONDARYCOLOR3USVPROC __glewSecondaryColor3usv = NULL;
239PFNGLSECONDARYCOLORPOINTERPROC __glewSecondaryColorPointer = NULL;
240PFNGLWINDOWPOS2DPROC __glewWindowPos2d = NULL;
241PFNGLWINDOWPOS2DVPROC __glewWindowPos2dv = NULL;
242PFNGLWINDOWPOS2FPROC __glewWindowPos2f = NULL;
243PFNGLWINDOWPOS2FVPROC __glewWindowPos2fv = NULL;
244PFNGLWINDOWPOS2IPROC __glewWindowPos2i = NULL;
245PFNGLWINDOWPOS2IVPROC __glewWindowPos2iv = NULL;
246PFNGLWINDOWPOS2SPROC __glewWindowPos2s = NULL;
247PFNGLWINDOWPOS2SVPROC __glewWindowPos2sv = NULL;
248PFNGLWINDOWPOS3DPROC __glewWindowPos3d = NULL;
249PFNGLWINDOWPOS3DVPROC __glewWindowPos3dv = NULL;
250PFNGLWINDOWPOS3FPROC __glewWindowPos3f = NULL;
251PFNGLWINDOWPOS3FVPROC __glewWindowPos3fv = NULL;
252PFNGLWINDOWPOS3IPROC __glewWindowPos3i = NULL;
253PFNGLWINDOWPOS3IVPROC __glewWindowPos3iv = NULL;
254PFNGLWINDOWPOS3SPROC __glewWindowPos3s = NULL;
255PFNGLWINDOWPOS3SVPROC __glewWindowPos3sv = NULL;
256
257PFNGLBEGINQUERYPROC __glewBeginQuery = NULL;
258PFNGLBINDBUFFERPROC __glewBindBuffer = NULL;
259PFNGLBUFFERDATAPROC __glewBufferData = NULL;
260PFNGLBUFFERSUBDATAPROC __glewBufferSubData = NULL;
261PFNGLDELETEBUFFERSPROC __glewDeleteBuffers = NULL;
262PFNGLDELETEQUERIESPROC __glewDeleteQueries = NULL;
263PFNGLENDQUERYPROC __glewEndQuery = NULL;
264PFNGLGENBUFFERSPROC __glewGenBuffers = NULL;
265PFNGLGENQUERIESPROC __glewGenQueries = NULL;
266PFNGLGETBUFFERPARAMETERIVPROC __glewGetBufferParameteriv = NULL;
267PFNGLGETBUFFERPOINTERVPROC __glewGetBufferPointerv = NULL;
268PFNGLGETBUFFERSUBDATAPROC __glewGetBufferSubData = NULL;
269PFNGLGETQUERYOBJECTIVPROC __glewGetQueryObjectiv = NULL;
270PFNGLGETQUERYOBJECTUIVPROC __glewGetQueryObjectuiv = NULL;
271PFNGLGETQUERYIVPROC __glewGetQueryiv = NULL;
272PFNGLISBUFFERPROC __glewIsBuffer = NULL;
273PFNGLISQUERYPROC __glewIsQuery = NULL;
274PFNGLMAPBUFFERPROC __glewMapBuffer = NULL;
275PFNGLUNMAPBUFFERPROC __glewUnmapBuffer = NULL;
276
277PFNGLATTACHSHADERPROC __glewAttachShader = NULL;
278PFNGLBINDATTRIBLOCATIONPROC __glewBindAttribLocation = NULL;
279PFNGLBLENDEQUATIONSEPARATEPROC __glewBlendEquationSeparate = NULL;
280PFNGLCOMPILESHADERPROC __glewCompileShader = NULL;
281PFNGLCREATEPROGRAMPROC __glewCreateProgram = NULL;
282PFNGLCREATESHADERPROC __glewCreateShader = NULL;
283PFNGLDELETEPROGRAMPROC __glewDeleteProgram = NULL;
284PFNGLDELETESHADERPROC __glewDeleteShader = NULL;
285PFNGLDETACHSHADERPROC __glewDetachShader = NULL;
286PFNGLDISABLEVERTEXATTRIBARRAYPROC __glewDisableVertexAttribArray = NULL;
287PFNGLDRAWBUFFERSPROC __glewDrawBuffers = NULL;
288PFNGLENABLEVERTEXATTRIBARRAYPROC __glewEnableVertexAttribArray = NULL;
289PFNGLGETACTIVEATTRIBPROC __glewGetActiveAttrib = NULL;
290PFNGLGETACTIVEUNIFORMPROC __glewGetActiveUniform = NULL;
291PFNGLGETATTACHEDSHADERSPROC __glewGetAttachedShaders = NULL;
292PFNGLGETATTRIBLOCATIONPROC __glewGetAttribLocation = NULL;
293PFNGLGETPROGRAMINFOLOGPROC __glewGetProgramInfoLog = NULL;
294PFNGLGETPROGRAMIVPROC __glewGetProgramiv = NULL;
295PFNGLGETSHADERINFOLOGPROC __glewGetShaderInfoLog = NULL;
296PFNGLGETSHADERSOURCEPROC __glewGetShaderSource = NULL;
297PFNGLGETSHADERIVPROC __glewGetShaderiv = NULL;
298PFNGLGETUNIFORMLOCATIONPROC __glewGetUniformLocation = NULL;
299PFNGLGETUNIFORMFVPROC __glewGetUniformfv = NULL;
300PFNGLGETUNIFORMIVPROC __glewGetUniformiv = NULL;
301PFNGLGETVERTEXATTRIBPOINTERVPROC __glewGetVertexAttribPointerv = NULL;
302PFNGLGETVERTEXATTRIBDVPROC __glewGetVertexAttribdv = NULL;
303PFNGLGETVERTEXATTRIBFVPROC __glewGetVertexAttribfv = NULL;
304PFNGLGETVERTEXATTRIBIVPROC __glewGetVertexAttribiv = NULL;
305PFNGLISPROGRAMPROC __glewIsProgram = NULL;
306PFNGLISSHADERPROC __glewIsShader = NULL;
307PFNGLLINKPROGRAMPROC __glewLinkProgram = NULL;
308PFNGLSHADERSOURCEPROC __glewShaderSource = NULL;
309PFNGLSTENCILFUNCSEPARATEPROC __glewStencilFuncSeparate = NULL;
310PFNGLSTENCILMASKSEPARATEPROC __glewStencilMaskSeparate = NULL;
311PFNGLSTENCILOPSEPARATEPROC __glewStencilOpSeparate = NULL;
312PFNGLUNIFORM1FPROC __glewUniform1f = NULL;
313PFNGLUNIFORM1FVPROC __glewUniform1fv = NULL;
314PFNGLUNIFORM1IPROC __glewUniform1i = NULL;
315PFNGLUNIFORM1IVPROC __glewUniform1iv = NULL;
316PFNGLUNIFORM2FPROC __glewUniform2f = NULL;
317PFNGLUNIFORM2FVPROC __glewUniform2fv = NULL;
318PFNGLUNIFORM2IPROC __glewUniform2i = NULL;
319PFNGLUNIFORM2IVPROC __glewUniform2iv = NULL;
320PFNGLUNIFORM3FPROC __glewUniform3f = NULL;
321PFNGLUNIFORM3FVPROC __glewUniform3fv = NULL;
322PFNGLUNIFORM3IPROC __glewUniform3i = NULL;
323PFNGLUNIFORM3IVPROC __glewUniform3iv = NULL;
324PFNGLUNIFORM4FPROC __glewUniform4f = NULL;
325PFNGLUNIFORM4FVPROC __glewUniform4fv = NULL;
326PFNGLUNIFORM4IPROC __glewUniform4i = NULL;
327PFNGLUNIFORM4IVPROC __glewUniform4iv = NULL;
328PFNGLUNIFORMMATRIX2FVPROC __glewUniformMatrix2fv = NULL;
329PFNGLUNIFORMMATRIX3FVPROC __glewUniformMatrix3fv = NULL;
330PFNGLUNIFORMMATRIX4FVPROC __glewUniformMatrix4fv = NULL;
331PFNGLUSEPROGRAMPROC __glewUseProgram = NULL;
332PFNGLVALIDATEPROGRAMPROC __glewValidateProgram = NULL;
333PFNGLVERTEXATTRIB1DPROC __glewVertexAttrib1d = NULL;
334PFNGLVERTEXATTRIB1DVPROC __glewVertexAttrib1dv = NULL;
335PFNGLVERTEXATTRIB1FPROC __glewVertexAttrib1f = NULL;
336PFNGLVERTEXATTRIB1FVPROC __glewVertexAttrib1fv = NULL;
337PFNGLVERTEXATTRIB1SPROC __glewVertexAttrib1s = NULL;
338PFNGLVERTEXATTRIB1SVPROC __glewVertexAttrib1sv = NULL;
339PFNGLVERTEXATTRIB2DPROC __glewVertexAttrib2d = NULL;
340PFNGLVERTEXATTRIB2DVPROC __glewVertexAttrib2dv = NULL;
341PFNGLVERTEXATTRIB2FPROC __glewVertexAttrib2f = NULL;
342PFNGLVERTEXATTRIB2FVPROC __glewVertexAttrib2fv = NULL;
343PFNGLVERTEXATTRIB2SPROC __glewVertexAttrib2s = NULL;
344PFNGLVERTEXATTRIB2SVPROC __glewVertexAttrib2sv = NULL;
345PFNGLVERTEXATTRIB3DPROC __glewVertexAttrib3d = NULL;
346PFNGLVERTEXATTRIB3DVPROC __glewVertexAttrib3dv = NULL;
347PFNGLVERTEXATTRIB3FPROC __glewVertexAttrib3f = NULL;
348PFNGLVERTEXATTRIB3FVPROC __glewVertexAttrib3fv = NULL;
349PFNGLVERTEXATTRIB3SPROC __glewVertexAttrib3s = NULL;
350PFNGLVERTEXATTRIB3SVPROC __glewVertexAttrib3sv = NULL;
351PFNGLVERTEXATTRIB4NBVPROC __glewVertexAttrib4Nbv = NULL;
352PFNGLVERTEXATTRIB4NIVPROC __glewVertexAttrib4Niv = NULL;
353PFNGLVERTEXATTRIB4NSVPROC __glewVertexAttrib4Nsv = NULL;
354PFNGLVERTEXATTRIB4NUBPROC __glewVertexAttrib4Nub = NULL;
355PFNGLVERTEXATTRIB4NUBVPROC __glewVertexAttrib4Nubv = NULL;
356PFNGLVERTEXATTRIB4NUIVPROC __glewVertexAttrib4Nuiv = NULL;
357PFNGLVERTEXATTRIB4NUSVPROC __glewVertexAttrib4Nusv = NULL;
358PFNGLVERTEXATTRIB4BVPROC __glewVertexAttrib4bv = NULL;
359PFNGLVERTEXATTRIB4DPROC __glewVertexAttrib4d = NULL;
360PFNGLVERTEXATTRIB4DVPROC __glewVertexAttrib4dv = NULL;
361PFNGLVERTEXATTRIB4FPROC __glewVertexAttrib4f = NULL;
362PFNGLVERTEXATTRIB4FVPROC __glewVertexAttrib4fv = NULL;
363PFNGLVERTEXATTRIB4IVPROC __glewVertexAttrib4iv = NULL;
364PFNGLVERTEXATTRIB4SPROC __glewVertexAttrib4s = NULL;
365PFNGLVERTEXATTRIB4SVPROC __glewVertexAttrib4sv = NULL;
366PFNGLVERTEXATTRIB4UBVPROC __glewVertexAttrib4ubv = NULL;
367PFNGLVERTEXATTRIB4UIVPROC __glewVertexAttrib4uiv = NULL;
368PFNGLVERTEXATTRIB4USVPROC __glewVertexAttrib4usv = NULL;
369PFNGLVERTEXATTRIBPOINTERPROC __glewVertexAttribPointer = NULL;
370
371PFNGLDRAWBUFFERSARBPROC __glewDrawBuffersARB = NULL;
372
373PFNGLSAMPLECOVERAGEARBPROC __glewSampleCoverageARB = NULL;
374
375PFNGLACTIVETEXTUREARBPROC __glewActiveTextureARB = NULL;
376PFNGLCLIENTACTIVETEXTUREARBPROC __glewClientActiveTextureARB = NULL;
377PFNGLMULTITEXCOORD1DARBPROC __glewMultiTexCoord1dARB = NULL;
378PFNGLMULTITEXCOORD1DVARBPROC __glewMultiTexCoord1dvARB = NULL;
379PFNGLMULTITEXCOORD1FARBPROC __glewMultiTexCoord1fARB = NULL;
380PFNGLMULTITEXCOORD1FVARBPROC __glewMultiTexCoord1fvARB = NULL;
381PFNGLMULTITEXCOORD1IARBPROC __glewMultiTexCoord1iARB = NULL;
382PFNGLMULTITEXCOORD1IVARBPROC __glewMultiTexCoord1ivARB = NULL;
383PFNGLMULTITEXCOORD1SARBPROC __glewMultiTexCoord1sARB = NULL;
384PFNGLMULTITEXCOORD1SVARBPROC __glewMultiTexCoord1svARB = NULL;
385PFNGLMULTITEXCOORD2DARBPROC __glewMultiTexCoord2dARB = NULL;
386PFNGLMULTITEXCOORD2DVARBPROC __glewMultiTexCoord2dvARB = NULL;
387PFNGLMULTITEXCOORD2FARBPROC __glewMultiTexCoord2fARB = NULL;
388PFNGLMULTITEXCOORD2FVARBPROC __glewMultiTexCoord2fvARB = NULL;
389PFNGLMULTITEXCOORD2IARBPROC __glewMultiTexCoord2iARB = NULL;
390PFNGLMULTITEXCOORD2IVARBPROC __glewMultiTexCoord2ivARB = NULL;
391PFNGLMULTITEXCOORD2SARBPROC __glewMultiTexCoord2sARB = NULL;
392PFNGLMULTITEXCOORD2SVARBPROC __glewMultiTexCoord2svARB = NULL;
393PFNGLMULTITEXCOORD3DARBPROC __glewMultiTexCoord3dARB = NULL;
394PFNGLMULTITEXCOORD3DVARBPROC __glewMultiTexCoord3dvARB = NULL;
395PFNGLMULTITEXCOORD3FARBPROC __glewMultiTexCoord3fARB = NULL;
396PFNGLMULTITEXCOORD3FVARBPROC __glewMultiTexCoord3fvARB = NULL;
397PFNGLMULTITEXCOORD3IARBPROC __glewMultiTexCoord3iARB = NULL;
398PFNGLMULTITEXCOORD3IVARBPROC __glewMultiTexCoord3ivARB = NULL;
399PFNGLMULTITEXCOORD3SARBPROC __glewMultiTexCoord3sARB = NULL;
400PFNGLMULTITEXCOORD3SVARBPROC __glewMultiTexCoord3svARB = NULL;
401PFNGLMULTITEXCOORD4DARBPROC __glewMultiTexCoord4dARB = NULL;
402PFNGLMULTITEXCOORD4DVARBPROC __glewMultiTexCoord4dvARB = NULL;
403PFNGLMULTITEXCOORD4FARBPROC __glewMultiTexCoord4fARB = NULL;
404PFNGLMULTITEXCOORD4FVARBPROC __glewMultiTexCoord4fvARB = NULL;
405PFNGLMULTITEXCOORD4IARBPROC __glewMultiTexCoord4iARB = NULL;
406PFNGLMULTITEXCOORD4IVARBPROC __glewMultiTexCoord4ivARB = NULL;
407PFNGLMULTITEXCOORD4SARBPROC __glewMultiTexCoord4sARB = NULL;
408PFNGLMULTITEXCOORD4SVARBPROC __glewMultiTexCoord4svARB = NULL;
409
410PFNGLBEGINQUERYARBPROC __glewBeginQueryARB = NULL;
411PFNGLDELETEQUERIESARBPROC __glewDeleteQueriesARB = NULL;
412PFNGLENDQUERYARBPROC __glewEndQueryARB = NULL;
413PFNGLGENQUERIESARBPROC __glewGenQueriesARB = NULL;
414PFNGLGETQUERYOBJECTIVARBPROC __glewGetQueryObjectivARB = NULL;
415PFNGLGETQUERYOBJECTUIVARBPROC __glewGetQueryObjectuivARB = NULL;
416PFNGLGETQUERYIVARBPROC __glewGetQueryivARB = NULL;
417PFNGLISQUERYARBPROC __glewIsQueryARB = NULL;
418
419PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB = NULL;
420PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB = NULL;
421PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB = NULL;
422PFNGLCREATESHADEROBJECTARBPROC __glewCreateShaderObjectARB = NULL;
423PFNGLDELETEOBJECTARBPROC __glewDeleteObjectARB = NULL;
424PFNGLDETACHOBJECTARBPROC __glewDetachObjectARB = NULL;
425PFNGLGETACTIVEUNIFORMARBPROC __glewGetActiveUniformARB = NULL;
426PFNGLGETATTACHEDOBJECTSARBPROC __glewGetAttachedObjectsARB = NULL;
427PFNGLGETHANDLEARBPROC __glewGetHandleARB = NULL;
428PFNGLGETINFOLOGARBPROC __glewGetInfoLogARB = NULL;
429PFNGLGETOBJECTPARAMETERFVARBPROC __glewGetObjectParameterfvARB = NULL;
430PFNGLGETOBJECTPARAMETERIVARBPROC __glewGetObjectParameterivARB = NULL;
431PFNGLGETSHADERSOURCEARBPROC __glewGetShaderSourceARB = NULL;
432PFNGLGETUNIFORMLOCATIONARBPROC __glewGetUniformLocationARB = NULL;
433PFNGLGETUNIFORMFVARBPROC __glewGetUniformfvARB = NULL;
434PFNGLGETUNIFORMIVARBPROC __glewGetUniformivARB = NULL;
435PFNGLLINKPROGRAMARBPROC __glewLinkProgramARB = NULL;
436PFNGLSHADERSOURCEARBPROC __glewShaderSourceARB = NULL;
437PFNGLUNIFORM1FARBPROC __glewUniform1fARB = NULL;
438PFNGLUNIFORM1FVARBPROC __glewUniform1fvARB = NULL;
439PFNGLUNIFORM1IARBPROC __glewUniform1iARB = NULL;
440PFNGLUNIFORM1IVARBPROC __glewUniform1ivARB = NULL;
441PFNGLUNIFORM2FARBPROC __glewUniform2fARB = NULL;
442PFNGLUNIFORM2FVARBPROC __glewUniform2fvARB = NULL;
443PFNGLUNIFORM2IARBPROC __glewUniform2iARB = NULL;
444PFNGLUNIFORM2IVARBPROC __glewUniform2ivARB = NULL;
445PFNGLUNIFORM3FARBPROC __glewUniform3fARB = NULL;
446PFNGLUNIFORM3FVARBPROC __glewUniform3fvARB = NULL;
447PFNGLUNIFORM3IARBPROC __glewUniform3iARB = NULL;
448PFNGLUNIFORM3IVARBPROC __glewUniform3ivARB = NULL;
449PFNGLUNIFORM4FARBPROC __glewUniform4fARB = NULL;
450PFNGLUNIFORM4FVARBPROC __glewUniform4fvARB = NULL;
451PFNGLUNIFORM4IARBPROC __glewUniform4iARB = NULL;
452PFNGLUNIFORM4IVARBPROC __glewUniform4ivARB = NULL;
453PFNGLUNIFORMMATRIX2FVARBPROC __glewUniformMatrix2fvARB = NULL;
454PFNGLUNIFORMMATRIX3FVARBPROC __glewUniformMatrix3fvARB = NULL;
455PFNGLUNIFORMMATRIX4FVARBPROC __glewUniformMatrix4fvARB = NULL;
456PFNGLUSEPROGRAMOBJECTARBPROC __glewUseProgramObjectARB = NULL;
457PFNGLVALIDATEPROGRAMARBPROC __glewValidateProgramARB = NULL;
458
459PFNGLCOMPRESSEDTEXIMAGE1DARBPROC __glewCompressedTexImage1DARB = NULL;
460PFNGLCOMPRESSEDTEXIMAGE2DARBPROC __glewCompressedTexImage2DARB = NULL;
461PFNGLCOMPRESSEDTEXIMAGE3DARBPROC __glewCompressedTexImage3DARB = NULL;
462PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC __glewCompressedTexSubImage1DARB = NULL;
463PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC __glewCompressedTexSubImage2DARB = NULL;
464PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC __glewCompressedTexSubImage3DARB = NULL;
465PFNGLGETCOMPRESSEDTEXIMAGEARBPROC __glewGetCompressedTexImageARB = NULL;
466
467PFNGLBINDBUFFERARBPROC __glewBindBufferARB = NULL;
468PFNGLBUFFERDATAARBPROC __glewBufferDataARB = NULL;
469PFNGLBUFFERSUBDATAARBPROC __glewBufferSubDataARB = NULL;
470PFNGLDELETEBUFFERSARBPROC __glewDeleteBuffersARB = NULL;
471PFNGLGENBUFFERSARBPROC __glewGenBuffersARB = NULL;
472PFNGLGETBUFFERPARAMETERIVARBPROC __glewGetBufferParameterivARB = NULL;
473PFNGLGETBUFFERPOINTERVARBPROC __glewGetBufferPointervARB = NULL;
474PFNGLGETBUFFERSUBDATAARBPROC __glewGetBufferSubDataARB = NULL;
475PFNGLISBUFFERARBPROC __glewIsBufferARB = NULL;
476PFNGLMAPBUFFERARBPROC __glewMapBufferARB = NULL;
477PFNGLUNMAPBUFFERARBPROC __glewUnmapBufferARB = NULL;
478
479PFNGLBINDPROGRAMARBPROC __glewBindProgramARB = NULL;
480PFNGLDELETEPROGRAMSARBPROC __glewDeleteProgramsARB = NULL;
481PFNGLDISABLEVERTEXATTRIBARRAYARBPROC __glewDisableVertexAttribArrayARB = NULL;
482PFNGLENABLEVERTEXATTRIBARRAYARBPROC __glewEnableVertexAttribArrayARB = NULL;
483PFNGLGENPROGRAMSARBPROC __glewGenProgramsARB = NULL;
484PFNGLGETPROGRAMENVPARAMETERDVARBPROC __glewGetProgramEnvParameterdvARB = NULL;
485PFNGLGETPROGRAMENVPARAMETERFVARBPROC __glewGetProgramEnvParameterfvARB = NULL;
486PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC __glewGetProgramLocalParameterdvARB = NULL;
487PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC __glewGetProgramLocalParameterfvARB = NULL;
488PFNGLGETPROGRAMSTRINGARBPROC __glewGetProgramStringARB = NULL;
489PFNGLGETPROGRAMIVARBPROC __glewGetProgramivARB = NULL;
490PFNGLGETVERTEXATTRIBPOINTERVARBPROC __glewGetVertexAttribPointervARB = NULL;
491PFNGLGETVERTEXATTRIBDVARBPROC __glewGetVertexAttribdvARB = NULL;
492PFNGLGETVERTEXATTRIBFVARBPROC __glewGetVertexAttribfvARB = NULL;
493PFNGLGETVERTEXATTRIBIVARBPROC __glewGetVertexAttribivARB = NULL;
494PFNGLISPROGRAMARBPROC __glewIsProgramARB = NULL;
495PFNGLPROGRAMENVPARAMETER4DARBPROC __glewProgramEnvParameter4dARB = NULL;
496PFNGLPROGRAMENVPARAMETER4DVARBPROC __glewProgramEnvParameter4dvARB = NULL;
497PFNGLPROGRAMENVPARAMETER4FARBPROC __glewProgramEnvParameter4fARB = NULL;
498PFNGLPROGRAMENVPARAMETER4FVARBPROC __glewProgramEnvParameter4fvARB = NULL;
499PFNGLPROGRAMLOCALPARAMETER4DARBPROC __glewProgramLocalParameter4dARB = NULL;
500PFNGLPROGRAMLOCALPARAMETER4DVARBPROC __glewProgramLocalParameter4dvARB = NULL;
501PFNGLPROGRAMLOCALPARAMETER4FARBPROC __glewProgramLocalParameter4fARB = NULL;
502PFNGLPROGRAMLOCALPARAMETER4FVARBPROC __glewProgramLocalParameter4fvARB = NULL;
503PFNGLPROGRAMSTRINGARBPROC __glewProgramStringARB = NULL;
504PFNGLVERTEXATTRIB1DARBPROC __glewVertexAttrib1dARB = NULL;
505PFNGLVERTEXATTRIB1DVARBPROC __glewVertexAttrib1dvARB = NULL;
506PFNGLVERTEXATTRIB1FARBPROC __glewVertexAttrib1fARB = NULL;
507PFNGLVERTEXATTRIB1FVARBPROC __glewVertexAttrib1fvARB = NULL;
508PFNGLVERTEXATTRIB1SARBPROC __glewVertexAttrib1sARB = NULL;
509PFNGLVERTEXATTRIB1SVARBPROC __glewVertexAttrib1svARB = NULL;
510PFNGLVERTEXATTRIB2DARBPROC __glewVertexAttrib2dARB = NULL;
511PFNGLVERTEXATTRIB2DVARBPROC __glewVertexAttrib2dvARB = NULL;
512PFNGLVERTEXATTRIB2FARBPROC __glewVertexAttrib2fARB = NULL;
513PFNGLVERTEXATTRIB2FVARBPROC __glewVertexAttrib2fvARB = NULL;
514PFNGLVERTEXATTRIB2SARBPROC __glewVertexAttrib2sARB = NULL;
515PFNGLVERTEXATTRIB2SVARBPROC __glewVertexAttrib2svARB = NULL;
516PFNGLVERTEXATTRIB3DARBPROC __glewVertexAttrib3dARB = NULL;
517PFNGLVERTEXATTRIB3DVARBPROC __glewVertexAttrib3dvARB = NULL;
518PFNGLVERTEXATTRIB3FARBPROC __glewVertexAttrib3fARB = NULL;
519PFNGLVERTEXATTRIB3FVARBPROC __glewVertexAttrib3fvARB = NULL;
520PFNGLVERTEXATTRIB3SARBPROC __glewVertexAttrib3sARB = NULL;
521PFNGLVERTEXATTRIB3SVARBPROC __glewVertexAttrib3svARB = NULL;
522PFNGLVERTEXATTRIB4NBVARBPROC __glewVertexAttrib4NbvARB = NULL;
523PFNGLVERTEXATTRIB4NIVARBPROC __glewVertexAttrib4NivARB = NULL;
524PFNGLVERTEXATTRIB4NSVARBPROC __glewVertexAttrib4NsvARB = NULL;
525PFNGLVERTEXATTRIB4NUBARBPROC __glewVertexAttrib4NubARB = NULL;
526PFNGLVERTEXATTRIB4NUBVARBPROC __glewVertexAttrib4NubvARB = NULL;
527PFNGLVERTEXATTRIB4NUIVARBPROC __glewVertexAttrib4NuivARB = NULL;
528PFNGLVERTEXATTRIB4NUSVARBPROC __glewVertexAttrib4NusvARB = NULL;
529PFNGLVERTEXATTRIB4BVARBPROC __glewVertexAttrib4bvARB = NULL;
530PFNGLVERTEXATTRIB4DARBPROC __glewVertexAttrib4dARB = NULL;
531PFNGLVERTEXATTRIB4DVARBPROC __glewVertexAttrib4dvARB = NULL;
532PFNGLVERTEXATTRIB4FARBPROC __glewVertexAttrib4fARB = NULL;
533PFNGLVERTEXATTRIB4FVARBPROC __glewVertexAttrib4fvARB = NULL;
534PFNGLVERTEXATTRIB4IVARBPROC __glewVertexAttrib4ivARB = NULL;
535PFNGLVERTEXATTRIB4SARBPROC __glewVertexAttrib4sARB = NULL;
536PFNGLVERTEXATTRIB4SVARBPROC __glewVertexAttrib4svARB = NULL;
537PFNGLVERTEXATTRIB4UBVARBPROC __glewVertexAttrib4ubvARB = NULL;
538PFNGLVERTEXATTRIB4UIVARBPROC __glewVertexAttrib4uivARB = NULL;
539PFNGLVERTEXATTRIB4USVARBPROC __glewVertexAttrib4usvARB = NULL;
540PFNGLVERTEXATTRIBPOINTERARBPROC __glewVertexAttribPointerARB = NULL;
541
542PFNGLBINDATTRIBLOCATIONARBPROC __glewBindAttribLocationARB = NULL;
543PFNGLGETACTIVEATTRIBARBPROC __glewGetActiveAttribARB = NULL;
544PFNGLGETATTRIBLOCATIONARBPROC __glewGetAttribLocationARB = NULL;
545
546PFNGLDRAWBUFFERSATIPROC __glewDrawBuffersATI = NULL;
547
548PFNGLALPHAFRAGMENTOP1ATIPROC __glewAlphaFragmentOp1ATI = NULL;
549PFNGLALPHAFRAGMENTOP2ATIPROC __glewAlphaFragmentOp2ATI = NULL;
550PFNGLALPHAFRAGMENTOP3ATIPROC __glewAlphaFragmentOp3ATI = NULL;
551PFNGLBEGINFRAGMENTSHADERATIPROC __glewBeginFragmentShaderATI = NULL;
552PFNGLBINDFRAGMENTSHADERATIPROC __glewBindFragmentShaderATI = NULL;
553PFNGLCOLORFRAGMENTOP1ATIPROC __glewColorFragmentOp1ATI = NULL;
554PFNGLCOLORFRAGMENTOP2ATIPROC __glewColorFragmentOp2ATI = NULL;
555PFNGLCOLORFRAGMENTOP3ATIPROC __glewColorFragmentOp3ATI = NULL;
556PFNGLDELETEFRAGMENTSHADERATIPROC __glewDeleteFragmentShaderATI = NULL;
557PFNGLENDFRAGMENTSHADERATIPROC __glewEndFragmentShaderATI = NULL;
558PFNGLGENFRAGMENTSHADERSATIPROC __glewGenFragmentShadersATI = NULL;
559PFNGLPASSTEXCOORDATIPROC __glewPassTexCoordATI = NULL;
560PFNGLSAMPLEMAPATIPROC __glewSampleMapATI = NULL;
561PFNGLSETFRAGMENTSHADERCONSTANTATIPROC __glewSetFragmentShaderConstantATI = NULL;
562
563PFNGLBINDFRAMEBUFFEREXTPROC __glewBindFramebufferEXT = NULL;
564PFNGLBINDRENDERBUFFEREXTPROC __glewBindRenderbufferEXT = NULL;
565PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC __glewCheckFramebufferStatusEXT = NULL;
566PFNGLDELETEFRAMEBUFFERSEXTPROC __glewDeleteFramebuffersEXT = NULL;
567PFNGLDELETERENDERBUFFERSEXTPROC __glewDeleteRenderbuffersEXT = NULL;
568PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC __glewFramebufferRenderbufferEXT = NULL;
569PFNGLFRAMEBUFFERTEXTURE1DEXTPROC __glewFramebufferTexture1DEXT = NULL;
570PFNGLFRAMEBUFFERTEXTURE2DEXTPROC __glewFramebufferTexture2DEXT = NULL;
571PFNGLFRAMEBUFFERTEXTURE3DEXTPROC __glewFramebufferTexture3DEXT = NULL;
572PFNGLGENFRAMEBUFFERSEXTPROC __glewGenFramebuffersEXT = NULL;
573PFNGLGENRENDERBUFFERSEXTPROC __glewGenRenderbuffersEXT = NULL;
574PFNGLGENERATEMIPMAPEXTPROC __glewGenerateMipmapEXT = NULL;
575PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC __glewGetFramebufferAttachmentParameterivEXT = NULL;
576PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC __glewGetRenderbufferParameterivEXT = NULL;
577PFNGLISFRAMEBUFFEREXTPROC __glewIsFramebufferEXT = NULL;
578PFNGLISRENDERBUFFEREXTPROC __glewIsRenderbufferEXT = NULL;
579PFNGLRENDERBUFFERSTORAGEEXTPROC __glewRenderbufferStorageEXT = NULL;
580
581PFNGLSECONDARYCOLOR3BEXTPROC __glewSecondaryColor3bEXT = NULL;
582PFNGLSECONDARYCOLOR3BVEXTPROC __glewSecondaryColor3bvEXT = NULL;
583PFNGLSECONDARYCOLOR3DEXTPROC __glewSecondaryColor3dEXT = NULL;
584PFNGLSECONDARYCOLOR3DVEXTPROC __glewSecondaryColor3dvEXT = NULL;
585PFNGLSECONDARYCOLOR3FEXTPROC __glewSecondaryColor3fEXT = NULL;
586PFNGLSECONDARYCOLOR3FVEXTPROC __glewSecondaryColor3fvEXT = NULL;
587PFNGLSECONDARYCOLOR3IEXTPROC __glewSecondaryColor3iEXT = NULL;
588PFNGLSECONDARYCOLOR3IVEXTPROC __glewSecondaryColor3ivEXT = NULL;
589PFNGLSECONDARYCOLOR3SEXTPROC __glewSecondaryColor3sEXT = NULL;
590PFNGLSECONDARYCOLOR3SVEXTPROC __glewSecondaryColor3svEXT = NULL;
591PFNGLSECONDARYCOLOR3UBEXTPROC __glewSecondaryColor3ubEXT = NULL;
592PFNGLSECONDARYCOLOR3UBVEXTPROC __glewSecondaryColor3ubvEXT = NULL;
593PFNGLSECONDARYCOLOR3UIEXTPROC __glewSecondaryColor3uiEXT = NULL;
594PFNGLSECONDARYCOLOR3UIVEXTPROC __glewSecondaryColor3uivEXT = NULL;
595PFNGLSECONDARYCOLOR3USEXTPROC __glewSecondaryColor3usEXT = NULL;
596PFNGLSECONDARYCOLOR3USVEXTPROC __glewSecondaryColor3usvEXT = NULL;
597PFNGLSECONDARYCOLORPOINTEREXTPROC __glewSecondaryColorPointerEXT = NULL;
598
599PFNGLACTIVESTENCILFACEEXTPROC __glewActiveStencilFaceEXT = NULL;
600
601PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC __glewGetProgramNamedParameterdvNV = NULL;
602PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC __glewGetProgramNamedParameterfvNV = NULL;
603PFNGLPROGRAMNAMEDPARAMETER4DNVPROC __glewProgramNamedParameter4dNV = NULL;
604PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC __glewProgramNamedParameter4dvNV = NULL;
605PFNGLPROGRAMNAMEDPARAMETER4FNVPROC __glewProgramNamedParameter4fNV = NULL;
606PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC __glewProgramNamedParameter4fvNV = NULL;
607
608PFNGLBEGINOCCLUSIONQUERYNVPROC __glewBeginOcclusionQueryNV = NULL;
609PFNGLDELETEOCCLUSIONQUERIESNVPROC __glewDeleteOcclusionQueriesNV = NULL;
610PFNGLENDOCCLUSIONQUERYNVPROC __glewEndOcclusionQueryNV = NULL;
611PFNGLGENOCCLUSIONQUERIESNVPROC __glewGenOcclusionQueriesNV = NULL;
612PFNGLGETOCCLUSIONQUERYIVNVPROC __glewGetOcclusionQueryivNV = NULL;
613PFNGLGETOCCLUSIONQUERYUIVNVPROC __glewGetOcclusionQueryuivNV = NULL;
614PFNGLISOCCLUSIONQUERYNVPROC __glewIsOcclusionQueryNV = NULL;
615
616PFNGLCOMBINERINPUTNVPROC __glewCombinerInputNV = NULL;
617PFNGLCOMBINEROUTPUTNVPROC __glewCombinerOutputNV = NULL;
618PFNGLCOMBINERPARAMETERFNVPROC __glewCombinerParameterfNV = NULL;
619PFNGLCOMBINERPARAMETERFVNVPROC __glewCombinerParameterfvNV = NULL;
620PFNGLCOMBINERPARAMETERINVPROC __glewCombinerParameteriNV = NULL;
621PFNGLCOMBINERPARAMETERIVNVPROC __glewCombinerParameterivNV = NULL;
622PFNGLFINALCOMBINERINPUTNVPROC __glewFinalCombinerInputNV = NULL;
623PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC __glewGetCombinerInputParameterfvNV = NULL;
624PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC __glewGetCombinerInputParameterivNV = NULL;
625PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC __glewGetCombinerOutputParameterfvNV = NULL;
626PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC __glewGetCombinerOutputParameterivNV = NULL;
627PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC __glewGetFinalCombinerInputParameterfvNV = NULL;
628PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC __glewGetFinalCombinerInputParameterivNV = NULL;
629
630PFNGLCOMBINERSTAGEPARAMETERFVNVPROC __glewCombinerStageParameterfvNV = NULL;
631PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC __glewGetCombinerStageParameterfvNV = NULL;
632
633PFNGLAREPROGRAMSRESIDENTNVPROC __glewAreProgramsResidentNV = NULL;
634PFNGLBINDPROGRAMNVPROC __glewBindProgramNV = NULL;
635PFNGLDELETEPROGRAMSNVPROC __glewDeleteProgramsNV = NULL;
636PFNGLEXECUTEPROGRAMNVPROC __glewExecuteProgramNV = NULL;
637PFNGLGENPROGRAMSNVPROC __glewGenProgramsNV = NULL;
638PFNGLGETPROGRAMPARAMETERDVNVPROC __glewGetProgramParameterdvNV = NULL;
639PFNGLGETPROGRAMPARAMETERFVNVPROC __glewGetProgramParameterfvNV = NULL;
640PFNGLGETPROGRAMSTRINGNVPROC __glewGetProgramStringNV = NULL;
641PFNGLGETPROGRAMIVNVPROC __glewGetProgramivNV = NULL;
642PFNGLGETTRACKMATRIXIVNVPROC __glewGetTrackMatrixivNV = NULL;
643PFNGLGETVERTEXATTRIBPOINTERVNVPROC __glewGetVertexAttribPointervNV = NULL;
644PFNGLGETVERTEXATTRIBDVNVPROC __glewGetVertexAttribdvNV = NULL;
645PFNGLGETVERTEXATTRIBFVNVPROC __glewGetVertexAttribfvNV = NULL;
646PFNGLGETVERTEXATTRIBIVNVPROC __glewGetVertexAttribivNV = NULL;
647PFNGLISPROGRAMNVPROC __glewIsProgramNV = NULL;
648PFNGLLOADPROGRAMNVPROC __glewLoadProgramNV = NULL;
649PFNGLPROGRAMPARAMETER4DNVPROC __glewProgramParameter4dNV = NULL;
650PFNGLPROGRAMPARAMETER4DVNVPROC __glewProgramParameter4dvNV = NULL;
651PFNGLPROGRAMPARAMETER4FNVPROC __glewProgramParameter4fNV = NULL;
652PFNGLPROGRAMPARAMETER4FVNVPROC __glewProgramParameter4fvNV = NULL;
653PFNGLPROGRAMPARAMETERS4DVNVPROC __glewProgramParameters4dvNV = NULL;
654PFNGLPROGRAMPARAMETERS4FVNVPROC __glewProgramParameters4fvNV = NULL;
655PFNGLREQUESTRESIDENTPROGRAMSNVPROC __glewRequestResidentProgramsNV = NULL;
656PFNGLTRACKMATRIXNVPROC __glewTrackMatrixNV = NULL;
657PFNGLVERTEXATTRIB1DNVPROC __glewVertexAttrib1dNV = NULL;
658PFNGLVERTEXATTRIB1DVNVPROC __glewVertexAttrib1dvNV = NULL;
659PFNGLVERTEXATTRIB1FNVPROC __glewVertexAttrib1fNV = NULL;
660PFNGLVERTEXATTRIB1FVNVPROC __glewVertexAttrib1fvNV = NULL;
661PFNGLVERTEXATTRIB1SNVPROC __glewVertexAttrib1sNV = NULL;
662PFNGLVERTEXATTRIB1SVNVPROC __glewVertexAttrib1svNV = NULL;
663PFNGLVERTEXATTRIB2DNVPROC __glewVertexAttrib2dNV = NULL;
664PFNGLVERTEXATTRIB2DVNVPROC __glewVertexAttrib2dvNV = NULL;
665PFNGLVERTEXATTRIB2FNVPROC __glewVertexAttrib2fNV = NULL;
666PFNGLVERTEXATTRIB2FVNVPROC __glewVertexAttrib2fvNV = NULL;
667PFNGLVERTEXATTRIB2SNVPROC __glewVertexAttrib2sNV = NULL;
668PFNGLVERTEXATTRIB2SVNVPROC __glewVertexAttrib2svNV = NULL;
669PFNGLVERTEXATTRIB3DNVPROC __glewVertexAttrib3dNV = NULL;
670PFNGLVERTEXATTRIB3DVNVPROC __glewVertexAttrib3dvNV = NULL;
671PFNGLVERTEXATTRIB3FNVPROC __glewVertexAttrib3fNV = NULL;
672PFNGLVERTEXATTRIB3FVNVPROC __glewVertexAttrib3fvNV = NULL;
673PFNGLVERTEXATTRIB3SNVPROC __glewVertexAttrib3sNV = NULL;
674PFNGLVERTEXATTRIB3SVNVPROC __glewVertexAttrib3svNV = NULL;
675PFNGLVERTEXATTRIB4DNVPROC __glewVertexAttrib4dNV = NULL;
676PFNGLVERTEXATTRIB4DVNVPROC __glewVertexAttrib4dvNV = NULL;
677PFNGLVERTEXATTRIB4FNVPROC __glewVertexAttrib4fNV = NULL;
678PFNGLVERTEXATTRIB4FVNVPROC __glewVertexAttrib4fvNV = NULL;
679PFNGLVERTEXATTRIB4SNVPROC __glewVertexAttrib4sNV = NULL;
680PFNGLVERTEXATTRIB4SVNVPROC __glewVertexAttrib4svNV = NULL;
681PFNGLVERTEXATTRIB4UBNVPROC __glewVertexAttrib4ubNV = NULL;
682PFNGLVERTEXATTRIB4UBVNVPROC __glewVertexAttrib4ubvNV = NULL;
683PFNGLVERTEXATTRIBPOINTERNVPROC __glewVertexAttribPointerNV = NULL;
684PFNGLVERTEXATTRIBS1DVNVPROC __glewVertexAttribs1dvNV = NULL;
685PFNGLVERTEXATTRIBS1FVNVPROC __glewVertexAttribs1fvNV = NULL;
686PFNGLVERTEXATTRIBS1SVNVPROC __glewVertexAttribs1svNV = NULL;
687PFNGLVERTEXATTRIBS2DVNVPROC __glewVertexAttribs2dvNV = NULL;
688PFNGLVERTEXATTRIBS2FVNVPROC __glewVertexAttribs2fvNV = NULL;
689PFNGLVERTEXATTRIBS2SVNVPROC __glewVertexAttribs2svNV = NULL;
690PFNGLVERTEXATTRIBS3DVNVPROC __glewVertexAttribs3dvNV = NULL;
691PFNGLVERTEXATTRIBS3FVNVPROC __glewVertexAttribs3fvNV = NULL;
692PFNGLVERTEXATTRIBS3SVNVPROC __glewVertexAttribs3svNV = NULL;
693PFNGLVERTEXATTRIBS4DVNVPROC __glewVertexAttribs4dvNV = NULL;
694PFNGLVERTEXATTRIBS4FVNVPROC __glewVertexAttribs4fvNV = NULL;
695PFNGLVERTEXATTRIBS4SVNVPROC __glewVertexAttribs4svNV = NULL;
696PFNGLVERTEXATTRIBS4UBVNVPROC __glewVertexAttribs4ubvNV = NULL;
697
698#endif /* !WIN32 || !GLEW_MX */
699
700#if !defined(GLEW_MX)
701
702GLboolean __GLEW_VERSION_1_1 = GL_FALSE;
703GLboolean __GLEW_VERSION_1_2 = GL_FALSE;
704GLboolean __GLEW_VERSION_1_3 = GL_FALSE;
705GLboolean __GLEW_VERSION_1_4 = GL_FALSE;
706GLboolean __GLEW_VERSION_1_5 = GL_FALSE;
707GLboolean __GLEW_VERSION_2_0 = GL_FALSE;
708GLboolean __GLEW_ARB_draw_buffers = GL_FALSE;
709GLboolean __GLEW_ARB_fragment_program = GL_FALSE;
710GLboolean __GLEW_ARB_fragment_shader = GL_FALSE;
711GLboolean __GLEW_ARB_half_float_pixel = GL_FALSE;
712GLboolean __GLEW_ARB_multisample = GL_FALSE;
713GLboolean __GLEW_ARB_multitexture = GL_FALSE;
714GLboolean __GLEW_ARB_occlusion_query = GL_FALSE;
715GLboolean __GLEW_ARB_shader_objects = GL_FALSE;
716GLboolean __GLEW_ARB_shading_language_100 = GL_FALSE;
717GLboolean __GLEW_ARB_texture_compression = GL_FALSE;
718GLboolean __GLEW_ARB_texture_cube_map = GL_FALSE;
719GLboolean __GLEW_ARB_texture_env_combine = GL_FALSE;
720GLboolean __GLEW_ARB_texture_env_dot3 = GL_FALSE;
721GLboolean __GLEW_ARB_texture_float = GL_FALSE;
722GLboolean __GLEW_ARB_texture_non_power_of_two = GL_FALSE;
723GLboolean __GLEW_ARB_vertex_buffer_object = GL_FALSE;
724GLboolean __GLEW_ARB_vertex_program = GL_FALSE;
725GLboolean __GLEW_ARB_vertex_shader = GL_FALSE;
726GLboolean __GLEW_ATI_draw_buffers = GL_FALSE;
727GLboolean __GLEW_ATI_fragment_shader = GL_FALSE;
728GLboolean __GLEW_ATI_texture_float = GL_FALSE;
729GLboolean __GLEW_EXT_framebuffer_object = GL_FALSE;
730GLboolean __GLEW_EXT_secondary_color = GL_FALSE;
731GLboolean __GLEW_EXT_stencil_two_side = GL_FALSE;
732GLboolean __GLEW_EXT_stencil_wrap = GL_FALSE;
733GLboolean __GLEW_EXT_texture_compression_s3tc = GL_FALSE;
734GLboolean __GLEW_EXT_texture_cube_map = GL_FALSE;
735GLboolean __GLEW_EXT_texture_env_combine = GL_FALSE;
736GLboolean __GLEW_EXT_texture_env_dot3 = GL_FALSE;
737GLboolean __GLEW_EXT_texture_filter_anisotropic = GL_FALSE;
738GLboolean __GLEW_NV_fragment_program = GL_FALSE;
739GLboolean __GLEW_NV_fragment_program2 = GL_FALSE;
740GLboolean __GLEW_NV_fragment_program_option = GL_FALSE;
741GLboolean __GLEW_NV_occlusion_query = GL_FALSE;
742GLboolean __GLEW_NV_register_combiners = GL_FALSE;
743GLboolean __GLEW_NV_register_combiners2 = GL_FALSE;
744GLboolean __GLEW_NV_texture_compression_vtc = GL_FALSE;
745GLboolean __GLEW_NV_texture_shader = GL_FALSE;
746GLboolean __GLEW_NV_vertex_program = GL_FALSE;
747GLboolean __GLEW_NV_vertex_program2_option = GL_FALSE;
748GLboolean __GLEW_NV_vertex_program3 = GL_FALSE;
749GLboolean __GLEW_SGIS_generate_mipmap = GL_FALSE;
750
751#endif /* !GLEW_MX */
752
753#ifdef GL_VERSION_1_2
754
755static GLboolean _glewInit_GL_VERSION_1_2 (GLEW_CONTEXT_ARG_DEF_INIT)
756{
757  GLboolean r = GL_FALSE;
758
759  r = ((glCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glCopyTexSubImage3D")) == NULL) || r;
760  r = ((glDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC)glewGetProcAddress((const GLubyte*)"glDrawRangeElements")) == NULL) || r;
761  r = ((glTexImage3D = (PFNGLTEXIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glTexImage3D")) == NULL) || r;
762  r = ((glTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glTexSubImage3D")) == NULL) || r;
763
764  return r;
765}
766
767#endif /* GL_VERSION_1_2 */
768
769#ifdef GL_VERSION_1_3
770
771static GLboolean _glewInit_GL_VERSION_1_3 (GLEW_CONTEXT_ARG_DEF_INIT)
772{
773  GLboolean r = GL_FALSE;
774
775  r = ((glActiveTexture = (PFNGLACTIVETEXTUREPROC)glewGetProcAddress((const GLubyte*)"glActiveTexture")) == NULL) || r;
776  r = ((glClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC)glewGetProcAddress((const GLubyte*)"glClientActiveTexture")) == NULL) || r;
777  r = ((glCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage1D")) == NULL) || r;
778  r = ((glCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage2D")) == NULL) || r;
779  r = ((glCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage3D")) == NULL) || r;
780  r = ((glCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage1D")) == NULL) || r;
781  r = ((glCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage2D")) == NULL) || r;
782  r = ((glCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage3D")) == NULL) || r;
783  r = ((glGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC)glewGetProcAddress((const GLubyte*)"glGetCompressedTexImage")) == NULL) || r;
784  r = ((glLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC)glewGetProcAddress((const GLubyte*)"glLoadTransposeMatrixd")) == NULL) || r;
785  r = ((glLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC)glewGetProcAddress((const GLubyte*)"glLoadTransposeMatrixf")) == NULL) || r;
786  r = ((glMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC)glewGetProcAddress((const GLubyte*)"glMultTransposeMatrixd")) == NULL) || r;
787  r = ((glMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC)glewGetProcAddress((const GLubyte*)"glMultTransposeMatrixf")) == NULL) || r;
788  r = ((glMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1d")) == NULL) || r;
789  r = ((glMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1dv")) == NULL) || r;
790  r = ((glMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1f")) == NULL) || r;
791  r = ((glMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1fv")) == NULL) || r;
792  r = ((glMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1i")) == NULL) || r;
793  r = ((glMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1iv")) == NULL) || r;
794  r = ((glMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1s")) == NULL) || r;
795  r = ((glMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1sv")) == NULL) || r;
796  r = ((glMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2d")) == NULL) || r;
797  r = ((glMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2dv")) == NULL) || r;
798  r = ((glMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2f")) == NULL) || r;
799  r = ((glMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2fv")) == NULL) || r;
800  r = ((glMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2i")) == NULL) || r;
801  r = ((glMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2iv")) == NULL) || r;
802  r = ((glMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2s")) == NULL) || r;
803  r = ((glMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2sv")) == NULL) || r;
804  r = ((glMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3d")) == NULL) || r;
805  r = ((glMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3dv")) == NULL) || r;
806  r = ((glMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3f")) == NULL) || r;
807  r = ((glMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3fv")) == NULL) || r;
808  r = ((glMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3i")) == NULL) || r;
809  r = ((glMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3iv")) == NULL) || r;
810  r = ((glMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3s")) == NULL) || r;
811  r = ((glMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3sv")) == NULL) || r;
812  r = ((glMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4d")) == NULL) || r;
813  r = ((glMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4dv")) == NULL) || r;
814  r = ((glMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4f")) == NULL) || r;
815  r = ((glMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4fv")) == NULL) || r;
816  r = ((glMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4i")) == NULL) || r;
817  r = ((glMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4iv")) == NULL) || r;
818  r = ((glMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4s")) == NULL) || r;
819  r = ((glMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4sv")) == NULL) || r;
820  r = ((glSampleCoverage = (PFNGLSAMPLECOVERAGEPROC)glewGetProcAddress((const GLubyte*)"glSampleCoverage")) == NULL) || r;
821
822  return r;
823}
824
825#endif /* GL_VERSION_1_3 */
826
827#ifdef GL_VERSION_1_4
828
829static GLboolean _glewInit_GL_VERSION_1_4 (GLEW_CONTEXT_ARG_DEF_INIT)
830{
831  GLboolean r = GL_FALSE;
832
833  r = ((glBlendColor = (PFNGLBLENDCOLORPROC)glewGetProcAddress((const GLubyte*)"glBlendColor")) == NULL) || r;
834  r = ((glBlendEquation = (PFNGLBLENDEQUATIONPROC)glewGetProcAddress((const GLubyte*)"glBlendEquation")) == NULL) || r;
835  r = ((glBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glBlendFuncSeparate")) == NULL) || r;
836  r = ((glFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC)glewGetProcAddress((const GLubyte*)"glFogCoordPointer")) == NULL) || r;
837  r = ((glFogCoordd = (PFNGLFOGCOORDDPROC)glewGetProcAddress((const GLubyte*)"glFogCoordd")) == NULL) || r;
838  r = ((glFogCoorddv = (PFNGLFOGCOORDDVPROC)glewGetProcAddress((const GLubyte*)"glFogCoorddv")) == NULL) || r;
839  r = ((glFogCoordf = (PFNGLFOGCOORDFPROC)glewGetProcAddress((const GLubyte*)"glFogCoordf")) == NULL) || r;
840  r = ((glFogCoordfv = (PFNGLFOGCOORDFVPROC)glewGetProcAddress((const GLubyte*)"glFogCoordfv")) == NULL) || r;
841  r = ((glMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawArrays")) == NULL) || r;
842  r = ((glMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawElements")) == NULL) || r;
843  r = ((glPointParameterf = (PFNGLPOINTPARAMETERFPROC)glewGetProcAddress((const GLubyte*)"glPointParameterf")) == NULL) || r;
844  r = ((glPointParameterfv = (PFNGLPOINTPARAMETERFVPROC)glewGetProcAddress((const GLubyte*)"glPointParameterfv")) == NULL) || r;
845  r = ((glSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3b")) == NULL) || r;
846  r = ((glSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3bv")) == NULL) || r;
847  r = ((glSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3d")) == NULL) || r;
848  r = ((glSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3dv")) == NULL) || r;
849  r = ((glSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3f")) == NULL) || r;
850  r = ((glSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3fv")) == NULL) || r;
851  r = ((glSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3i")) == NULL) || r;
852  r = ((glSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3iv")) == NULL) || r;
853  r = ((glSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3s")) == NULL) || r;
854  r = ((glSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3sv")) == NULL) || r;
855  r = ((glSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ub")) == NULL) || r;
856  r = ((glSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ubv")) == NULL) || r;
857  r = ((glSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ui")) == NULL) || r;
858  r = ((glSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3uiv")) == NULL) || r;
859  r = ((glSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3us")) == NULL) || r;
860  r = ((glSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3usv")) == NULL) || r;
861  r = ((glSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColorPointer")) == NULL) || r;
862  r = ((glWindowPos2d = (PFNGLWINDOWPOS2DPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2d")) == NULL) || r;
863  r = ((glWindowPos2dv = (PFNGLWINDOWPOS2DVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2dv")) == NULL) || r;
864  r = ((glWindowPos2f = (PFNGLWINDOWPOS2FPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2f")) == NULL) || r;
865  r = ((glWindowPos2fv = (PFNGLWINDOWPOS2FVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2fv")) == NULL) || r;
866  r = ((glWindowPos2i = (PFNGLWINDOWPOS2IPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2i")) == NULL) || r;
867  r = ((glWindowPos2iv = (PFNGLWINDOWPOS2IVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2iv")) == NULL) || r;
868  r = ((glWindowPos2s = (PFNGLWINDOWPOS2SPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2s")) == NULL) || r;
869  r = ((glWindowPos2sv = (PFNGLWINDOWPOS2SVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos2sv")) == NULL) || r;
870  r = ((glWindowPos3d = (PFNGLWINDOWPOS3DPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3d")) == NULL) || r;
871  r = ((glWindowPos3dv = (PFNGLWINDOWPOS3DVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3dv")) == NULL) || r;
872  r = ((glWindowPos3f = (PFNGLWINDOWPOS3FPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3f")) == NULL) || r;
873  r = ((glWindowPos3fv = (PFNGLWINDOWPOS3FVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3fv")) == NULL) || r;
874  r = ((glWindowPos3i = (PFNGLWINDOWPOS3IPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3i")) == NULL) || r;
875  r = ((glWindowPos3iv = (PFNGLWINDOWPOS3IVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3iv")) == NULL) || r;
876  r = ((glWindowPos3s = (PFNGLWINDOWPOS3SPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3s")) == NULL) || r;
877  r = ((glWindowPos3sv = (PFNGLWINDOWPOS3SVPROC)glewGetProcAddress((const GLubyte*)"glWindowPos3sv")) == NULL) || r;
878
879  return r;
880}
881
882#endif /* GL_VERSION_1_4 */
883
884#ifdef GL_VERSION_1_5
885
886static GLboolean _glewInit_GL_VERSION_1_5 (GLEW_CONTEXT_ARG_DEF_INIT)
887{
888  GLboolean r = GL_FALSE;
889
890  r = ((glBeginQuery = (PFNGLBEGINQUERYPROC)glewGetProcAddress((const GLubyte*)"glBeginQuery")) == NULL) || r;
891  r = ((glBindBuffer = (PFNGLBINDBUFFERPROC)glewGetProcAddress((const GLubyte*)"glBindBuffer")) == NULL) || r;
892  r = ((glBufferData = (PFNGLBUFFERDATAPROC)glewGetProcAddress((const GLubyte*)"glBufferData")) == NULL) || r;
893  r = ((glBufferSubData = (PFNGLBUFFERSUBDATAPROC)glewGetProcAddress((const GLubyte*)"glBufferSubData")) == NULL) || r;
894  r = ((glDeleteBuffers = (PFNGLDELETEBUFFERSPROC)glewGetProcAddress((const GLubyte*)"glDeleteBuffers")) == NULL) || r;
895  r = ((glDeleteQueries = (PFNGLDELETEQUERIESPROC)glewGetProcAddress((const GLubyte*)"glDeleteQueries")) == NULL) || r;
896  r = ((glEndQuery = (PFNGLENDQUERYPROC)glewGetProcAddress((const GLubyte*)"glEndQuery")) == NULL) || r;
897  r = ((glGenBuffers = (PFNGLGENBUFFERSPROC)glewGetProcAddress((const GLubyte*)"glGenBuffers")) == NULL) || r;
898  r = ((glGenQueries = (PFNGLGENQUERIESPROC)glewGetProcAddress((const GLubyte*)"glGenQueries")) == NULL) || r;
899  r = ((glGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC)glewGetProcAddress((const GLubyte*)"glGetBufferParameteriv")) == NULL) || r;
900  r = ((glGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC)glewGetProcAddress((const GLubyte*)"glGetBufferPointerv")) == NULL) || r;
901  r = ((glGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC)glewGetProcAddress((const GLubyte*)"glGetBufferSubData")) == NULL) || r;
902  r = ((glGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC)glewGetProcAddress((const GLubyte*)"glGetQueryObjectiv")) == NULL) || r;
903  r = ((glGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC)glewGetProcAddress((const GLubyte*)"glGetQueryObjectuiv")) == NULL) || r;
904  r = ((glGetQueryiv = (PFNGLGETQUERYIVPROC)glewGetProcAddress((const GLubyte*)"glGetQueryiv")) == NULL) || r;
905  r = ((glIsBuffer = (PFNGLISBUFFERPROC)glewGetProcAddress((const GLubyte*)"glIsBuffer")) == NULL) || r;
906  r = ((glIsQuery = (PFNGLISQUERYPROC)glewGetProcAddress((const GLubyte*)"glIsQuery")) == NULL) || r;
907  r = ((glMapBuffer = (PFNGLMAPBUFFERPROC)glewGetProcAddress((const GLubyte*)"glMapBuffer")) == NULL) || r;
908  r = ((glUnmapBuffer = (PFNGLUNMAPBUFFERPROC)glewGetProcAddress((const GLubyte*)"glUnmapBuffer")) == NULL) || r;
909
910  return r;
911}
912
913#endif /* GL_VERSION_1_5 */
914
915#ifdef GL_VERSION_2_0
916
917static GLboolean _glewInit_GL_VERSION_2_0 (GLEW_CONTEXT_ARG_DEF_INIT)
918{
919  GLboolean r = GL_FALSE;
920
921  r = ((glAttachShader = (PFNGLATTACHSHADERPROC)glewGetProcAddress((const GLubyte*)"glAttachShader")) == NULL) || r;
922  r = ((glBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC)glewGetProcAddress((const GLubyte*)"glBindAttribLocation")) == NULL) || r;
923  r = ((glBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glBlendEquationSeparate")) == NULL) || r;
924  r = ((glCompileShader = (PFNGLCOMPILESHADERPROC)glewGetProcAddress((const GLubyte*)"glCompileShader")) == NULL) || r;
925  r = ((glCreateProgram = (PFNGLCREATEPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glCreateProgram")) == NULL) || r;
926  r = ((glCreateShader = (PFNGLCREATESHADERPROC)glewGetProcAddress((const GLubyte*)"glCreateShader")) == NULL) || r;
927  r = ((glDeleteProgram = (PFNGLDELETEPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glDeleteProgram")) == NULL) || r;
928  r = ((glDeleteShader = (PFNGLDELETESHADERPROC)glewGetProcAddress((const GLubyte*)"glDeleteShader")) == NULL) || r;
929  r = ((glDetachShader = (PFNGLDETACHSHADERPROC)glewGetProcAddress((const GLubyte*)"glDetachShader")) == NULL) || r;
930  r = ((glDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC)glewGetProcAddress((const GLubyte*)"glDisableVertexAttribArray")) == NULL) || r;
931  r = ((glDrawBuffers = (PFNGLDRAWBUFFERSPROC)glewGetProcAddress((const GLubyte*)"glDrawBuffers")) == NULL) || r;
932  r = ((glEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC)glewGetProcAddress((const GLubyte*)"glEnableVertexAttribArray")) == NULL) || r;
933  r = ((glGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC)glewGetProcAddress((const GLubyte*)"glGetActiveAttrib")) == NULL) || r;
934  r = ((glGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC)glewGetProcAddress((const GLubyte*)"glGetActiveUniform")) == NULL) || r;
935  r = ((glGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC)glewGetProcAddress((const GLubyte*)"glGetAttachedShaders")) == NULL) || r;
936  r = ((glGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC)glewGetProcAddress((const GLubyte*)"glGetAttribLocation")) == NULL) || r;
937  r = ((glGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC)glewGetProcAddress((const GLubyte*)"glGetProgramInfoLog")) == NULL) || r;
938  r = ((glGetProgramiv = (PFNGLGETPROGRAMIVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramiv")) == NULL) || r;
939  r = ((glGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC)glewGetProcAddress((const GLubyte*)"glGetShaderInfoLog")) == NULL) || r;
940  r = ((glGetShaderSource = (PFNGLGETSHADERSOURCEPROC)glewGetProcAddress((const GLubyte*)"glGetShaderSource")) == NULL) || r;
941  r = ((glGetShaderiv = (PFNGLGETSHADERIVPROC)glewGetProcAddress((const GLubyte*)"glGetShaderiv")) == NULL) || r;
942  r = ((glGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC)glewGetProcAddress((const GLubyte*)"glGetUniformLocation")) == NULL) || r;
943  r = ((glGetUniformfv = (PFNGLGETUNIFORMFVPROC)glewGetProcAddress((const GLubyte*)"glGetUniformfv")) == NULL) || r;
944  r = ((glGetUniformiv = (PFNGLGETUNIFORMIVPROC)glewGetProcAddress((const GLubyte*)"glGetUniformiv")) == NULL) || r;
945  r = ((glGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribPointerv")) == NULL) || r;
946  r = ((glGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribdv")) == NULL) || r;
947  r = ((glGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribfv")) == NULL) || r;
948  r = ((glGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribiv")) == NULL) || r;
949  r = ((glIsProgram = (PFNGLISPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glIsProgram")) == NULL) || r;
950  r = ((glIsShader = (PFNGLISSHADERPROC)glewGetProcAddress((const GLubyte*)"glIsShader")) == NULL) || r;
951  r = ((glLinkProgram = (PFNGLLINKPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glLinkProgram")) == NULL) || r;
952  r = ((glShaderSource = (PFNGLSHADERSOURCEPROC)glewGetProcAddress((const GLubyte*)"glShaderSource")) == NULL) || r;
953  r = ((glStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glStencilFuncSeparate")) == NULL) || r;
954  r = ((glStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glStencilMaskSeparate")) == NULL) || r;
955  r = ((glStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC)glewGetProcAddress((const GLubyte*)"glStencilOpSeparate")) == NULL) || r;
956  r = ((glUniform1f = (PFNGLUNIFORM1FPROC)glewGetProcAddress((const GLubyte*)"glUniform1f")) == NULL) || r;
957  r = ((glUniform1fv = (PFNGLUNIFORM1FVPROC)glewGetProcAddress((const GLubyte*)"glUniform1fv")) == NULL) || r;
958  r = ((glUniform1i = (PFNGLUNIFORM1IPROC)glewGetProcAddress((const GLubyte*)"glUniform1i")) == NULL) || r;
959  r = ((glUniform1iv = (PFNGLUNIFORM1IVPROC)glewGetProcAddress((const GLubyte*)"glUniform1iv")) == NULL) || r;
960  r = ((glUniform2f = (PFNGLUNIFORM2FPROC)glewGetProcAddress((const GLubyte*)"glUniform2f")) == NULL) || r;
961  r = ((glUniform2fv = (PFNGLUNIFORM2FVPROC)glewGetProcAddress((const GLubyte*)"glUniform2fv")) == NULL) || r;
962  r = ((glUniform2i = (PFNGLUNIFORM2IPROC)glewGetProcAddress((const GLubyte*)"glUniform2i")) == NULL) || r;
963  r = ((glUniform2iv = (PFNGLUNIFORM2IVPROC)glewGetProcAddress((const GLubyte*)"glUniform2iv")) == NULL) || r;
964  r = ((glUniform3f = (PFNGLUNIFORM3FPROC)glewGetProcAddress((const GLubyte*)"glUniform3f")) == NULL) || r;
965  r = ((glUniform3fv = (PFNGLUNIFORM3FVPROC)glewGetProcAddress((const GLubyte*)"glUniform3fv")) == NULL) || r;
966  r = ((glUniform3i = (PFNGLUNIFORM3IPROC)glewGetProcAddress((const GLubyte*)"glUniform3i")) == NULL) || r;
967  r = ((glUniform3iv = (PFNGLUNIFORM3IVPROC)glewGetProcAddress((const GLubyte*)"glUniform3iv")) == NULL) || r;
968  r = ((glUniform4f = (PFNGLUNIFORM4FPROC)glewGetProcAddress((const GLubyte*)"glUniform4f")) == NULL) || r;
969  r = ((glUniform4fv = (PFNGLUNIFORM4FVPROC)glewGetProcAddress((const GLubyte*)"glUniform4fv")) == NULL) || r;
970  r = ((glUniform4i = (PFNGLUNIFORM4IPROC)glewGetProcAddress((const GLubyte*)"glUniform4i")) == NULL) || r;
971  r = ((glUniform4iv = (PFNGLUNIFORM4IVPROC)glewGetProcAddress((const GLubyte*)"glUniform4iv")) == NULL) || r;
972  r = ((glUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix2fv")) == NULL) || r;
973  r = ((glUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix3fv")) == NULL) || r;
974  r = ((glUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix4fv")) == NULL) || r;
975  r = ((glUseProgram = (PFNGLUSEPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glUseProgram")) == NULL) || r;
976  r = ((glValidateProgram = (PFNGLVALIDATEPROGRAMPROC)glewGetProcAddress((const GLubyte*)"glValidateProgram")) == NULL) || r;
977  r = ((glVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1d")) == NULL) || r;
978  r = ((glVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dv")) == NULL) || r;
979  r = ((glVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1f")) == NULL) || r;
980  r = ((glVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fv")) == NULL) || r;
981  r = ((glVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1s")) == NULL) || r;
982  r = ((glVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1sv")) == NULL) || r;
983  r = ((glVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2d")) == NULL) || r;
984  r = ((glVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dv")) == NULL) || r;
985  r = ((glVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2f")) == NULL) || r;
986  r = ((glVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fv")) == NULL) || r;
987  r = ((glVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2s")) == NULL) || r;
988  r = ((glVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2sv")) == NULL) || r;
989  r = ((glVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3d")) == NULL) || r;
990  r = ((glVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dv")) == NULL) || r;
991  r = ((glVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3f")) == NULL) || r;
992  r = ((glVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fv")) == NULL) || r;
993  r = ((glVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3s")) == NULL) || r;
994  r = ((glVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3sv")) == NULL) || r;
995  r = ((glVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nbv")) == NULL) || r;
996  r = ((glVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Niv")) == NULL) || r;
997  r = ((glVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nsv")) == NULL) || r;
998  r = ((glVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nub")) == NULL) || r;
999  r = ((glVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nubv")) == NULL) || r;
1000  r = ((glVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nuiv")) == NULL) || r;
1001  r = ((glVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4Nusv")) == NULL) || r;
1002  r = ((glVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4bv")) == NULL) || r;
1003  r = ((glVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4d")) == NULL) || r;
1004  r = ((glVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dv")) == NULL) || r;
1005  r = ((glVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4f")) == NULL) || r;
1006  r = ((glVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fv")) == NULL) || r;
1007  r = ((glVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4iv")) == NULL) || r;
1008  r = ((glVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4s")) == NULL) || r;
1009  r = ((glVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4sv")) == NULL) || r;
1010  r = ((glVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ubv")) == NULL) || r;
1011  r = ((glVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4uiv")) == NULL) || r;
1012  r = ((glVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4usv")) == NULL) || r;
1013  r = ((glVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribPointer")) == NULL) || r;
1014
1015  return r;
1016}
1017
1018#endif /* GL_VERSION_2_0 */
1019
1020#ifdef GL_ARB_draw_buffers
1021
1022static GLboolean _glewInit_GL_ARB_draw_buffers (GLEW_CONTEXT_ARG_DEF_INIT)
1023{
1024  GLboolean r = GL_FALSE;
1025
1026  r = ((glDrawBuffersARB = (PFNGLDRAWBUFFERSARBPROC)glewGetProcAddress((const GLubyte*)"glDrawBuffersARB")) == NULL) || r;
1027
1028  return r;
1029}
1030
1031#endif /* GL_ARB_draw_buffers */
1032
1033#ifdef GL_ARB_fragment_program
1034
1035#endif /* GL_ARB_fragment_program */
1036
1037#ifdef GL_ARB_fragment_shader
1038
1039#endif /* GL_ARB_fragment_shader */
1040
1041#ifdef GL_ARB_half_float_pixel
1042
1043#endif /* GL_ARB_half_float_pixel */
1044
1045#ifdef GL_ARB_multisample
1046
1047static GLboolean _glewInit_GL_ARB_multisample (GLEW_CONTEXT_ARG_DEF_INIT)
1048{
1049  GLboolean r = GL_FALSE;
1050
1051  r = ((glSampleCoverageARB = (PFNGLSAMPLECOVERAGEARBPROC)glewGetProcAddress((const GLubyte*)"glSampleCoverageARB")) == NULL) || r;
1052
1053  return r;
1054}
1055
1056#endif /* GL_ARB_multisample */
1057
1058#ifdef GL_ARB_multitexture
1059
1060static GLboolean _glewInit_GL_ARB_multitexture (GLEW_CONTEXT_ARG_DEF_INIT)
1061{
1062  GLboolean r = GL_FALSE;
1063
1064  r = ((glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC)glewGetProcAddress((const GLubyte*)"glActiveTextureARB")) == NULL) || r;
1065  r = ((glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)glewGetProcAddress((const GLubyte*)"glClientActiveTextureARB")) == NULL) || r;
1066  r = ((glMultiTexCoord1dARB = (PFNGLMULTITEXCOORD1DARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1dARB")) == NULL) || r;
1067  r = ((glMultiTexCoord1dvARB = (PFNGLMULTITEXCOORD1DVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1dvARB")) == NULL) || r;
1068  r = ((glMultiTexCoord1fARB = (PFNGLMULTITEXCOORD1FARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1fARB")) == NULL) || r;
1069  r = ((glMultiTexCoord1fvARB = (PFNGLMULTITEXCOORD1FVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1fvARB")) == NULL) || r;
1070  r = ((glMultiTexCoord1iARB = (PFNGLMULTITEXCOORD1IARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1iARB")) == NULL) || r;
1071  r = ((glMultiTexCoord1ivARB = (PFNGLMULTITEXCOORD1IVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1ivARB")) == NULL) || r;
1072  r = ((glMultiTexCoord1sARB = (PFNGLMULTITEXCOORD1SARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1sARB")) == NULL) || r;
1073  r = ((glMultiTexCoord1svARB = (PFNGLMULTITEXCOORD1SVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord1svARB")) == NULL) || r;
1074  r = ((glMultiTexCoord2dARB = (PFNGLMULTITEXCOORD2DARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2dARB")) == NULL) || r;
1075  r = ((glMultiTexCoord2dvARB = (PFNGLMULTITEXCOORD2DVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2dvARB")) == NULL) || r;
1076  r = ((glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2fARB")) == NULL) || r;
1077  r = ((glMultiTexCoord2fvARB = (PFNGLMULTITEXCOORD2FVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2fvARB")) == NULL) || r;
1078  r = ((glMultiTexCoord2iARB = (PFNGLMULTITEXCOORD2IARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2iARB")) == NULL) || r;
1079  r = ((glMultiTexCoord2ivARB = (PFNGLMULTITEXCOORD2IVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2ivARB")) == NULL) || r;
1080  r = ((glMultiTexCoord2sARB = (PFNGLMULTITEXCOORD2SARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2sARB")) == NULL) || r;
1081  r = ((glMultiTexCoord2svARB = (PFNGLMULTITEXCOORD2SVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord2svARB")) == NULL) || r;
1082  r = ((glMultiTexCoord3dARB = (PFNGLMULTITEXCOORD3DARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3dARB")) == NULL) || r;
1083  r = ((glMultiTexCoord3dvARB = (PFNGLMULTITEXCOORD3DVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3dvARB")) == NULL) || r;
1084  r = ((glMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3fARB")) == NULL) || r;
1085  r = ((glMultiTexCoord3fvARB = (PFNGLMULTITEXCOORD3FVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3fvARB")) == NULL) || r;
1086  r = ((glMultiTexCoord3iARB = (PFNGLMULTITEXCOORD3IARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3iARB")) == NULL) || r;
1087  r = ((glMultiTexCoord3ivARB = (PFNGLMULTITEXCOORD3IVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3ivARB")) == NULL) || r;
1088  r = ((glMultiTexCoord3sARB = (PFNGLMULTITEXCOORD3SARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3sARB")) == NULL) || r;
1089  r = ((glMultiTexCoord3svARB = (PFNGLMULTITEXCOORD3SVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord3svARB")) == NULL) || r;
1090  r = ((glMultiTexCoord4dARB = (PFNGLMULTITEXCOORD4DARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4dARB")) == NULL) || r;
1091  r = ((glMultiTexCoord4dvARB = (PFNGLMULTITEXCOORD4DVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4dvARB")) == NULL) || r;
1092  r = ((glMultiTexCoord4fARB = (PFNGLMULTITEXCOORD4FARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4fARB")) == NULL) || r;
1093  r = ((glMultiTexCoord4fvARB = (PFNGLMULTITEXCOORD4FVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4fvARB")) == NULL) || r;
1094  r = ((glMultiTexCoord4iARB = (PFNGLMULTITEXCOORD4IARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4iARB")) == NULL) || r;
1095  r = ((glMultiTexCoord4ivARB = (PFNGLMULTITEXCOORD4IVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4ivARB")) == NULL) || r;
1096  r = ((glMultiTexCoord4sARB = (PFNGLMULTITEXCOORD4SARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4sARB")) == NULL) || r;
1097  r = ((glMultiTexCoord4svARB = (PFNGLMULTITEXCOORD4SVARBPROC)glewGetProcAddress((const GLubyte*)"glMultiTexCoord4svARB")) == NULL) || r;
1098
1099  return r;
1100}
1101
1102#endif /* GL_ARB_multitexture */
1103
1104#ifdef GL_ARB_occlusion_query
1105
1106static GLboolean _glewInit_GL_ARB_occlusion_query (GLEW_CONTEXT_ARG_DEF_INIT)
1107{
1108  GLboolean r = GL_FALSE;
1109
1110  r = ((glBeginQueryARB = (PFNGLBEGINQUERYARBPROC)glewGetProcAddress((const GLubyte*)"glBeginQueryARB")) == NULL) || r;
1111  r = ((glDeleteQueriesARB = (PFNGLDELETEQUERIESARBPROC)glewGetProcAddress((const GLubyte*)"glDeleteQueriesARB")) == NULL) || r;
1112  r = ((glEndQueryARB = (PFNGLENDQUERYARBPROC)glewGetProcAddress((const GLubyte*)"glEndQueryARB")) == NULL) || r;
1113  r = ((glGenQueriesARB = (PFNGLGENQUERIESARBPROC)glewGetProcAddress((const GLubyte*)"glGenQueriesARB")) == NULL) || r;
1114  r = ((glGetQueryObjectivARB = (PFNGLGETQUERYOBJECTIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetQueryObjectivARB")) == NULL) || r;
1115  r = ((glGetQueryObjectuivARB = (PFNGLGETQUERYOBJECTUIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetQueryObjectuivARB")) == NULL) || r;
1116  r = ((glGetQueryivARB = (PFNGLGETQUERYIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetQueryivARB")) == NULL) || r;
1117  r = ((glIsQueryARB = (PFNGLISQUERYARBPROC)glewGetProcAddress((const GLubyte*)"glIsQueryARB")) == NULL) || r;
1118
1119  return r;
1120}
1121
1122#endif /* GL_ARB_occlusion_query */
1123
1124#ifdef GL_ARB_shader_objects
1125
1126static GLboolean _glewInit_GL_ARB_shader_objects (GLEW_CONTEXT_ARG_DEF_INIT)
1127{
1128  GLboolean r = GL_FALSE;
1129
1130  r = ((glAttachObjectARB = (PFNGLATTACHOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glAttachObjectARB")) == NULL) || r;
1131  r = ((glCompileShaderARB = (PFNGLCOMPILESHADERARBPROC)glewGetProcAddress((const GLubyte*)"glCompileShaderARB")) == NULL) || r;
1132  r = ((glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glCreateProgramObjectARB")) == NULL) || r;
1133  r = ((glCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glCreateShaderObjectARB")) == NULL) || r;
1134  r = ((glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glDeleteObjectARB")) == NULL) || r;
1135  r = ((glDetachObjectARB = (PFNGLDETACHOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glDetachObjectARB")) == NULL) || r;
1136  r = ((glGetActiveUniformARB = (PFNGLGETACTIVEUNIFORMARBPROC)glewGetProcAddress((const GLubyte*)"glGetActiveUniformARB")) == NULL) || r;
1137  r = ((glGetAttachedObjectsARB = (PFNGLGETATTACHEDOBJECTSARBPROC)glewGetProcAddress((const GLubyte*)"glGetAttachedObjectsARB")) == NULL) || r;
1138  r = ((glGetHandleARB = (PFNGLGETHANDLEARBPROC)glewGetProcAddress((const GLubyte*)"glGetHandleARB")) == NULL) || r;
1139  r = ((glGetInfoLogARB = (PFNGLGETINFOLOGARBPROC)glewGetProcAddress((const GLubyte*)"glGetInfoLogARB")) == NULL) || r;
1140  r = ((glGetObjectParameterfvARB = (PFNGLGETOBJECTPARAMETERFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetObjectParameterfvARB")) == NULL) || r;
1141  r = ((glGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetObjectParameterivARB")) == NULL) || r;
1142  r = ((glGetShaderSourceARB = (PFNGLGETSHADERSOURCEARBPROC)glewGetProcAddress((const GLubyte*)"glGetShaderSourceARB")) == NULL) || r;
1143  r = ((glGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC)glewGetProcAddress((const GLubyte*)"glGetUniformLocationARB")) == NULL) || r;
1144  r = ((glGetUniformfvARB = (PFNGLGETUNIFORMFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetUniformfvARB")) == NULL) || r;
1145  r = ((glGetUniformivARB = (PFNGLGETUNIFORMIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetUniformivARB")) == NULL) || r;
1146  r = ((glLinkProgramARB = (PFNGLLINKPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glLinkProgramARB")) == NULL) || r;
1147  r = ((glShaderSourceARB = (PFNGLSHADERSOURCEARBPROC)glewGetProcAddress((const GLubyte*)"glShaderSourceARB")) == NULL) || r;
1148  r = ((glUniform1fARB = (PFNGLUNIFORM1FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1fARB")) == NULL) || r;
1149  r = ((glUniform1fvARB = (PFNGLUNIFORM1FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1fvARB")) == NULL) || r;
1150  r = ((glUniform1iARB = (PFNGLUNIFORM1IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1iARB")) == NULL) || r;
1151  r = ((glUniform1ivARB = (PFNGLUNIFORM1IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform1ivARB")) == NULL) || r;
1152  r = ((glUniform2fARB = (PFNGLUNIFORM2FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2fARB")) == NULL) || r;
1153  r = ((glUniform2fvARB = (PFNGLUNIFORM2FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2fvARB")) == NULL) || r;
1154  r = ((glUniform2iARB = (PFNGLUNIFORM2IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2iARB")) == NULL) || r;
1155  r = ((glUniform2ivARB = (PFNGLUNIFORM2IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform2ivARB")) == NULL) || r;
1156  r = ((glUniform3fARB = (PFNGLUNIFORM3FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3fARB")) == NULL) || r;
1157  r = ((glUniform3fvARB = (PFNGLUNIFORM3FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3fvARB")) == NULL) || r;
1158  r = ((glUniform3iARB = (PFNGLUNIFORM3IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3iARB")) == NULL) || r;
1159  r = ((glUniform3ivARB = (PFNGLUNIFORM3IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform3ivARB")) == NULL) || r;
1160  r = ((glUniform4fARB = (PFNGLUNIFORM4FARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4fARB")) == NULL) || r;
1161  r = ((glUniform4fvARB = (PFNGLUNIFORM4FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4fvARB")) == NULL) || r;
1162  r = ((glUniform4iARB = (PFNGLUNIFORM4IARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4iARB")) == NULL) || r;
1163  r = ((glUniform4ivARB = (PFNGLUNIFORM4IVARBPROC)glewGetProcAddress((const GLubyte*)"glUniform4ivARB")) == NULL) || r;
1164  r = ((glUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix2fvARB")) == NULL) || r;
1165  r = ((glUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix3fvARB")) == NULL) || r;
1166  r = ((glUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC)glewGetProcAddress((const GLubyte*)"glUniformMatrix4fvARB")) == NULL) || r;
1167  r = ((glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)glewGetProcAddress((const GLubyte*)"glUseProgramObjectARB")) == NULL) || r;
1168  r = ((glValidateProgramARB = (PFNGLVALIDATEPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glValidateProgramARB")) == NULL) || r;
1169
1170  return r;
1171}
1172
1173#endif /* GL_ARB_shader_objects */
1174
1175#ifdef GL_ARB_shading_language_100
1176
1177#endif /* GL_ARB_shading_language_100 */
1178
1179#ifdef GL_ARB_texture_compression
1180
1181static GLboolean _glewInit_GL_ARB_texture_compression (GLEW_CONTEXT_ARG_DEF_INIT)
1182{
1183  GLboolean r = GL_FALSE;
1184
1185  r = ((glCompressedTexImage1DARB = (PFNGLCOMPRESSEDTEXIMAGE1DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage1DARB")) == NULL) || r;
1186  r = ((glCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage2DARB")) == NULL) || r;
1187  r = ((glCompressedTexImage3DARB = (PFNGLCOMPRESSEDTEXIMAGE3DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexImage3DARB")) == NULL) || r;
1188  r = ((glCompressedTexSubImage1DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage1DARB")) == NULL) || r;
1189  r = ((glCompressedTexSubImage2DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage2DARB")) == NULL) || r;
1190  r = ((glCompressedTexSubImage3DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC)glewGetProcAddress((const GLubyte*)"glCompressedTexSubImage3DARB")) == NULL) || r;
1191  r = ((glGetCompressedTexImageARB = (PFNGLGETCOMPRESSEDTEXIMAGEARBPROC)glewGetProcAddress((const GLubyte*)"glGetCompressedTexImageARB")) == NULL) || r;
1192
1193  return r;
1194}
1195
1196#endif /* GL_ARB_texture_compression */
1197
1198#ifdef GL_ARB_texture_cube_map
1199
1200#endif /* GL_ARB_texture_cube_map */
1201
1202#ifdef GL_ARB_texture_env_combine
1203
1204#endif /* GL_ARB_texture_env_combine */
1205
1206#ifdef GL_ARB_texture_env_dot3
1207
1208#endif /* GL_ARB_texture_env_dot3 */
1209
1210#ifdef GL_ARB_texture_float
1211
1212#endif /* GL_ARB_texture_float */
1213
1214#ifdef GL_ARB_texture_non_power_of_two
1215
1216#endif /* GL_ARB_texture_non_power_of_two */
1217
1218#ifdef GL_ARB_vertex_buffer_object
1219
1220static GLboolean _glewInit_GL_ARB_vertex_buffer_object (GLEW_CONTEXT_ARG_DEF_INIT)
1221{
1222  GLboolean r = GL_FALSE;
1223
1224  r = ((glBindBufferARB = (PFNGLBINDBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"glBindBufferARB")) == NULL) || r;
1225  r = ((glBufferDataARB = (PFNGLBUFFERDATAARBPROC)glewGetProcAddress((const GLubyte*)"glBufferDataARB")) == NULL) || r;
1226  r = ((glBufferSubDataARB = (PFNGLBUFFERSUBDATAARBPROC)glewGetProcAddress((const GLubyte*)"glBufferSubDataARB")) == NULL) || r;
1227  r = ((glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC)glewGetProcAddress((const GLubyte*)"glDeleteBuffersARB")) == NULL) || r;
1228  r = ((glGenBuffersARB = (PFNGLGENBUFFERSARBPROC)glewGetProcAddress((const GLubyte*)"glGenBuffersARB")) == NULL) || r;
1229  r = ((glGetBufferParameterivARB = (PFNGLGETBUFFERPARAMETERIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetBufferParameterivARB")) == NULL) || r;
1230  r = ((glGetBufferPointervARB = (PFNGLGETBUFFERPOINTERVARBPROC)glewGetProcAddress((const GLubyte*)"glGetBufferPointervARB")) == NULL) || r;
1231  r = ((glGetBufferSubDataARB = (PFNGLGETBUFFERSUBDATAARBPROC)glewGetProcAddress((const GLubyte*)"glGetBufferSubDataARB")) == NULL) || r;
1232  r = ((glIsBufferARB = (PFNGLISBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"glIsBufferARB")) == NULL) || r;
1233  r = ((glMapBufferARB = (PFNGLMAPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"glMapBufferARB")) == NULL) || r;
1234  r = ((glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"glUnmapBufferARB")) == NULL) || r;
1235
1236  return r;
1237}
1238
1239#endif /* GL_ARB_vertex_buffer_object */
1240
1241#ifdef GL_ARB_vertex_program
1242
1243static GLboolean _glewInit_GL_ARB_vertex_program (GLEW_CONTEXT_ARG_DEF_INIT)
1244{
1245  GLboolean r = GL_FALSE;
1246
1247  r = ((glBindProgramARB = (PFNGLBINDPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glBindProgramARB")) == NULL) || r;
1248  r = ((glDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC)glewGetProcAddress((const GLubyte*)"glDeleteProgramsARB")) == NULL) || r;
1249  r = ((glDisableVertexAttribArrayARB = (PFNGLDISABLEVERTEXATTRIBARRAYARBPROC)glewGetProcAddress((const GLubyte*)"glDisableVertexAttribArrayARB")) == NULL) || r;
1250  r = ((glEnableVertexAttribArrayARB = (PFNGLENABLEVERTEXATTRIBARRAYARBPROC)glewGetProcAddress((const GLubyte*)"glEnableVertexAttribArrayARB")) == NULL) || r;
1251  r = ((glGenProgramsARB = (PFNGLGENPROGRAMSARBPROC)glewGetProcAddress((const GLubyte*)"glGenProgramsARB")) == NULL) || r;
1252  r = ((glGetProgramEnvParameterdvARB = (PFNGLGETPROGRAMENVPARAMETERDVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramEnvParameterdvARB")) == NULL) || r;
1253  r = ((glGetProgramEnvParameterfvARB = (PFNGLGETPROGRAMENVPARAMETERFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramEnvParameterfvARB")) == NULL) || r;
1254  r = ((glGetProgramLocalParameterdvARB = (PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramLocalParameterdvARB")) == NULL) || r;
1255  r = ((glGetProgramLocalParameterfvARB = (PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramLocalParameterfvARB")) == NULL) || r;
1256  r = ((glGetProgramStringARB = (PFNGLGETPROGRAMSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramStringARB")) == NULL) || r;
1257  r = ((glGetProgramivARB = (PFNGLGETPROGRAMIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetProgramivARB")) == NULL) || r;
1258  r = ((glGetVertexAttribPointervARB = (PFNGLGETVERTEXATTRIBPOINTERVARBPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribPointervARB")) == NULL) || r;
1259  r = ((glGetVertexAttribdvARB = (PFNGLGETVERTEXATTRIBDVARBPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribdvARB")) == NULL) || r;
1260  r = ((glGetVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribfvARB")) == NULL) || r;
1261  r = ((glGetVertexAttribivARB = (PFNGLGETVERTEXATTRIBIVARBPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribivARB")) == NULL) || r;
1262  r = ((glIsProgramARB = (PFNGLISPROGRAMARBPROC)glewGetProcAddress((const GLubyte*)"glIsProgramARB")) == NULL) || r;
1263  r = ((glProgramEnvParameter4dARB = (PFNGLPROGRAMENVPARAMETER4DARBPROC)glewGetProcAddress((const GLubyte*)"glProgramEnvParameter4dARB")) == NULL) || r;
1264  r = ((glProgramEnvParameter4dvARB = (PFNGLPROGRAMENVPARAMETER4DVARBPROC)glewGetProcAddress((const GLubyte*)"glProgramEnvParameter4dvARB")) == NULL) || r;
1265  r = ((glProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC)glewGetProcAddress((const GLubyte*)"glProgramEnvParameter4fARB")) == NULL) || r;
1266  r = ((glProgramEnvParameter4fvARB = (PFNGLPROGRAMENVPARAMETER4FVARBPROC)glewGetProcAddress((const GLubyte*)"glProgramEnvParameter4fvARB")) == NULL) || r;
1267  r = ((glProgramLocalParameter4dARB = (PFNGLPROGRAMLOCALPARAMETER4DARBPROC)glewGetProcAddress((const GLubyte*)"glProgramLocalParameter4dARB")) == NULL) || r;
1268  r = ((glProgramLocalParameter4dvARB = (PFNGLPROGRAMLOCALPARAMETER4DVARBPROC)glewGetProcAddress((const GLubyte*)"glProgramLocalParameter4dvARB")) == NULL) || r;
1269  r = ((glProgramLocalParameter4fARB = (PFNGLPROGRAMLOCALPARAMETER4FARBPROC)glewGetProcAddress((const GLubyte*)"glProgramLocalParameter4fARB")) == NULL) || r;
1270  r = ((glProgramLocalParameter4fvARB = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC)glewGetProcAddress((const GLubyte*)"glProgramLocalParameter4fvARB")) == NULL) || r;
1271  r = ((glProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"glProgramStringARB")) == NULL) || r;
1272  r = ((glVertexAttrib1dARB = (PFNGLVERTEXATTRIB1DARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dARB")) == NULL) || r;
1273  r = ((glVertexAttrib1dvARB = (PFNGLVERTEXATTRIB1DVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dvARB")) == NULL) || r;
1274  r = ((glVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fARB")) == NULL) || r;
1275  r = ((glVertexAttrib1fvARB = (PFNGLVERTEXATTRIB1FVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fvARB")) == NULL) || r;
1276  r = ((glVertexAttrib1sARB = (PFNGLVERTEXATTRIB1SARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1sARB")) == NULL) || r;
1277  r = ((glVertexAttrib1svARB = (PFNGLVERTEXATTRIB1SVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1svARB")) == NULL) || r;
1278  r = ((glVertexAttrib2dARB = (PFNGLVERTEXATTRIB2DARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dARB")) == NULL) || r;
1279  r = ((glVertexAttrib2dvARB = (PFNGLVERTEXATTRIB2DVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dvARB")) == NULL) || r;
1280  r = ((glVertexAttrib2fARB = (PFNGLVERTEXATTRIB2FARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fARB")) == NULL) || r;
1281  r = ((glVertexAttrib2fvARB = (PFNGLVERTEXATTRIB2FVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fvARB")) == NULL) || r;
1282  r = ((glVertexAttrib2sARB = (PFNGLVERTEXATTRIB2SARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2sARB")) == NULL) || r;
1283  r = ((glVertexAttrib2svARB = (PFNGLVERTEXATTRIB2SVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2svARB")) == NULL) || r;
1284  r = ((glVertexAttrib3dARB = (PFNGLVERTEXATTRIB3DARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dARB")) == NULL) || r;
1285  r = ((glVertexAttrib3dvARB = (PFNGLVERTEXATTRIB3DVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dvARB")) == NULL) || r;
1286  r = ((glVertexAttrib3fARB = (PFNGLVERTEXATTRIB3FARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fARB")) == NULL) || r;
1287  r = ((glVertexAttrib3fvARB = (PFNGLVERTEXATTRIB3FVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fvARB")) == NULL) || r;
1288  r = ((glVertexAttrib3sARB = (PFNGLVERTEXATTRIB3SARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3sARB")) == NULL) || r;
1289  r = ((glVertexAttrib3svARB = (PFNGLVERTEXATTRIB3SVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3svARB")) == NULL) || r;
1290  r = ((glVertexAttrib4NbvARB = (PFNGLVERTEXATTRIB4NBVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NbvARB")) == NULL) || r;
1291  r = ((glVertexAttrib4NivARB = (PFNGLVERTEXATTRIB4NIVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NivARB")) == NULL) || r;
1292  r = ((glVertexAttrib4NsvARB = (PFNGLVERTEXATTRIB4NSVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NsvARB")) == NULL) || r;
1293  r = ((glVertexAttrib4NubARB = (PFNGLVERTEXATTRIB4NUBARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NubARB")) == NULL) || r;
1294  r = ((glVertexAttrib4NubvARB = (PFNGLVERTEXATTRIB4NUBVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NubvARB")) == NULL) || r;
1295  r = ((glVertexAttrib4NuivARB = (PFNGLVERTEXATTRIB4NUIVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NuivARB")) == NULL) || r;
1296  r = ((glVertexAttrib4NusvARB = (PFNGLVERTEXATTRIB4NUSVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4NusvARB")) == NULL) || r;
1297  r = ((glVertexAttrib4bvARB = (PFNGLVERTEXATTRIB4BVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4bvARB")) == NULL) || r;
1298  r = ((glVertexAttrib4dARB = (PFNGLVERTEXATTRIB4DARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dARB")) == NULL) || r;
1299  r = ((glVertexAttrib4dvARB = (PFNGLVERTEXATTRIB4DVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dvARB")) == NULL) || r;
1300  r = ((glVertexAttrib4fARB = (PFNGLVERTEXATTRIB4FARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fARB")) == NULL) || r;
1301  r = ((glVertexAttrib4fvARB = (PFNGLVERTEXATTRIB4FVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fvARB")) == NULL) || r;
1302  r = ((glVertexAttrib4ivARB = (PFNGLVERTEXATTRIB4IVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ivARB")) == NULL) || r;
1303  r = ((glVertexAttrib4sARB = (PFNGLVERTEXATTRIB4SARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4sARB")) == NULL) || r;
1304  r = ((glVertexAttrib4svARB = (PFNGLVERTEXATTRIB4SVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4svARB")) == NULL) || r;
1305  r = ((glVertexAttrib4ubvARB = (PFNGLVERTEXATTRIB4UBVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ubvARB")) == NULL) || r;
1306  r = ((glVertexAttrib4uivARB = (PFNGLVERTEXATTRIB4UIVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4uivARB")) == NULL) || r;
1307  r = ((glVertexAttrib4usvARB = (PFNGLVERTEXATTRIB4USVARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4usvARB")) == NULL) || r;
1308  r = ((glVertexAttribPointerARB = (PFNGLVERTEXATTRIBPOINTERARBPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribPointerARB")) == NULL) || r;
1309
1310  return r;
1311}
1312
1313#endif /* GL_ARB_vertex_program */
1314
1315#ifdef GL_ARB_vertex_shader
1316
1317static GLboolean _glewInit_GL_ARB_vertex_shader (GLEW_CONTEXT_ARG_DEF_INIT)
1318{
1319  GLboolean r = GL_FALSE;
1320
1321  r = ((glBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC)glewGetProcAddress((const GLubyte*)"glBindAttribLocationARB")) == NULL) || r;
1322  r = ((glGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC)glewGetProcAddress((const GLubyte*)"glGetActiveAttribARB")) == NULL) || r;
1323  r = ((glGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC)glewGetProcAddress((const GLubyte*)"glGetAttribLocationARB")) == NULL) || r;
1324
1325  return r;
1326}
1327
1328#endif /* GL_ARB_vertex_shader */
1329
1330#ifdef GL_ATI_draw_buffers
1331
1332static GLboolean _glewInit_GL_ATI_draw_buffers (GLEW_CONTEXT_ARG_DEF_INIT)
1333{
1334  GLboolean r = GL_FALSE;
1335
1336  r = ((glDrawBuffersATI = (PFNGLDRAWBUFFERSATIPROC)glewGetProcAddress((const GLubyte*)"glDrawBuffersATI")) == NULL) || r;
1337
1338  return r;
1339}
1340
1341#endif /* GL_ATI_draw_buffers */
1342
1343#ifdef GL_ATI_fragment_shader
1344
1345static GLboolean _glewInit_GL_ATI_fragment_shader (GLEW_CONTEXT_ARG_DEF_INIT)
1346{
1347  GLboolean r = GL_FALSE;
1348
1349  r = ((glAlphaFragmentOp1ATI = (PFNGLALPHAFRAGMENTOP1ATIPROC)glewGetProcAddress((const GLubyte*)"glAlphaFragmentOp1ATI")) == NULL) || r;
1350  r = ((glAlphaFragmentOp2ATI = (PFNGLALPHAFRAGMENTOP2ATIPROC)glewGetProcAddress((const GLubyte*)"glAlphaFragmentOp2ATI")) == NULL) || r;
1351  r = ((glAlphaFragmentOp3ATI = (PFNGLALPHAFRAGMENTOP3ATIPROC)glewGetProcAddress((const GLubyte*)"glAlphaFragmentOp3ATI")) == NULL) || r;
1352  r = ((glBeginFragmentShaderATI = (PFNGLBEGINFRAGMENTSHADERATIPROC)glewGetProcAddress((const GLubyte*)"glBeginFragmentShaderATI")) == NULL) || r;
1353  r = ((glBindFragmentShaderATI = (PFNGLBINDFRAGMENTSHADERATIPROC)glewGetProcAddress((const GLubyte*)"glBindFragmentShaderATI")) == NULL) || r;
1354  r = ((glColorFragmentOp1ATI = (PFNGLCOLORFRAGMENTOP1ATIPROC)glewGetProcAddress((const GLubyte*)"glColorFragmentOp1ATI")) == NULL) || r;
1355  r = ((glColorFragmentOp2ATI = (PFNGLCOLORFRAGMENTOP2ATIPROC)glewGetProcAddress((const GLubyte*)"glColorFragmentOp2ATI")) == NULL) || r;
1356  r = ((glColorFragmentOp3ATI = (PFNGLCOLORFRAGMENTOP3ATIPROC)glewGetProcAddress((const GLubyte*)"glColorFragmentOp3ATI")) == NULL) || r;
1357  r = ((glDeleteFragmentShaderATI = (PFNGLDELETEFRAGMENTSHADERATIPROC)glewGetProcAddress((const GLubyte*)"glDeleteFragmentShaderATI")) == NULL) || r;
1358  r = ((glEndFragmentShaderATI = (PFNGLENDFRAGMENTSHADERATIPROC)glewGetProcAddress((const GLubyte*)"glEndFragmentShaderATI")) == NULL) || r;
1359  r = ((glGenFragmentShadersATI = (PFNGLGENFRAGMENTSHADERSATIPROC)glewGetProcAddress((const GLubyte*)"glGenFragmentShadersATI")) == NULL) || r;
1360  r = ((glPassTexCoordATI = (PFNGLPASSTEXCOORDATIPROC)glewGetProcAddress((const GLubyte*)"glPassTexCoordATI")) == NULL) || r;
1361  r = ((glSampleMapATI = (PFNGLSAMPLEMAPATIPROC)glewGetProcAddress((const GLubyte*)"glSampleMapATI")) == NULL) || r;
1362  r = ((glSetFragmentShaderConstantATI = (PFNGLSETFRAGMENTSHADERCONSTANTATIPROC)glewGetProcAddress((const GLubyte*)"glSetFragmentShaderConstantATI")) == NULL) || r;
1363
1364  return r;
1365}
1366
1367#endif /* GL_ATI_fragment_shader */
1368
1369#ifdef GL_ATI_texture_float
1370
1371#endif /* GL_ATI_texture_float */
1372
1373#ifdef GL_EXT_framebuffer_object
1374
1375static GLboolean _glewInit_GL_EXT_framebuffer_object (GLEW_CONTEXT_ARG_DEF_INIT)
1376{
1377  GLboolean r = GL_FALSE;
1378
1379  r = ((glBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindFramebufferEXT")) == NULL) || r;
1380  r = ((glBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glBindRenderbufferEXT")) == NULL) || r;
1381  r = ((glCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)glewGetProcAddress((const GLubyte*)"glCheckFramebufferStatusEXT")) == NULL) || r;
1382  r = ((glDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteFramebuffersEXT")) == NULL) || r;
1383  r = ((glDeleteRenderbuffersEXT = (PFNGLDELETERENDERBUFFERSEXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteRenderbuffersEXT")) == NULL) || r;
1384  r = ((glFramebufferRenderbufferEXT = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glFramebufferRenderbufferEXT")) == NULL) || r;
1385  r = ((glFramebufferTexture1DEXT = (PFNGLFRAMEBUFFERTEXTURE1DEXTPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture1DEXT")) == NULL) || r;
1386  r = ((glFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture2DEXT")) == NULL) || r;
1387  r = ((glFramebufferTexture3DEXT = (PFNGLFRAMEBUFFERTEXTURE3DEXTPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture3DEXT")) == NULL) || r;
1388  r = ((glGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC)glewGetProcAddress((const GLubyte*)"glGenFramebuffersEXT")) == NULL) || r;
1389  r = ((glGenRenderbuffersEXT = (PFNGLGENRENDERBUFFERSEXTPROC)glewGetProcAddress((const GLubyte*)"glGenRenderbuffersEXT")) == NULL) || r;
1390  r = ((glGenerateMipmapEXT = (PFNGLGENERATEMIPMAPEXTPROC)glewGetProcAddress((const GLubyte*)"glGenerateMipmapEXT")) == NULL) || r;
1391  r = ((glGetFramebufferAttachmentParameterivEXT = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetFramebufferAttachmentParameterivEXT")) == NULL) || r;
1392  r = ((glGetRenderbufferParameterivEXT = (PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC)glewGetProcAddress((const GLubyte*)"glGetRenderbufferParameterivEXT")) == NULL) || r;
1393  r = ((glIsFramebufferEXT = (PFNGLISFRAMEBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glIsFramebufferEXT")) == NULL) || r;
1394  r = ((glIsRenderbufferEXT = (PFNGLISRENDERBUFFEREXTPROC)glewGetProcAddress((const GLubyte*)"glIsRenderbufferEXT")) == NULL) || r;
1395  r = ((glRenderbufferStorageEXT = (PFNGLRENDERBUFFERSTORAGEEXTPROC)glewGetProcAddress((const GLubyte*)"glRenderbufferStorageEXT")) == NULL) || r;
1396
1397  return r;
1398}
1399
1400#endif /* GL_EXT_framebuffer_object */
1401
1402#ifdef GL_EXT_secondary_color
1403
1404static GLboolean _glewInit_GL_EXT_secondary_color (GLEW_CONTEXT_ARG_DEF_INIT)
1405{
1406  GLboolean r = GL_FALSE;
1407
1408  r = ((glSecondaryColor3bEXT = (PFNGLSECONDARYCOLOR3BEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3bEXT")) == NULL) || r;
1409  r = ((glSecondaryColor3bvEXT = (PFNGLSECONDARYCOLOR3BVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3bvEXT")) == NULL) || r;
1410  r = ((glSecondaryColor3dEXT = (PFNGLSECONDARYCOLOR3DEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3dEXT")) == NULL) || r;
1411  r = ((glSecondaryColor3dvEXT = (PFNGLSECONDARYCOLOR3DVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3dvEXT")) == NULL) || r;
1412  r = ((glSecondaryColor3fEXT = (PFNGLSECONDARYCOLOR3FEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3fEXT")) == NULL) || r;
1413  r = ((glSecondaryColor3fvEXT = (PFNGLSECONDARYCOLOR3FVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3fvEXT")) == NULL) || r;
1414  r = ((glSecondaryColor3iEXT = (PFNGLSECONDARYCOLOR3IEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3iEXT")) == NULL) || r;
1415  r = ((glSecondaryColor3ivEXT = (PFNGLSECONDARYCOLOR3IVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ivEXT")) == NULL) || r;
1416  r = ((glSecondaryColor3sEXT = (PFNGLSECONDARYCOLOR3SEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3sEXT")) == NULL) || r;
1417  r = ((glSecondaryColor3svEXT = (PFNGLSECONDARYCOLOR3SVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3svEXT")) == NULL) || r;
1418  r = ((glSecondaryColor3ubEXT = (PFNGLSECONDARYCOLOR3UBEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ubEXT")) == NULL) || r;
1419  r = ((glSecondaryColor3ubvEXT = (PFNGLSECONDARYCOLOR3UBVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3ubvEXT")) == NULL) || r;
1420  r = ((glSecondaryColor3uiEXT = (PFNGLSECONDARYCOLOR3UIEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3uiEXT")) == NULL) || r;
1421  r = ((glSecondaryColor3uivEXT = (PFNGLSECONDARYCOLOR3UIVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3uivEXT")) == NULL) || r;
1422  r = ((glSecondaryColor3usEXT = (PFNGLSECONDARYCOLOR3USEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3usEXT")) == NULL) || r;
1423  r = ((glSecondaryColor3usvEXT = (PFNGLSECONDARYCOLOR3USVEXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColor3usvEXT")) == NULL) || r;
1424  r = ((glSecondaryColorPointerEXT = (PFNGLSECONDARYCOLORPOINTEREXTPROC)glewGetProcAddress((const GLubyte*)"glSecondaryColorPointerEXT")) == NULL) || r;
1425
1426  return r;
1427}
1428
1429#endif /* GL_EXT_secondary_color */
1430
1431#ifdef GL_EXT_stencil_two_side
1432
1433static GLboolean _glewInit_GL_EXT_stencil_two_side (GLEW_CONTEXT_ARG_DEF_INIT)
1434{
1435  GLboolean r = GL_FALSE;
1436
1437  r = ((glActiveStencilFaceEXT = (PFNGLACTIVESTENCILFACEEXTPROC)glewGetProcAddress((const GLubyte*)"glActiveStencilFaceEXT")) == NULL) || r;
1438
1439  return r;
1440}
1441
1442#endif /* GL_EXT_stencil_two_side */
1443
1444#ifdef GL_EXT_stencil_wrap
1445
1446#endif /* GL_EXT_stencil_wrap */
1447
1448#ifdef GL_EXT_texture_compression_s3tc
1449
1450#endif /* GL_EXT_texture_compression_s3tc */
1451
1452#ifdef GL_EXT_texture_cube_map
1453
1454#endif /* GL_EXT_texture_cube_map */
1455
1456#ifdef GL_EXT_texture_env_combine
1457
1458#endif /* GL_EXT_texture_env_combine */
1459
1460#ifdef GL_EXT_texture_env_dot3
1461
1462#endif /* GL_EXT_texture_env_dot3 */
1463
1464#ifdef GL_EXT_texture_filter_anisotropic
1465
1466#endif /* GL_EXT_texture_filter_anisotropic */
1467
1468#ifdef GL_NV_fragment_program
1469
1470static GLboolean _glewInit_GL_NV_fragment_program (GLEW_CONTEXT_ARG_DEF_INIT)
1471{
1472  GLboolean r = GL_FALSE;
1473
1474  r = ((glGetProgramNamedParameterdvNV = (PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramNamedParameterdvNV")) == NULL) || r;
1475  r = ((glGetProgramNamedParameterfvNV = (PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramNamedParameterfvNV")) == NULL) || r;
1476  r = ((glProgramNamedParameter4dNV = (PFNGLPROGRAMNAMEDPARAMETER4DNVPROC)glewGetProcAddress((const GLubyte*)"glProgramNamedParameter4dNV")) == NULL) || r;
1477  r = ((glProgramNamedParameter4dvNV = (PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramNamedParameter4dvNV")) == NULL) || r;
1478  r = ((glProgramNamedParameter4fNV = (PFNGLPROGRAMNAMEDPARAMETER4FNVPROC)glewGetProcAddress((const GLubyte*)"glProgramNamedParameter4fNV")) == NULL) || r;
1479  r = ((glProgramNamedParameter4fvNV = (PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramNamedParameter4fvNV")) == NULL) || r;
1480
1481  return r;
1482}
1483
1484#endif /* GL_NV_fragment_program */
1485
1486#ifdef GL_NV_fragment_program2
1487
1488#endif /* GL_NV_fragment_program2 */
1489
1490#ifdef GL_NV_fragment_program_option
1491
1492#endif /* GL_NV_fragment_program_option */
1493
1494#ifdef GL_NV_occlusion_query
1495
1496static GLboolean _glewInit_GL_NV_occlusion_query (GLEW_CONTEXT_ARG_DEF_INIT)
1497{
1498  GLboolean r = GL_FALSE;
1499
1500  r = ((glBeginOcclusionQueryNV = (PFNGLBEGINOCCLUSIONQUERYNVPROC)glewGetProcAddress((const GLubyte*)"glBeginOcclusionQueryNV")) == NULL) || r;
1501  r = ((glDeleteOcclusionQueriesNV = (PFNGLDELETEOCCLUSIONQUERIESNVPROC)glewGetProcAddress((const GLubyte*)"glDeleteOcclusionQueriesNV")) == NULL) || r;
1502  r = ((glEndOcclusionQueryNV = (PFNGLENDOCCLUSIONQUERYNVPROC)glewGetProcAddress((const GLubyte*)"glEndOcclusionQueryNV")) == NULL) || r;
1503  r = ((glGenOcclusionQueriesNV = (PFNGLGENOCCLUSIONQUERIESNVPROC)glewGetProcAddress((const GLubyte*)"glGenOcclusionQueriesNV")) == NULL) || r;
1504  r = ((glGetOcclusionQueryivNV = (PFNGLGETOCCLUSIONQUERYIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetOcclusionQueryivNV")) == NULL) || r;
1505  r = ((glGetOcclusionQueryuivNV = (PFNGLGETOCCLUSIONQUERYUIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetOcclusionQueryuivNV")) == NULL) || r;
1506  r = ((glIsOcclusionQueryNV = (PFNGLISOCCLUSIONQUERYNVPROC)glewGetProcAddress((const GLubyte*)"glIsOcclusionQueryNV")) == NULL) || r;
1507
1508  return r;
1509}
1510
1511#endif /* GL_NV_occlusion_query */
1512
1513#ifdef GL_NV_register_combiners
1514
1515static GLboolean _glewInit_GL_NV_register_combiners (GLEW_CONTEXT_ARG_DEF_INIT)
1516{
1517  GLboolean r = GL_FALSE;
1518
1519  r = ((glCombinerInputNV = (PFNGLCOMBINERINPUTNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerInputNV")) == NULL) || r;
1520  r = ((glCombinerOutputNV = (PFNGLCOMBINEROUTPUTNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerOutputNV")) == NULL) || r;
1521  r = ((glCombinerParameterfNV = (PFNGLCOMBINERPARAMETERFNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerParameterfNV")) == NULL) || r;
1522  r = ((glCombinerParameterfvNV = (PFNGLCOMBINERPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerParameterfvNV")) == NULL) || r;
1523  r = ((glCombinerParameteriNV = (PFNGLCOMBINERPARAMETERINVPROC)glewGetProcAddress((const GLubyte*)"glCombinerParameteriNV")) == NULL) || r;
1524  r = ((glCombinerParameterivNV = (PFNGLCOMBINERPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerParameterivNV")) == NULL) || r;
1525  r = ((glFinalCombinerInputNV = (PFNGLFINALCOMBINERINPUTNVPROC)glewGetProcAddress((const GLubyte*)"glFinalCombinerInputNV")) == NULL) || r;
1526  r = ((glGetCombinerInputParameterfvNV = (PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerInputParameterfvNV")) == NULL) || r;
1527  r = ((glGetCombinerInputParameterivNV = (PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerInputParameterivNV")) == NULL) || r;
1528  r = ((glGetCombinerOutputParameterfvNV = (PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerOutputParameterfvNV")) == NULL) || r;
1529  r = ((glGetCombinerOutputParameterivNV = (PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerOutputParameterivNV")) == NULL) || r;
1530  r = ((glGetFinalCombinerInputParameterfvNV = (PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetFinalCombinerInputParameterfvNV")) == NULL) || r;
1531  r = ((glGetFinalCombinerInputParameterivNV = (PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetFinalCombinerInputParameterivNV")) == NULL) || r;
1532
1533  return r;
1534}
1535
1536#endif /* GL_NV_register_combiners */
1537
1538#ifdef GL_NV_register_combiners2
1539
1540static GLboolean _glewInit_GL_NV_register_combiners2 (GLEW_CONTEXT_ARG_DEF_INIT)
1541{
1542  GLboolean r = GL_FALSE;
1543
1544  r = ((glCombinerStageParameterfvNV = (PFNGLCOMBINERSTAGEPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glCombinerStageParameterfvNV")) == NULL) || r;
1545  r = ((glGetCombinerStageParameterfvNV = (PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetCombinerStageParameterfvNV")) == NULL) || r;
1546
1547  return r;
1548}
1549
1550#endif /* GL_NV_register_combiners2 */
1551
1552#ifdef GL_NV_texture_compression_vtc
1553
1554#endif /* GL_NV_texture_compression_vtc */
1555
1556#ifdef GL_NV_texture_shader
1557
1558#endif /* GL_NV_texture_shader */
1559
1560#ifdef GL_NV_vertex_program
1561
1562static GLboolean _glewInit_GL_NV_vertex_program (GLEW_CONTEXT_ARG_DEF_INIT)
1563{
1564  GLboolean r = GL_FALSE;
1565
1566  r = ((glAreProgramsResidentNV = (PFNGLAREPROGRAMSRESIDENTNVPROC)glewGetProcAddress((const GLubyte*)"glAreProgramsResidentNV")) == NULL) || r;
1567  r = ((glBindProgramNV = (PFNGLBINDPROGRAMNVPROC)glewGetProcAddress((const GLubyte*)"glBindProgramNV")) == NULL) || r;
1568  r = ((glDeleteProgramsNV = (PFNGLDELETEPROGRAMSNVPROC)glewGetProcAddress((const GLubyte*)"glDeleteProgramsNV")) == NULL) || r;
1569  r = ((glExecuteProgramNV = (PFNGLEXECUTEPROGRAMNVPROC)glewGetProcAddress((const GLubyte*)"glExecuteProgramNV")) == NULL) || r;
1570  r = ((glGenProgramsNV = (PFNGLGENPROGRAMSNVPROC)glewGetProcAddress((const GLubyte*)"glGenProgramsNV")) == NULL) || r;
1571  r = ((glGetProgramParameterdvNV = (PFNGLGETPROGRAMPARAMETERDVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramParameterdvNV")) == NULL) || r;
1572  r = ((glGetProgramParameterfvNV = (PFNGLGETPROGRAMPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramParameterfvNV")) == NULL) || r;
1573  r = ((glGetProgramStringNV = (PFNGLGETPROGRAMSTRINGNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramStringNV")) == NULL) || r;
1574  r = ((glGetProgramivNV = (PFNGLGETPROGRAMIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetProgramivNV")) == NULL) || r;
1575  r = ((glGetTrackMatrixivNV = (PFNGLGETTRACKMATRIXIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetTrackMatrixivNV")) == NULL) || r;
1576  r = ((glGetVertexAttribPointervNV = (PFNGLGETVERTEXATTRIBPOINTERVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribPointervNV")) == NULL) || r;
1577  r = ((glGetVertexAttribdvNV = (PFNGLGETVERTEXATTRIBDVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribdvNV")) == NULL) || r;
1578  r = ((glGetVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribfvNV")) == NULL) || r;
1579  r = ((glGetVertexAttribivNV = (PFNGLGETVERTEXATTRIBIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVertexAttribivNV")) == NULL) || r;
1580  r = ((glIsProgramNV = (PFNGLISPROGRAMNVPROC)glewGetProcAddress((const GLubyte*)"glIsProgramNV")) == NULL) || r;
1581  r = ((glLoadProgramNV = (PFNGLLOADPROGRAMNVPROC)glewGetProcAddress((const GLubyte*)"glLoadProgramNV")) == NULL) || r;
1582  r = ((glProgramParameter4dNV = (PFNGLPROGRAMPARAMETER4DNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameter4dNV")) == NULL) || r;
1583  r = ((glProgramParameter4dvNV = (PFNGLPROGRAMPARAMETER4DVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameter4dvNV")) == NULL) || r;
1584  r = ((glProgramParameter4fNV = (PFNGLPROGRAMPARAMETER4FNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameter4fNV")) == NULL) || r;
1585  r = ((glProgramParameter4fvNV = (PFNGLPROGRAMPARAMETER4FVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameter4fvNV")) == NULL) || r;
1586  r = ((glProgramParameters4dvNV = (PFNGLPROGRAMPARAMETERS4DVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameters4dvNV")) == NULL) || r;
1587  r = ((glProgramParameters4fvNV = (PFNGLPROGRAMPARAMETERS4FVNVPROC)glewGetProcAddress((const GLubyte*)"glProgramParameters4fvNV")) == NULL) || r;
1588  r = ((glRequestResidentProgramsNV = (PFNGLREQUESTRESIDENTPROGRAMSNVPROC)glewGetProcAddress((const GLubyte*)"glRequestResidentProgramsNV")) == NULL) || r;
1589  r = ((glTrackMatrixNV = (PFNGLTRACKMATRIXNVPROC)glewGetProcAddress((const GLubyte*)"glTrackMatrixNV")) == NULL) || r;
1590  r = ((glVertexAttrib1dNV = (PFNGLVERTEXATTRIB1DNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dNV")) == NULL) || r;
1591  r = ((glVertexAttrib1dvNV = (PFNGLVERTEXATTRIB1DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1dvNV")) == NULL) || r;
1592  r = ((glVertexAttrib1fNV = (PFNGLVERTEXATTRIB1FNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fNV")) == NULL) || r;
1593  r = ((glVertexAttrib1fvNV = (PFNGLVERTEXATTRIB1FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1fvNV")) == NULL) || r;
1594  r = ((glVertexAttrib1sNV = (PFNGLVERTEXATTRIB1SNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1sNV")) == NULL) || r;
1595  r = ((glVertexAttrib1svNV = (PFNGLVERTEXATTRIB1SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib1svNV")) == NULL) || r;
1596  r = ((glVertexAttrib2dNV = (PFNGLVERTEXATTRIB2DNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dNV")) == NULL) || r;
1597  r = ((glVertexAttrib2dvNV = (PFNGLVERTEXATTRIB2DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2dvNV")) == NULL) || r;
1598  r = ((glVertexAttrib2fNV = (PFNGLVERTEXATTRIB2FNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fNV")) == NULL) || r;
1599  r = ((glVertexAttrib2fvNV = (PFNGLVERTEXATTRIB2FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2fvNV")) == NULL) || r;
1600  r = ((glVertexAttrib2sNV = (PFNGLVERTEXATTRIB2SNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2sNV")) == NULL) || r;
1601  r = ((glVertexAttrib2svNV = (PFNGLVERTEXATTRIB2SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib2svNV")) == NULL) || r;
1602  r = ((glVertexAttrib3dNV = (PFNGLVERTEXATTRIB3DNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dNV")) == NULL) || r;
1603  r = ((glVertexAttrib3dvNV = (PFNGLVERTEXATTRIB3DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3dvNV")) == NULL) || r;
1604  r = ((glVertexAttrib3fNV = (PFNGLVERTEXATTRIB3FNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fNV")) == NULL) || r;
1605  r = ((glVertexAttrib3fvNV = (PFNGLVERTEXATTRIB3FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3fvNV")) == NULL) || r;
1606  r = ((glVertexAttrib3sNV = (PFNGLVERTEXATTRIB3SNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3sNV")) == NULL) || r;
1607  r = ((glVertexAttrib3svNV = (PFNGLVERTEXATTRIB3SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib3svNV")) == NULL) || r;
1608  r = ((glVertexAttrib4dNV = (PFNGLVERTEXATTRIB4DNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dNV")) == NULL) || r;
1609  r = ((glVertexAttrib4dvNV = (PFNGLVERTEXATTRIB4DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4dvNV")) == NULL) || r;
1610  r = ((glVertexAttrib4fNV = (PFNGLVERTEXATTRIB4FNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fNV")) == NULL) || r;
1611  r = ((glVertexAttrib4fvNV = (PFNGLVERTEXATTRIB4FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4fvNV")) == NULL) || r;
1612  r = ((glVertexAttrib4sNV = (PFNGLVERTEXATTRIB4SNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4sNV")) == NULL) || r;
1613  r = ((glVertexAttrib4svNV = (PFNGLVERTEXATTRIB4SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4svNV")) == NULL) || r;
1614  r = ((glVertexAttrib4ubNV = (PFNGLVERTEXATTRIB4UBNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ubNV")) == NULL) || r;
1615  r = ((glVertexAttrib4ubvNV = (PFNGLVERTEXATTRIB4UBVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttrib4ubvNV")) == NULL) || r;
1616  r = ((glVertexAttribPointerNV = (PFNGLVERTEXATTRIBPOINTERNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribPointerNV")) == NULL) || r;
1617  r = ((glVertexAttribs1dvNV = (PFNGLVERTEXATTRIBS1DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs1dvNV")) == NULL) || r;
1618  r = ((glVertexAttribs1fvNV = (PFNGLVERTEXATTRIBS1FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs1fvNV")) == NULL) || r;
1619  r = ((glVertexAttribs1svNV = (PFNGLVERTEXATTRIBS1SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs1svNV")) == NULL) || r;
1620  r = ((glVertexAttribs2dvNV = (PFNGLVERTEXATTRIBS2DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs2dvNV")) == NULL) || r;
1621  r = ((glVertexAttribs2fvNV = (PFNGLVERTEXATTRIBS2FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs2fvNV")) == NULL) || r;
1622  r = ((glVertexAttribs2svNV = (PFNGLVERTEXATTRIBS2SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs2svNV")) == NULL) || r;
1623  r = ((glVertexAttribs3dvNV = (PFNGLVERTEXATTRIBS3DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs3dvNV")) == NULL) || r;
1624  r = ((glVertexAttribs3fvNV = (PFNGLVERTEXATTRIBS3FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs3fvNV")) == NULL) || r;
1625  r = ((glVertexAttribs3svNV = (PFNGLVERTEXATTRIBS3SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs3svNV")) == NULL) || r;
1626  r = ((glVertexAttribs4dvNV = (PFNGLVERTEXATTRIBS4DVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4dvNV")) == NULL) || r;
1627  r = ((glVertexAttribs4fvNV = (PFNGLVERTEXATTRIBS4FVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4fvNV")) == NULL) || r;
1628  r = ((glVertexAttribs4svNV = (PFNGLVERTEXATTRIBS4SVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4svNV")) == NULL) || r;
1629  r = ((glVertexAttribs4ubvNV = (PFNGLVERTEXATTRIBS4UBVNVPROC)glewGetProcAddress((const GLubyte*)"glVertexAttribs4ubvNV")) == NULL) || r;
1630
1631  return r;
1632}
1633
1634#endif /* GL_NV_vertex_program */
1635
1636#ifdef GL_NV_vertex_program2_option
1637
1638#endif /* GL_NV_vertex_program2_option */
1639
1640#ifdef GL_NV_vertex_program3
1641
1642#endif /* GL_NV_vertex_program3 */
1643
1644#ifdef GL_SGIS_generate_mipmap
1645
1646#endif /* GL_SGIS_generate_mipmap */
1647
1648/* ------------------------------------------------------------------------- */
1649
1650/*
1651 * Search for name in the extensions string. Use of strstr()
1652 * is not sufficient because extension names can be prefixes of
1653 * other extension names. Could use strtok() but the constant
1654 * string returned by glGetString might be in read-only memory.
1655 */
1656GLboolean glewGetExtension (const char* name)
1657{   
1658  GLubyte* p;
1659  GLubyte* end;
1660  GLuint len = _glewStrLen((const GLubyte*)name);
1661  p = (GLubyte*)glGetString(GL_EXTENSIONS);
1662  if (0 == p) return GL_FALSE;
1663  end = p + _glewStrLen(p);
1664  while (p < end)
1665  {
1666    GLuint n = _glewStrCLen(p, ' ');
1667    if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE;
1668    p += n+1;
1669  }
1670  return GL_FALSE;
1671}
1672
1673/* ------------------------------------------------------------------------- */
1674
1675GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
1676{
1677  const GLubyte* s;
1678  GLuint major, minor;
1679  /* check for SiS driver */
1680  s = glGetString(GL_RENDERER);
1681  if (s && _glewStrSame(s,(const GLubyte*)"SiS",3))
1682  {
1683          GLEW_VERSION_1_1 = GL_TRUE;
1684      GLEW_VERSION_1_2 = GL_FALSE;
1685      GLEW_VERSION_1_3 = GL_FALSE;
1686      GLEW_VERSION_1_4 = GL_FALSE;
1687      GLEW_VERSION_1_5 = GL_FALSE;
1688      GLEW_VERSION_2_0 = GL_FALSE;
1689  }
1690  else
1691  {
1692        /* query opengl version */
1693        s = glGetString(GL_VERSION);
1694        if (!s) return GLEW_ERROR_NO_GL_VERSION;
1695        major = _glewStrCLen(s, '.')-1;
1696        minor = _glewStrCLen(s, '.')+1;
1697        if (s+major == NULL
1698          || s+minor-1 == NULL || s+minor == NULL
1699          || (s[major] == 1 && s[minor] < '1'))
1700        {
1701          return GLEW_ERROR_GL_VERSION_10_ONLY;
1702        }
1703        else
1704        {
1705          if (s[major] >= '2')
1706          {
1707                GLEW_VERSION_1_1 = GL_TRUE;
1708                GLEW_VERSION_1_2 = GL_TRUE;
1709                GLEW_VERSION_1_3 = GL_TRUE;
1710                GLEW_VERSION_1_4 = GL_TRUE;
1711                GLEW_VERSION_1_5 = GL_TRUE;
1712                GLEW_VERSION_2_0 = GL_TRUE;
1713          }
1714          else
1715          {
1716                if (s[minor] >= '5')
1717                {
1718                  GLEW_VERSION_1_1 = GL_TRUE;
1719                  GLEW_VERSION_1_2 = GL_TRUE;
1720                  GLEW_VERSION_1_3 = GL_TRUE;
1721                  GLEW_VERSION_1_4 = GL_TRUE;
1722                  GLEW_VERSION_1_5 = GL_TRUE;
1723                  GLEW_VERSION_2_0 = GL_FALSE;
1724                }
1725            if (s[minor] == '4')
1726                {
1727                  GLEW_VERSION_1_1 = GL_TRUE;
1728                  GLEW_VERSION_1_2 = GL_TRUE;
1729                  GLEW_VERSION_1_3 = GL_TRUE;
1730                  GLEW_VERSION_1_4 = GL_TRUE;
1731                  GLEW_VERSION_1_5 = GL_FALSE;
1732                  GLEW_VERSION_2_0 = GL_FALSE;
1733                }
1734                if (s[minor] == '3')
1735                {
1736                  GLEW_VERSION_1_1 = GL_TRUE;
1737                  GLEW_VERSION_1_2 = GL_TRUE;
1738                  GLEW_VERSION_1_3 = GL_TRUE;
1739                  GLEW_VERSION_1_4 = GL_FALSE;
1740                  GLEW_VERSION_1_5 = GL_FALSE;
1741                  GLEW_VERSION_2_0 = GL_FALSE;
1742                }
1743                if (s[minor] == '2')
1744                {
1745                  GLEW_VERSION_1_1 = GL_TRUE;
1746                  GLEW_VERSION_1_2 = GL_TRUE;
1747                  GLEW_VERSION_1_3 = GL_FALSE;
1748                  GLEW_VERSION_1_4 = GL_FALSE;
1749                  GLEW_VERSION_1_5 = GL_FALSE;
1750                  GLEW_VERSION_2_0 = GL_FALSE;
1751                }
1752                if (s[minor] < '2')
1753                {
1754                  GLEW_VERSION_1_1 = GL_TRUE;
1755                  GLEW_VERSION_1_2 = GL_FALSE;
1756                  GLEW_VERSION_1_3 = GL_FALSE;
1757                  GLEW_VERSION_1_4 = GL_FALSE;
1758                  GLEW_VERSION_1_5 = GL_FALSE;
1759                  GLEW_VERSION_2_0 = GL_FALSE;
1760                }
1761          }
1762        }
1763  }
1764  /* initialize extensions */
1765#ifdef GL_VERSION_1_2
1766  if (glewExperimental || GLEW_VERSION_1_2) GLEW_VERSION_1_2 = !_glewInit_GL_VERSION_1_2(GLEW_CONTEXT_ARG_VAR_INIT);
1767#endif /* GL_VERSION_1_2 */
1768#ifdef GL_VERSION_1_3
1769  if (glewExperimental || GLEW_VERSION_1_3) GLEW_VERSION_1_3 = !_glewInit_GL_VERSION_1_3(GLEW_CONTEXT_ARG_VAR_INIT);
1770#endif /* GL_VERSION_1_3 */
1771#ifdef GL_VERSION_1_4
1772  if (glewExperimental || GLEW_VERSION_1_4) GLEW_VERSION_1_4 = !_glewInit_GL_VERSION_1_4(GLEW_CONTEXT_ARG_VAR_INIT);
1773#endif /* GL_VERSION_1_4 */
1774#ifdef GL_VERSION_1_5
1775  if (glewExperimental || GLEW_VERSION_1_5) GLEW_VERSION_1_5 = !_glewInit_GL_VERSION_1_5(GLEW_CONTEXT_ARG_VAR_INIT);
1776#endif /* GL_VERSION_1_5 */
1777#ifdef GL_VERSION_2_0
1778  if (glewExperimental || GLEW_VERSION_2_0) GLEW_VERSION_2_0 = !_glewInit_GL_VERSION_2_0(GLEW_CONTEXT_ARG_VAR_INIT);
1779#endif /* GL_VERSION_2_0 */
1780#ifdef GL_ARB_draw_buffers
1781  GLEW_ARB_draw_buffers = glewGetExtension("GL_ARB_draw_buffers");
1782  if (glewExperimental || GLEW_ARB_draw_buffers) GLEW_ARB_draw_buffers = !_glewInit_GL_ARB_draw_buffers(GLEW_CONTEXT_ARG_VAR_INIT);
1783#endif /* GL_ARB_draw_buffers */
1784#ifdef GL_ARB_fragment_program
1785  GLEW_ARB_fragment_program = glewGetExtension("GL_ARB_fragment_program");
1786#endif /* GL_ARB_fragment_program */
1787#ifdef GL_ARB_fragment_shader
1788  GLEW_ARB_fragment_shader = glewGetExtension("GL_ARB_fragment_shader");
1789#endif /* GL_ARB_fragment_shader */
1790#ifdef GL_ARB_half_float_pixel
1791  GLEW_ARB_half_float_pixel = glewGetExtension("GL_ARB_half_float_pixel");
1792#endif /* GL_ARB_half_float_pixel */
1793#ifdef GL_ARB_multisample
1794  GLEW_ARB_multisample = glewGetExtension("GL_ARB_multisample");
1795  if (glewExperimental || GLEW_ARB_multisample) GLEW_ARB_multisample = !_glewInit_GL_ARB_multisample(GLEW_CONTEXT_ARG_VAR_INIT);
1796#endif /* GL_ARB_multisample */
1797#ifdef GL_ARB_multitexture
1798  GLEW_ARB_multitexture = glewGetExtension("GL_ARB_multitexture");
1799  if (glewExperimental || GLEW_ARB_multitexture) GLEW_ARB_multitexture = !_glewInit_GL_ARB_multitexture(GLEW_CONTEXT_ARG_VAR_INIT);
1800#endif /* GL_ARB_multitexture */
1801#ifdef GL_ARB_occlusion_query
1802  GLEW_ARB_occlusion_query = glewGetExtension("GL_ARB_occlusion_query");
1803  if (glewExperimental || GLEW_ARB_occlusion_query) GLEW_ARB_occlusion_query = !_glewInit_GL_ARB_occlusion_query(GLEW_CONTEXT_ARG_VAR_INIT);
1804#endif /* GL_ARB_occlusion_query */
1805#ifdef GL_ARB_shader_objects
1806  GLEW_ARB_shader_objects = glewGetExtension("GL_ARB_shader_objects");
1807  if (glewExperimental || GLEW_ARB_shader_objects) GLEW_ARB_shader_objects = !_glewInit_GL_ARB_shader_objects(GLEW_CONTEXT_ARG_VAR_INIT);
1808#endif /* GL_ARB_shader_objects */
1809#ifdef GL_ARB_shading_language_100
1810  GLEW_ARB_shading_language_100 = glewGetExtension("GL_ARB_shading_language_100");
1811#endif /* GL_ARB_shading_language_100 */
1812#ifdef GL_ARB_texture_compression
1813  GLEW_ARB_texture_compression = glewGetExtension("GL_ARB_texture_compression");
1814  if (glewExperimental || GLEW_ARB_texture_compression) GLEW_ARB_texture_compression = !_glewInit_GL_ARB_texture_compression(GLEW_CONTEXT_ARG_VAR_INIT);
1815#endif /* GL_ARB_texture_compression */
1816#ifdef GL_ARB_texture_cube_map
1817  GLEW_ARB_texture_cube_map = glewGetExtension("GL_ARB_texture_cube_map");
1818#endif /* GL_ARB_texture_cube_map */
1819#ifdef GL_ARB_texture_env_combine
1820  GLEW_ARB_texture_env_combine = glewGetExtension("GL_ARB_texture_env_combine");
1821#endif /* GL_ARB_texture_env_combine */
1822#ifdef GL_ARB_texture_env_dot3
1823  GLEW_ARB_texture_env_dot3 = glewGetExtension("GL_ARB_texture_env_dot3");
1824#endif /* GL_ARB_texture_env_dot3 */
1825#ifdef GL_ARB_texture_float
1826  GLEW_ARB_texture_float = glewGetExtension("GL_ARB_texture_float");
1827#endif /* GL_ARB_texture_float */
1828#ifdef GL_ARB_texture_non_power_of_two
1829  GLEW_ARB_texture_non_power_of_two = glewGetExtension("GL_ARB_texture_non_power_of_two");
1830#endif /* GL_ARB_texture_non_power_of_two */
1831#ifdef GL_ARB_vertex_buffer_object
1832  GLEW_ARB_vertex_buffer_object = glewGetExtension("GL_ARB_vertex_buffer_object");
1833  if (glewExperimental || GLEW_ARB_vertex_buffer_object) GLEW_ARB_vertex_buffer_object = !_glewInit_GL_ARB_vertex_buffer_object(GLEW_CONTEXT_ARG_VAR_INIT);
1834#endif /* GL_ARB_vertex_buffer_object */
1835#ifdef GL_ARB_vertex_program
1836  GLEW_ARB_vertex_program = glewGetExtension("GL_ARB_vertex_program");
1837  if (glewExperimental || GLEW_ARB_vertex_program) GLEW_ARB_vertex_program = !_glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT);
1838#endif /* GL_ARB_vertex_program */
1839#ifdef GL_ARB_vertex_shader
1840  GLEW_ARB_vertex_shader = glewGetExtension("GL_ARB_vertex_shader");
1841  if (glewExperimental || GLEW_ARB_vertex_shader) { GLEW_ARB_vertex_shader = !_glewInit_GL_ARB_vertex_shader(GLEW_CONTEXT_ARG_VAR_INIT); _glewInit_GL_ARB_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT); }
1842#endif /* GL_ARB_vertex_shader */
1843#ifdef GL_ATI_draw_buffers
1844  GLEW_ATI_draw_buffers = glewGetExtension("GL_ATI_draw_buffers");
1845  if (glewExperimental || GLEW_ATI_draw_buffers) GLEW_ATI_draw_buffers = !_glewInit_GL_ATI_draw_buffers(GLEW_CONTEXT_ARG_VAR_INIT);
1846#endif /* GL_ATI_draw_buffers */
1847#ifdef GL_ATI_fragment_shader
1848  GLEW_ATI_fragment_shader = glewGetExtension("GL_ATI_fragment_shader");
1849  if (glewExperimental || GLEW_ATI_fragment_shader) GLEW_ATI_fragment_shader = !_glewInit_GL_ATI_fragment_shader(GLEW_CONTEXT_ARG_VAR_INIT);
1850#endif /* GL_ATI_fragment_shader */
1851#ifdef GL_ATI_texture_float
1852  GLEW_ATI_texture_float = glewGetExtension("GL_ATI_texture_float");
1853#endif /* GL_ATI_texture_float */
1854#ifdef GL_EXT_framebuffer_object
1855  GLEW_EXT_framebuffer_object = glewGetExtension("GL_EXT_framebuffer_object");
1856  if (glewExperimental || GLEW_EXT_framebuffer_object) GLEW_EXT_framebuffer_object = !_glewInit_GL_EXT_framebuffer_object(GLEW_CONTEXT_ARG_VAR_INIT);
1857#endif /* GL_EXT_framebuffer_object */
1858#ifdef GL_EXT_secondary_color
1859  GLEW_EXT_secondary_color = glewGetExtension("GL_EXT_secondary_color");
1860  if (glewExperimental || GLEW_EXT_secondary_color) GLEW_EXT_secondary_color = !_glewInit_GL_EXT_secondary_color(GLEW_CONTEXT_ARG_VAR_INIT);
1861#endif /* GL_EXT_secondary_color */
1862#ifdef GL_EXT_stencil_two_side
1863  GLEW_EXT_stencil_two_side = glewGetExtension("GL_EXT_stencil_two_side");
1864  if (glewExperimental || GLEW_EXT_stencil_two_side) GLEW_EXT_stencil_two_side = !_glewInit_GL_EXT_stencil_two_side(GLEW_CONTEXT_ARG_VAR_INIT);
1865#endif /* GL_EXT_stencil_two_side */
1866#ifdef GL_EXT_stencil_wrap
1867  GLEW_EXT_stencil_wrap = glewGetExtension("GL_EXT_stencil_wrap");
1868#endif /* GL_EXT_stencil_wrap */
1869#ifdef GL_EXT_texture_compression_s3tc
1870  GLEW_EXT_texture_compression_s3tc = glewGetExtension("GL_EXT_texture_compression_s3tc");
1871#endif /* GL_EXT_texture_compression_s3tc */
1872#ifdef GL_EXT_texture_cube_map
1873  GLEW_EXT_texture_cube_map = glewGetExtension("GL_EXT_texture_cube_map");
1874#endif /* GL_EXT_texture_cube_map */
1875#ifdef GL_EXT_texture_env_combine
1876  GLEW_EXT_texture_env_combine = glewGetExtension("GL_EXT_texture_env_combine");
1877#endif /* GL_EXT_texture_env_combine */
1878#ifdef GL_EXT_texture_env_dot3
1879  GLEW_EXT_texture_env_dot3 = glewGetExtension("GL_EXT_texture_env_dot3");
1880#endif /* GL_EXT_texture_env_dot3 */
1881#ifdef GL_EXT_texture_filter_anisotropic
1882  GLEW_EXT_texture_filter_anisotropic = glewGetExtension("GL_EXT_texture_filter_anisotropic");
1883#endif /* GL_EXT_texture_filter_anisotropic */
1884#ifdef GL_NV_fragment_program
1885  GLEW_NV_fragment_program = glewGetExtension("GL_NV_fragment_program");
1886  if (glewExperimental || GLEW_NV_fragment_program) GLEW_NV_fragment_program = !_glewInit_GL_NV_fragment_program(GLEW_CONTEXT_ARG_VAR_INIT);
1887#endif /* GL_NV_fragment_program */
1888#ifdef GL_NV_fragment_program2
1889  GLEW_NV_fragment_program2 = glewGetExtension("GL_NV_fragment_program2");
1890#endif /* GL_NV_fragment_program2 */
1891#ifdef GL_NV_fragment_program_option
1892  GLEW_NV_fragment_program_option = glewGetExtension("GL_NV_fragment_program_option");
1893#endif /* GL_NV_fragment_program_option */
1894#ifdef GL_NV_occlusion_query
1895  GLEW_NV_occlusion_query = glewGetExtension("GL_NV_occlusion_query");
1896  if (glewExperimental || GLEW_NV_occlusion_query) GLEW_NV_occlusion_query = !_glewInit_GL_NV_occlusion_query(GLEW_CONTEXT_ARG_VAR_INIT);
1897#endif /* GL_NV_occlusion_query */
1898#ifdef GL_NV_register_combiners
1899  GLEW_NV_register_combiners = glewGetExtension("GL_NV_register_combiners");
1900  if (glewExperimental || GLEW_NV_register_combiners) GLEW_NV_register_combiners = !_glewInit_GL_NV_register_combiners(GLEW_CONTEXT_ARG_VAR_INIT);
1901#endif /* GL_NV_register_combiners */
1902#ifdef GL_NV_register_combiners2
1903  GLEW_NV_register_combiners2 = glewGetExtension("GL_NV_register_combiners2");
1904  if (glewExperimental || GLEW_NV_register_combiners2) GLEW_NV_register_combiners2 = !_glewInit_GL_NV_register_combiners2(GLEW_CONTEXT_ARG_VAR_INIT);
1905#endif /* GL_NV_register_combiners2 */
1906#ifdef GL_NV_texture_compression_vtc
1907  GLEW_NV_texture_compression_vtc = glewGetExtension("GL_NV_texture_compression_vtc");
1908#endif /* GL_NV_texture_compression_vtc */
1909#ifdef GL_NV_texture_shader
1910  GLEW_NV_texture_shader = glewGetExtension("GL_NV_texture_shader");
1911#endif /* GL_NV_texture_shader */
1912#ifdef GL_NV_vertex_program
1913  GLEW_NV_vertex_program = glewGetExtension("GL_NV_vertex_program");
1914  if (glewExperimental || GLEW_NV_vertex_program) GLEW_NV_vertex_program = !_glewInit_GL_NV_vertex_program(GLEW_CONTEXT_ARG_VAR_INIT);
1915#endif /* GL_NV_vertex_program */
1916#ifdef GL_NV_vertex_program2_option
1917  GLEW_NV_vertex_program2_option = glewGetExtension("GL_NV_vertex_program2_option");
1918#endif /* GL_NV_vertex_program2_option */
1919#ifdef GL_NV_vertex_program3
1920  GLEW_NV_vertex_program3 = glewGetExtension("GL_NV_vertex_program3");
1921#endif /* GL_NV_vertex_program3 */
1922#ifdef GL_SGIS_generate_mipmap
1923  GLEW_SGIS_generate_mipmap = glewGetExtension("GL_SGIS_generate_mipmap");
1924#endif /* GL_SGIS_generate_mipmap */
1925
1926  return GLEW_OK;
1927}
1928
1929
1930#if defined(_WIN32)
1931
1932#if !defined(GLEW_MX)
1933
1934PFNWGLGETEXTENSIONSSTRINGARBPROC __wglewGetExtensionsStringARB = NULL;
1935
1936PFNWGLCREATEPBUFFERARBPROC __wglewCreatePbufferARB = NULL;
1937PFNWGLDESTROYPBUFFERARBPROC __wglewDestroyPbufferARB = NULL;
1938PFNWGLGETPBUFFERDCARBPROC __wglewGetPbufferDCARB = NULL;
1939PFNWGLQUERYPBUFFERARBPROC __wglewQueryPbufferARB = NULL;
1940PFNWGLRELEASEPBUFFERDCARBPROC __wglewReleasePbufferDCARB = NULL;
1941
1942PFNWGLCHOOSEPIXELFORMATARBPROC __wglewChoosePixelFormatARB = NULL;
1943PFNWGLGETPIXELFORMATATTRIBFVARBPROC __wglewGetPixelFormatAttribfvARB = NULL;
1944PFNWGLGETPIXELFORMATATTRIBIVARBPROC __wglewGetPixelFormatAttribivARB = NULL;
1945
1946PFNWGLBINDTEXIMAGEARBPROC __wglewBindTexImageARB = NULL;
1947PFNWGLRELEASETEXIMAGEARBPROC __wglewReleaseTexImageARB = NULL;
1948PFNWGLSETPBUFFERATTRIBARBPROC __wglewSetPbufferAttribARB = NULL;
1949
1950PFNWGLGETEXTENSIONSSTRINGEXTPROC __wglewGetExtensionsStringEXT = NULL;
1951
1952PFNWGLGETSWAPINTERVALEXTPROC __wglewGetSwapIntervalEXT = NULL;
1953PFNWGLSWAPINTERVALEXTPROC __wglewSwapIntervalEXT = NULL;
1954GLboolean __WGLEW_ARB_extensions_string = GL_FALSE;
1955GLboolean __WGLEW_ARB_multisample = GL_FALSE;
1956GLboolean __WGLEW_ARB_pbuffer = GL_FALSE;
1957GLboolean __WGLEW_ARB_pixel_format = GL_FALSE;
1958GLboolean __WGLEW_ARB_pixel_format_float = GL_FALSE;
1959GLboolean __WGLEW_ARB_render_texture = GL_FALSE;
1960GLboolean __WGLEW_ATI_pixel_format_float = GL_FALSE;
1961GLboolean __WGLEW_EXT_extensions_string = GL_FALSE;
1962GLboolean __WGLEW_EXT_swap_control = GL_FALSE;
1963
1964#endif /* !GLEW_MX */
1965
1966#ifdef WGL_ARB_extensions_string
1967
1968static GLboolean _glewInit_WGL_ARB_extensions_string (WGLEW_CONTEXT_ARG_DEF_INIT)
1969{
1970  GLboolean r = GL_FALSE;
1971
1972  r = ((wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB")) == NULL) || r;
1973
1974  return r;
1975}
1976
1977#endif /* WGL_ARB_extensions_string */
1978
1979#ifdef WGL_ARB_multisample
1980
1981#endif /* WGL_ARB_multisample */
1982
1983#ifdef WGL_ARB_pbuffer
1984
1985static GLboolean _glewInit_WGL_ARB_pbuffer (WGLEW_CONTEXT_ARG_DEF_INIT)
1986{
1987  GLboolean r = GL_FALSE;
1988
1989  r = ((wglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"wglCreatePbufferARB")) == NULL) || r;
1990  r = ((wglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"wglDestroyPbufferARB")) == NULL) || r;
1991  r = ((wglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC)glewGetProcAddress((const GLubyte*)"wglGetPbufferDCARB")) == NULL) || r;
1992  r = ((wglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC)glewGetProcAddress((const GLubyte*)"wglQueryPbufferARB")) == NULL) || r;
1993  r = ((wglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC)glewGetProcAddress((const GLubyte*)"wglReleasePbufferDCARB")) == NULL) || r;
1994
1995  return r;
1996}
1997
1998#endif /* WGL_ARB_pbuffer */
1999
2000#ifdef WGL_ARB_pixel_format
2001
2002static GLboolean _glewInit_WGL_ARB_pixel_format (WGLEW_CONTEXT_ARG_DEF_INIT)
2003{
2004  GLboolean r = GL_FALSE;
2005
2006  r = ((wglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC)glewGetProcAddress((const GLubyte*)"wglChoosePixelFormatARB")) == NULL) || r;
2007  r = ((wglGetPixelFormatAttribfvARB = (PFNWGLGETPIXELFORMATATTRIBFVARBPROC)glewGetProcAddress((const GLubyte*)"wglGetPixelFormatAttribfvARB")) == NULL) || r;
2008  r = ((wglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC)glewGetProcAddress((const GLubyte*)"wglGetPixelFormatAttribivARB")) == NULL) || r;
2009
2010  return r;
2011}
2012
2013#endif /* WGL_ARB_pixel_format */
2014
2015#ifdef WGL_ARB_pixel_format_float
2016
2017#endif /* WGL_ARB_pixel_format_float */
2018
2019#ifdef WGL_ARB_render_texture
2020
2021static GLboolean _glewInit_WGL_ARB_render_texture (WGLEW_CONTEXT_ARG_DEF_INIT)
2022{
2023  GLboolean r = GL_FALSE;
2024
2025  r = ((wglBindTexImageARB = (PFNWGLBINDTEXIMAGEARBPROC)glewGetProcAddress((const GLubyte*)"wglBindTexImageARB")) == NULL) || r;
2026  r = ((wglReleaseTexImageARB = (PFNWGLRELEASETEXIMAGEARBPROC)glewGetProcAddress((const GLubyte*)"wglReleaseTexImageARB")) == NULL) || r;
2027  r = ((wglSetPbufferAttribARB = (PFNWGLSETPBUFFERATTRIBARBPROC)glewGetProcAddress((const GLubyte*)"wglSetPbufferAttribARB")) == NULL) || r;
2028
2029  return r;
2030}
2031
2032#endif /* WGL_ARB_render_texture */
2033
2034#ifdef WGL_ATI_pixel_format_float
2035
2036#endif /* WGL_ATI_pixel_format_float */
2037
2038#ifdef WGL_EXT_extensions_string
2039
2040static GLboolean _glewInit_WGL_EXT_extensions_string (WGLEW_CONTEXT_ARG_DEF_INIT)
2041{
2042  GLboolean r = GL_FALSE;
2043
2044  r = ((wglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT")) == NULL) || r;
2045
2046  return r;
2047}
2048
2049#endif /* WGL_EXT_extensions_string */
2050
2051#ifdef WGL_EXT_swap_control
2052
2053static GLboolean _glewInit_WGL_EXT_swap_control (WGLEW_CONTEXT_ARG_DEF_INIT)
2054{
2055  GLboolean r = GL_FALSE;
2056
2057  r = ((wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetSwapIntervalEXT")) == NULL) || r;
2058  r = ((wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)glewGetProcAddress((const GLubyte*)"wglSwapIntervalEXT")) == NULL) || r;
2059
2060  return r;
2061}
2062
2063#endif /* WGL_EXT_swap_control */
2064
2065/* ------------------------------------------------------------------------- */
2066
2067static PFNWGLGETEXTENSIONSSTRINGARBPROC _wglewGetExtensionsStringARB = NULL;
2068static PFNWGLGETEXTENSIONSSTRINGEXTPROC _wglewGetExtensionsStringEXT = NULL;
2069
2070GLboolean wglewGetExtension (const char* name)
2071{   
2072  GLubyte* p;
2073  GLubyte* end;
2074  GLuint len = _glewStrLen((const GLubyte*)name);
2075  if (_wglewGetExtensionsStringARB == NULL)
2076    if (_wglewGetExtensionsStringEXT == NULL)
2077      return GL_FALSE;
2078    else
2079      p = (GLubyte*)_wglewGetExtensionsStringEXT();
2080  else
2081    p = (GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC());
2082  if (0 == p) return GL_FALSE;
2083  end = p + _glewStrLen(p);
2084  while (p < end)
2085  {
2086    GLuint n = _glewStrCLen(p, ' ');
2087    if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE;
2088    p += n+1;
2089  }
2090  return GL_FALSE;
2091}
2092
2093GLenum wglewContextInit (WGLEW_CONTEXT_ARG_DEF_LIST)
2094{
2095  GLboolean crippled;
2096  /* find wgl extension string query functions */
2097  if (_wglewGetExtensionsStringARB == NULL)
2098    _wglewGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB");
2099  if (_wglewGetExtensionsStringEXT == NULL)
2100    _wglewGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT");
2101  /* initialize extensions */
2102  crippled = _wglewGetExtensionsStringARB == NULL && _wglewGetExtensionsStringEXT == NULL;
2103#ifdef WGL_ARB_extensions_string
2104  WGLEW_ARB_extensions_string = wglewGetExtension("WGL_ARB_extensions_string");
2105  if (glewExperimental || WGLEW_ARB_extensions_string|| crippled) WGLEW_ARB_extensions_string= !_glewInit_WGL_ARB_extensions_string(GLEW_CONTEXT_ARG_VAR_INIT);
2106#endif /* WGL_ARB_extensions_string */
2107#ifdef WGL_ARB_multisample
2108  WGLEW_ARB_multisample = wglewGetExtension("WGL_ARB_multisample");
2109#endif /* WGL_ARB_multisample */
2110#ifdef WGL_ARB_pbuffer
2111  WGLEW_ARB_pbuffer = wglewGetExtension("WGL_ARB_pbuffer");
2112  if (glewExperimental || WGLEW_ARB_pbuffer|| crippled) WGLEW_ARB_pbuffer= !_glewInit_WGL_ARB_pbuffer(GLEW_CONTEXT_ARG_VAR_INIT);
2113#endif /* WGL_ARB_pbuffer */
2114#ifdef WGL_ARB_pixel_format
2115  WGLEW_ARB_pixel_format = wglewGetExtension("WGL_ARB_pixel_format");
2116  if (glewExperimental || WGLEW_ARB_pixel_format|| crippled) WGLEW_ARB_pixel_format= !_glewInit_WGL_ARB_pixel_format(GLEW_CONTEXT_ARG_VAR_INIT);
2117#endif /* WGL_ARB_pixel_format */
2118#ifdef WGL_ARB_pixel_format_float
2119  WGLEW_ARB_pixel_format_float = wglewGetExtension("WGL_ARB_pixel_format_float");
2120#endif /* WGL_ARB_pixel_format_float */
2121#ifdef WGL_ARB_render_texture
2122  WGLEW_ARB_render_texture = wglewGetExtension("WGL_ARB_render_texture");
2123  if (glewExperimental || WGLEW_ARB_render_texture|| crippled) WGLEW_ARB_render_texture= !_glewInit_WGL_ARB_render_texture(GLEW_CONTEXT_ARG_VAR_INIT);
2124#endif /* WGL_ARB_render_texture */
2125#ifdef WGL_ATI_pixel_format_float
2126  WGLEW_ATI_pixel_format_float = wglewGetExtension("WGL_ATI_pixel_format_float");
2127#endif /* WGL_ATI_pixel_format_float */
2128#ifdef WGL_EXT_extensions_string
2129  WGLEW_EXT_extensions_string = wglewGetExtension("WGL_EXT_extensions_string");
2130  if (glewExperimental || WGLEW_EXT_extensions_string|| crippled) WGLEW_EXT_extensions_string= !_glewInit_WGL_EXT_extensions_string(GLEW_CONTEXT_ARG_VAR_INIT);
2131#endif /* WGL_EXT_extensions_string */
2132#ifdef WGL_EXT_swap_control
2133  WGLEW_EXT_swap_control = wglewGetExtension("WGL_EXT_swap_control");
2134  if (glewExperimental || WGLEW_EXT_swap_control|| crippled) WGLEW_EXT_swap_control= !_glewInit_WGL_EXT_swap_control(GLEW_CONTEXT_ARG_VAR_INIT);
2135#endif /* WGL_EXT_swap_control */
2136
2137  return GLEW_OK;
2138}
2139
2140#endif /* !__APPLE__ || GLEW_APPLE_GLX */
2141
Note: See TracBrowser for help on using the repository browser.