2015-02-04 14:27:59 +00:00
|
|
|
|
2015-02-04 14:44:01 +00:00
|
|
|
/* query opengl extensions string(s) */
|
|
|
|
if(GLEW_VERSION_3_0)
|
|
|
|
{
|
|
|
|
GLuint len;
|
|
|
|
struct initflag *ptr;
|
|
|
|
|
|
|
|
glGetIntegerv(GL_NUM_EXTENSIONS, &numExts);
|
|
|
|
for (ext = 0; ext < numExts; ext++)
|
|
|
|
{
|
|
|
|
extStart = glGetStringi(GL_EXTENSIONS, ext);
|
|
|
|
len = _glewStrLen(extStart);
|
|
|
|
ptr = in_word_set(extStart, len);
|
2015-02-04 14:27:59 +00:00
|
|
|
|
2015-02-04 14:44:01 +00:00
|
|
|
if (ptr != NULL && ptr->flag != NULL) {
|
|
|
|
#ifdef GLEW_MX
|
|
|
|
*(GLboolean *)((char *)ctx + (size_t)(ptr->flag)) = GL_TRUE;
|
|
|
|
#else
|
|
|
|
*ptr->flag = GL_TRUE;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
extStart += len + 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2015-02-04 14:27:59 +00:00
|
|
|
{
|
2015-02-04 14:44:01 +00:00
|
|
|
extStart = glGetString(GL_EXTENSIONS);
|
|
|
|
if (extStart == 0)
|
|
|
|
extStart = (const GLubyte*)"";
|
|
|
|
extEnd = extStart + _glewStrLen(extStart);
|
|
|
|
|
|
|
|
while (extStart < extEnd)
|
|
|
|
{
|
|
|
|
GLuint len = _glewStrCLen(extStart, ' ');
|
|
|
|
struct initflag *ptr = in_word_set(extStart, len);
|
2015-02-04 14:27:59 +00:00
|
|
|
|
2015-02-04 14:44:01 +00:00
|
|
|
if (ptr != NULL && ptr->flag != NULL) {
|
2015-02-04 14:27:59 +00:00
|
|
|
#ifdef GLEW_MX
|
2015-02-04 14:44:01 +00:00
|
|
|
*(GLboolean *)((char *)ctx + (size_t)(ptr->flag)) = GL_TRUE;
|
2015-02-04 14:27:59 +00:00
|
|
|
#else
|
2015-02-04 14:44:01 +00:00
|
|
|
*ptr->flag = GL_TRUE;
|
2015-02-04 14:27:59 +00:00
|
|
|
#endif
|
2015-02-04 14:44:01 +00:00
|
|
|
}
|
|
|
|
extStart += len + 1;
|
2015-02-04 14:27:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* initialize extensions */
|