mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-13 10:33:48 +00:00
added check for crippled hardware
git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@409 783a27ee-832a-0410-bc00-9f386506c6dd
This commit is contained in:
parent
8a9cb98efb
commit
782992e803
@ -32,12 +32,24 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
|
|||||||
{
|
{
|
||||||
const GLubyte* s;
|
const GLubyte* s;
|
||||||
GLuint major, minor;
|
GLuint major, minor;
|
||||||
|
/* check for SiS driver */
|
||||||
|
s = glGetString(GL_RENDERER);
|
||||||
|
if (s && _glewStrSame(s,"SiS",3))
|
||||||
|
{
|
||||||
|
GLEW_VERSION_1_1 = GL_TRUE;
|
||||||
|
GLEW_VERSION_1_2 = GL_FALSE;
|
||||||
|
GLEW_VERSION_1_3 = GL_FALSE;
|
||||||
|
GLEW_VERSION_1_4 = GL_FALSE;
|
||||||
|
GLEW_VERSION_1_5 = GL_FALSE;
|
||||||
|
GLEW_VERSION_2_0 = GL_FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
/* query opengl version */
|
/* query opengl version */
|
||||||
s = glGetString(GL_VERSION);
|
s = glGetString(GL_VERSION);
|
||||||
if (!s) return GLEW_ERROR_NO_GL_VERSION;
|
if (!s) return GLEW_ERROR_NO_GL_VERSION;
|
||||||
major = _glewStrCLen(s, '.')-1;
|
major = _glewStrCLen(s, '.')-1;
|
||||||
minor = _glewStrCLen(s, '.')+1;
|
minor = _glewStrCLen(s, '.')+1;
|
||||||
|
|
||||||
if (s+major == NULL
|
if (s+major == NULL
|
||||||
|| s+minor-1 == NULL || s+minor == NULL
|
|| s+minor-1 == NULL || s+minor == NULL
|
||||||
|| (s[major] == 1 && s[minor] < '1'))
|
|| (s[major] == 1 && s[minor] < '1'))
|
||||||
@ -104,4 +116,5 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* initialize extensions */
|
/* initialize extensions */
|
||||||
|
Loading…
Reference in New Issue
Block a user