2003-07-06 15:01:13 +00:00
|
|
|
return GLEW_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
2003-09-15 16:53:02 +00:00
|
|
|
GLboolean wglewGetExtension (const GLubyte *name)
|
2003-07-06 15:01:13 +00:00
|
|
|
{
|
2003-09-15 16:53:02 +00:00
|
|
|
GLubyte *p, *end;
|
|
|
|
GLuint len = _glewStrLen(name);
|
2003-07-06 15:01:13 +00:00
|
|
|
if (wglGetExtensionsStringARB == NULL)
|
|
|
|
if (wglGetExtensionsStringEXT == NULL)
|
|
|
|
return GL_FALSE;
|
|
|
|
else
|
2003-09-15 16:53:02 +00:00
|
|
|
p = (GLubyte*)wglGetExtensionsStringEXT();
|
2003-07-06 15:01:13 +00:00
|
|
|
else
|
2003-09-15 16:53:02 +00:00
|
|
|
p = (GLubyte*)wglGetExtensionsStringARB(wglGetCurrentDC());
|
2003-07-06 15:01:13 +00:00
|
|
|
if (0 == p) return GL_FALSE;
|
|
|
|
end = p + _glewStrLen(p);
|
|
|
|
while (p < end)
|
|
|
|
{
|
2003-09-15 16:53:02 +00:00
|
|
|
GLuint n = _glewStrCLen(p, ' ');
|
2003-07-06 15:01:13 +00:00
|
|
|
if (len == n && _glewStrSame(name, p, n)) return GL_TRUE;
|
|
|
|
p += n+1;
|
|
|
|
}
|
|
|
|
return GL_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GLuint _wglewInit ()
|
|
|
|
{
|
2003-09-15 15:35:32 +00:00
|
|
|
GLboolean crippled;
|
2003-07-06 15:01:13 +00:00
|
|
|
/* find wgl extension string query functions */
|
|
|
|
_glewInit_WGL_ARB_extensions_string();
|
|
|
|
WGLEW_ARB_extensions_string = wglGetExtensionsStringARB != NULL;
|
|
|
|
_glewInit_WGL_EXT_extensions_string();
|
|
|
|
WGLEW_EXT_extensions_string = wglGetExtensionsStringEXT != NULL;
|
|
|
|
/* initialize extensions */
|
2003-09-15 15:35:32 +00:00
|
|
|
crippled = !(WGLEW_ARB_extensions_string || WGLEW_EXT_extensions_string);
|