From 6a211c753fb4e9c666cedbeb03457e262306da66 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sat, 21 Feb 2015 19:42:42 +1000 Subject: [PATCH] [CoreSupport] For OpenGL 3.0 onwards use glGetStringi rather than glGetString(GL_EXTENSIONS) --- auto/src/glew_init_gl.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/auto/src/glew_init_gl.c b/auto/src/glew_init_gl.c index 8606b24..336f9ea 100644 --- a/auto/src/glew_init_gl.c +++ b/auto/src/glew_init_gl.c @@ -117,7 +117,30 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) if (GLEW_VERSION_3_0) { - /* TODO */ + GLint n = 0; + GLint i; + PFNGLGETSTRINGIPROC getStringi; + const char *ext; + + glGetIntegerv(GL_NUM_EXTENSIONS, &n); + + /* glGetStringi is OpenGL 3.0 */ + getStringi = (PFNGLGETSTRINGIPROC) glewGetProcAddress((const GLubyte*)"glGetStringi"); + if (glGetStringi) + for (i = 0; i