2003-07-06 15:01:13 +00:00
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
2004-02-19 04:37:07 +00:00
|
|
|
static PFNWGLGETEXTENSIONSSTRINGARBPROC _wglewGetExtensionsStringARB = NULL;
|
|
|
|
static PFNWGLGETEXTENSIONSSTRINGEXTPROC _wglewGetExtensionsStringEXT = NULL;
|
|
|
|
|
2004-02-01 22:27:31 +00:00
|
|
|
GLboolean wglewGetExtension (const char* name)
|
2003-07-06 15:01:13 +00:00
|
|
|
{
|
2011-03-30 16:38:25 +00:00
|
|
|
const GLubyte* start;
|
|
|
|
const GLubyte* end;
|
2004-02-19 04:37:07 +00:00
|
|
|
if (_wglewGetExtensionsStringARB == NULL)
|
|
|
|
if (_wglewGetExtensionsStringEXT == NULL)
|
2003-07-06 15:01:13 +00:00
|
|
|
return GL_FALSE;
|
|
|
|
else
|
2011-03-30 16:38:25 +00:00
|
|
|
start = (const GLubyte*)_wglewGetExtensionsStringEXT();
|
2003-07-06 15:01:13 +00:00
|
|
|
else
|
2011-03-30 16:38:25 +00:00
|
|
|
start = (const GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC());
|
|
|
|
if (start == 0)
|
|
|
|
return GL_FALSE;
|
|
|
|
end = start + _glewStrLen(start);
|
|
|
|
return _glewSearchExtension(name, start, end);
|
2003-07-06 15:01:13 +00:00
|
|
|
}
|
|
|
|
|
2004-02-19 09:43:14 +00:00
|
|
|
GLenum wglewContextInit (WGLEW_CONTEXT_ARG_DEF_LIST)
|
2003-07-06 15:01:13 +00:00
|
|
|
{
|
2003-09-15 15:35:32 +00:00
|
|
|
GLboolean crippled;
|
2011-03-30 16:38:25 +00:00
|
|
|
const GLubyte* start;
|
|
|
|
const GLubyte* end;
|
2003-07-06 15:01:13 +00:00
|
|
|
/* find wgl extension string query functions */
|
2007-04-27 03:05:05 +00:00
|
|
|
_wglewGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringARB");
|
|
|
|
_wglewGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC)glewGetProcAddress((const GLubyte*)"wglGetExtensionsStringEXT");
|
2011-03-30 16:38:25 +00:00
|
|
|
/* query wgl extension string */
|
|
|
|
if (_wglewGetExtensionsStringARB == NULL)
|
|
|
|
if (_wglewGetExtensionsStringEXT == NULL)
|
|
|
|
start = (const GLubyte*)"";
|
|
|
|
else
|
|
|
|
start = (const GLubyte*)_wglewGetExtensionsStringEXT();
|
|
|
|
else
|
|
|
|
start = (const GLubyte*)_wglewGetExtensionsStringARB(wglGetCurrentDC());
|
|
|
|
end = start + _glewStrLen(start);
|
2003-07-06 15:01:13 +00:00
|
|
|
/* initialize extensions */
|
2004-02-19 04:37:07 +00:00
|
|
|
crippled = _wglewGetExtensionsStringARB == NULL && _wglewGetExtensionsStringEXT == NULL;
|