2003-07-06 15:01:13 +00:00
|
|
|
return GLEW_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _WIN32 */
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------ */
|
|
|
|
|
2003-09-12 03:50:22 +00:00
|
|
|
const GLubyte* glewGetErrorString (GLenum error)
|
2003-07-06 15:01:13 +00:00
|
|
|
{
|
2003-09-12 03:50:22 +00:00
|
|
|
static const GLubyte* _glewErrorString[] =
|
2003-07-06 15:01:13 +00:00
|
|
|
{
|
|
|
|
"no error",
|
|
|
|
"missing GL version",
|
|
|
|
"GL 1.1 and up are not supported",
|
|
|
|
"GLX 1.2 and up are not supported",
|
|
|
|
"unknown error"
|
|
|
|
};
|
2003-10-01 03:23:35 +00:00
|
|
|
if (error > 4) error = 4;
|
2003-07-06 15:01:13 +00:00
|
|
|
return _glewErrorString[error];
|
|
|
|
}
|
|
|
|
|
2003-09-12 03:50:22 +00:00
|
|
|
const GLubyte* glewGetString (GLenum name)
|
|
|
|
{
|
|
|
|
static const GLubyte* _glewString[] =
|
|
|
|
{
|
|
|
|
NULL,
|
|
|
|
"GLEW_VERSION_STRING"
|
|
|
|
};
|
2003-10-01 03:23:35 +00:00
|
|
|
if (name > 1) name = 0;
|
2003-09-12 03:50:22 +00:00
|
|
|
return _glewString[name];
|
|
|
|
}
|
|
|
|
|
2003-07-06 15:01:13 +00:00
|
|
|
/* ------------------------------------------------------------------------ */
|
|
|
|
|
|
|
|
GLboolean glewExperimental = GL_FALSE;
|
|
|
|
|
2003-09-12 03:50:22 +00:00
|
|
|
GLenum glewInit ()
|
2003-07-06 15:01:13 +00:00
|
|
|
{
|
2003-09-12 03:50:22 +00:00
|
|
|
GLenum r;
|
2003-07-06 15:01:13 +00:00
|
|
|
if ( (r = _glewInit()) ) return r;
|
|
|
|
#ifdef _WIN32
|
|
|
|
return _wglewInit();
|
|
|
|
#else /* _UNIX */
|
|
|
|
return _glxewInit();
|
|
|
|
#endif /* _WIN32 */
|
|
|
|
}
|