diff --git a/source/Irrlicht/OpenGL/ExtensionHandler.cpp b/source/Irrlicht/OpenGL/ExtensionHandler.cpp index 297aa943..055738b9 100644 --- a/source/Irrlicht/OpenGL/ExtensionHandler.cpp +++ b/source/Irrlicht/OpenGL/ExtensionHandler.cpp @@ -9,6 +9,7 @@ #include "irrString.h" #include "SMaterial.h" #include "fast_atof.h" +#include namespace irr { @@ -16,9 +17,22 @@ namespace video { void COpenGL3ExtensionHandler::initExtensions() { - getGLVersion(); + GLint major, minor; + glGetIntegerv(GL_MAJOR_VERSION, &major); + glGetIntegerv(GL_MINOR_VERSION, &minor); + Version = 100 * major + 10 * minor; - getGLExtensions(); + GLint ext_count = 0; + GL.GetIntegerv(GL_NUM_EXTENSIONS, &ext_count); + for (int k = 0; k < ext_count; k++) { + auto ext_name = (char *)GL.GetStringi(GL_EXTENSIONS, k); + for (size_t j=0; j