From 08622e9601da87b2c663042a06ba404e6bc1577a Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Mon, 20 Jul 2015 15:15:04 +0200 Subject: [PATCH] Use different extension detection mechanism I got this from looking at the code from the glew utility 'glewinfo' on my system it reported the following for GL_ARB_geometry_shader4: OK [MISSING]. This lead me to believe that there are two different ways of determining extensions. The first 'OK' seems to refer to the entrypoint existing while the second one seems to refer to the extension being available. The difference is this: The first OK comes from : GLEW_ARB_geometry_shader4 the global whereas the second 'MISSING' comes from glewGetExtension("GL_ARB_geometry_shader4"). By replacing the gglHasExtension I got the desired result. We may want to implement some caching if we want to keep using GLEW perhaps? Anyway I suggest this merely as a test, I'm not sure if this is a viable long-term solution. --- Engine/source/gfx/gl/tGL/tGL.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Engine/source/gfx/gl/tGL/tGL.h b/Engine/source/gfx/gl/tGL/tGL.h index aa1275ee5..849f49093 100644 --- a/Engine/source/gfx/gl/tGL/tGL.h +++ b/Engine/source/gfx/gl/tGL/tGL.h @@ -24,7 +24,8 @@ #define T_GL_H #include "GL/glew.h" -#define gglHasExtension(EXTENSION) GLEW_##EXTENSION +// Slower but reliably detects extensions +#define gglHasExtension(EXTENSION) glewGetExtension("GL_##EXTENSION") #endif