From 6a1765cab8f8caca28498ae52405ccdc6d76e0b9 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sun, 22 Feb 2015 00:37:29 +1000 Subject: [PATCH] [CoreSupport] Linux/GLX touch-ups for GL 3.0 + extension detection, GLX. --- auto/bin/make_list.pl | 12 ++++++++---- auto/src/glew_init_gl.c | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/auto/bin/make_list.pl b/auto/bin/make_list.pl index 7cea8c8..27bc27c 100755 --- a/auto/bin/make_list.pl +++ b/auto/bin/make_list.pl @@ -42,10 +42,15 @@ if (@ARGV) #my $pextvar = prefix_varname($extvar); + print "#ifdef $extname\n"; + + if (length($extstring) && $extstring !~ /^GL_/) + { + print " " . $extvar . " = _glewSearchExtension(\"$extstring\", extStart, extEnd);\n"; + } + if (keys %$functions) { - print "#ifdef $extname\n"; - if ($extname =~ /WGL_.*/) { print " if (glewExperimental || " . $extvar . "|| crippled) " . $extvar . "= !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n"; @@ -54,9 +59,8 @@ if (@ARGV) { print " if (glewExperimental || " . $extvar . ") " . $extvar . " = !_glewInit_$extname(GLEW_CONTEXT_ARG_VAR_INIT);\n"; } - - print "#endif /* $extname */\n"; } + print "#endif /* $extname */\n"; } } diff --git a/auto/src/glew_init_gl.c b/auto/src/glew_init_gl.c index 890574b..4693d8e 100644 --- a/auto/src/glew_init_gl.c +++ b/auto/src/glew_init_gl.c @@ -122,7 +122,7 @@ GLenum GLEWAPIENTRY glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST) /* glGetStringi is OpenGL 3.0 */ getStringi = (PFNGLGETSTRINGIPROC) glewGetProcAddress((const GLubyte*)"glGetStringi"); - if (glGetStringi) + if (getStringi) for (i = 0; i