diff --git a/source/g3d_viewer/renderer.cpp b/source/g3d_viewer/renderer.cpp index cf20074d..b333fb84 100644 --- a/source/g3d_viewer/renderer.cpp +++ b/source/g3d_viewer/renderer.cpp @@ -119,7 +119,8 @@ void Renderer::transform(float rotX, float rotY, float zoom) { void Renderer::checkGlCaps() { //opengl 1.3 - if(!isGlVersionSupported(1, 3, 0)) { + //if(!isGlVersionSupported(1, 3, 0)) { + if(glewIsSupported("GL_VERSION_1_3") == false) { string message; message += "Your system supports OpenGL version \""; @@ -131,7 +132,8 @@ void Renderer::checkGlCaps() { } //opengl 1.4 or extension - if(isGlVersionSupported(1, 4, 0) == false) { + //if(isGlVersionSupported(1, 4, 0) == false) { + if(glewIsSupported("GL_VERSION_1_4") == false) { checkExtension("GL_ARB_texture_env_crossbar", "MegaGlest"); } } diff --git a/source/glest_game/facilities/game_util.cpp b/source/glest_game/facilities/game_util.cpp index 6de9feaf..a3dc7c74 100644 --- a/source/glest_game/facilities/game_util.cpp +++ b/source/glest_game/facilities/game_util.cpp @@ -27,7 +27,7 @@ using namespace Shared::Platform; namespace Glest { namespace Game { const char *mailString = " http://bugs.megaglest.org"; -const string glestVersionString = "v3.6.0"; +const string glestVersionString = "v3.6.1-dev"; #if defined(SVNVERSION) const string SVN_Rev = string("Rev: ") + string(SVNVERSION); #elif defined(SVNVERSIONHEADER) diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index a8b420cc..7630bebd 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -6428,7 +6428,8 @@ void Renderer::checkGlCaps() { } //opengl 1.3 - if(!isGlVersionSupported(1, 3, 0)) { + //if(!isGlVersionSupported(1, 3, 0)) { + if(glewIsSupported("GL_VERSION_1_3") == false) { string message; message += "Your system supports OpenGL version \""; @@ -6440,7 +6441,8 @@ void Renderer::checkGlCaps() { } //opengl 1.4 or extension - if(!isGlVersionSupported(1, 4, 0)){ + //if(!isGlVersionSupported(1, 4, 0)){ + if(glewIsSupported("GL_VERSION_1_4") == false) { checkExtension("GL_ARB_texture_env_crossbar", "MegaGlest"); } } diff --git a/source/shared_lib/include/graphics/gl/opengl.h b/source/shared_lib/include/graphics/gl/opengl.h index 5bd29fc8..473ba9a8 100644 --- a/source/shared_lib/include/graphics/gl/opengl.h +++ b/source/shared_lib/include/graphics/gl/opengl.h @@ -36,7 +36,7 @@ void setVBOSupported(bool value); void overrideGlExtensionSupport(const char *extensionName,bool value); bool isGlExtensionSupported(const char *extensionName); -bool isGlVersionSupported(int major, int minor, int release); +//bool isGlVersionSupported(int major, int minor, int release); const char *getGlVersion(); const char *getGlRenderer(); const char *getGlVendor(); diff --git a/source/shared_lib/sources/graphics/gl/opengl.cpp b/source/shared_lib/sources/graphics/gl/opengl.cpp index a1fc7ece..6d875a8e 100644 --- a/source/shared_lib/sources/graphics/gl/opengl.cpp +++ b/source/shared_lib/sources/graphics/gl/opengl.cpp @@ -72,49 +72,49 @@ bool isGlExtensionSupported(const char *extensionName) { return cacheExtensionCheckList[extensionName]; } -bool isGlVersionSupported(int major, int minor, int release) { - - const char *strVersion= getGlVersion(); - - //major - const char *majorTok= strVersion; - int majorSupported= atoi(majorTok); - - if(majorSupportedmajor) { - return true; - } - - //minor - int i=0; - while(strVersion[i]!='.') { - ++i; - } - const char *minorTok= &strVersion[i]+1; - int minorSupported= atoi(minorTok); - - if(minorSupportedminor) { - return true; - } - - //release - ++i; - while(strVersion[i]!='.') { - ++i; - } - const char *releaseTok= &strVersion[i]+1; - - if(atoi(releaseTok) < release) { - return false; - } - - return true; -} +//bool isGlVersionSupported(int major, int minor, int release) { +// +// const char *strVersion= getGlVersion(); +// +// //major +// const char *majorTok= strVersion; +// int majorSupported= atoi(majorTok); +// +// if(majorSupportedmajor) { +// return true; +// } +// +// //minor +// int i=0; +// while(strVersion[i]!='.') { +// ++i; +// } +// const char *minorTok= &strVersion[i]+1; +// int minorSupported= atoi(minorTok); +// +// if(minorSupportedminor) { +// return true; +// } +// +// //release +// ++i; +// while(strVersion[i]!='.') { +// ++i; +// } +// const char *releaseTok= &strVersion[i]+1; +// +// if(atoi(releaseTok) < release) { +// return false; +// } +// +// return true; +//} const char *getGlVersion() { return reinterpret_cast(glGetString(GL_VERSION));