mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-23 07:05:07 +00:00
Generate Sources of origin/master updated at Sat Apr 2 17:45:55 GMT 2016
This commit is contained in:
parent
ebeeabace8
commit
530355e698
13
src/glew.c
13
src/glew.c
@ -13235,11 +13235,15 @@ static GLenum GLEWAPIENTRY glewContextInit ()
|
||||
GLint major, minor;
|
||||
size_t n;
|
||||
|
||||
/* query opengl version */
|
||||
getString = (PFNGLGETSTRINGPROC) glewGetProcAddress((const GLubyte*)"glGetString");
|
||||
#ifdef _WIN32
|
||||
getString = glGetString;
|
||||
#else
|
||||
getString = (PFNGLGETSTRINGPROC) glewGetProcAddress((const GLubyte*)"glGetString");
|
||||
if (!getString)
|
||||
return GLEW_ERROR_NO_GL_VERSION;
|
||||
#endif
|
||||
|
||||
/* query opengl version */
|
||||
s = getString(GL_VERSION);
|
||||
dot = _glewStrCLen(s, '.');
|
||||
if (dot == 0)
|
||||
@ -13291,7 +13295,12 @@ static GLenum GLEWAPIENTRY glewContextInit ()
|
||||
const char *ext;
|
||||
GLboolean *enable;
|
||||
|
||||
#ifdef _WIN32
|
||||
getIntegerv = glGetIntegerv;
|
||||
#else
|
||||
getIntegerv = (PFNGLGETINTEGERVPROC) glewGetProcAddress((const GLubyte*)"glGetIntegerv");
|
||||
#endif
|
||||
|
||||
if (getIntegerv)
|
||||
getIntegerv(GL_NUM_EXTENSIONS, &n);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user