- incremented version to 3.6.1-dev
- a few changes to opengl version checking (now uses glew)
This commit is contained in:
parent
dc6cd9281f
commit
b6d7d1234c
|
@ -119,7 +119,8 @@ void Renderer::transform(float rotX, float rotY, float zoom) {
|
||||||
|
|
||||||
void Renderer::checkGlCaps() {
|
void Renderer::checkGlCaps() {
|
||||||
//opengl 1.3
|
//opengl 1.3
|
||||||
if(!isGlVersionSupported(1, 3, 0)) {
|
//if(!isGlVersionSupported(1, 3, 0)) {
|
||||||
|
if(glewIsSupported("GL_VERSION_1_3") == false) {
|
||||||
string message;
|
string message;
|
||||||
|
|
||||||
message += "Your system supports OpenGL version \"";
|
message += "Your system supports OpenGL version \"";
|
||||||
|
@ -131,7 +132,8 @@ void Renderer::checkGlCaps() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//opengl 1.4 or extension
|
//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");
|
checkExtension("GL_ARB_texture_env_crossbar", "MegaGlest");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ using namespace Shared::Platform;
|
||||||
namespace Glest { namespace Game {
|
namespace Glest { namespace Game {
|
||||||
|
|
||||||
const char *mailString = " http://bugs.megaglest.org";
|
const char *mailString = " http://bugs.megaglest.org";
|
||||||
const string glestVersionString = "v3.6.0";
|
const string glestVersionString = "v3.6.1-dev";
|
||||||
#if defined(SVNVERSION)
|
#if defined(SVNVERSION)
|
||||||
const string SVN_Rev = string("Rev: ") + string(SVNVERSION);
|
const string SVN_Rev = string("Rev: ") + string(SVNVERSION);
|
||||||
#elif defined(SVNVERSIONHEADER)
|
#elif defined(SVNVERSIONHEADER)
|
||||||
|
|
|
@ -6428,7 +6428,8 @@ void Renderer::checkGlCaps() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//opengl 1.3
|
//opengl 1.3
|
||||||
if(!isGlVersionSupported(1, 3, 0)) {
|
//if(!isGlVersionSupported(1, 3, 0)) {
|
||||||
|
if(glewIsSupported("GL_VERSION_1_3") == false) {
|
||||||
string message;
|
string message;
|
||||||
|
|
||||||
message += "Your system supports OpenGL version \"";
|
message += "Your system supports OpenGL version \"";
|
||||||
|
@ -6440,7 +6441,8 @@ void Renderer::checkGlCaps() {
|
||||||
}
|
}
|
||||||
|
|
||||||
//opengl 1.4 or extension
|
//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");
|
checkExtension("GL_ARB_texture_env_crossbar", "MegaGlest");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ void setVBOSupported(bool value);
|
||||||
|
|
||||||
void overrideGlExtensionSupport(const char *extensionName,bool value);
|
void overrideGlExtensionSupport(const char *extensionName,bool value);
|
||||||
bool isGlExtensionSupported(const char *extensionName);
|
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 *getGlVersion();
|
||||||
const char *getGlRenderer();
|
const char *getGlRenderer();
|
||||||
const char *getGlVendor();
|
const char *getGlVendor();
|
||||||
|
|
|
@ -72,49 +72,49 @@ bool isGlExtensionSupported(const char *extensionName) {
|
||||||
return cacheExtensionCheckList[extensionName];
|
return cacheExtensionCheckList[extensionName];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isGlVersionSupported(int major, int minor, int release) {
|
//bool isGlVersionSupported(int major, int minor, int release) {
|
||||||
|
//
|
||||||
const char *strVersion= getGlVersion();
|
// const char *strVersion= getGlVersion();
|
||||||
|
//
|
||||||
//major
|
// //major
|
||||||
const char *majorTok= strVersion;
|
// const char *majorTok= strVersion;
|
||||||
int majorSupported= atoi(majorTok);
|
// int majorSupported= atoi(majorTok);
|
||||||
|
//
|
||||||
if(majorSupported<major) {
|
// if(majorSupported<major) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else if(majorSupported>major) {
|
// else if(majorSupported>major) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
//minor
|
// //minor
|
||||||
int i=0;
|
// int i=0;
|
||||||
while(strVersion[i]!='.') {
|
// while(strVersion[i]!='.') {
|
||||||
++i;
|
// ++i;
|
||||||
}
|
// }
|
||||||
const char *minorTok= &strVersion[i]+1;
|
// const char *minorTok= &strVersion[i]+1;
|
||||||
int minorSupported= atoi(minorTok);
|
// int minorSupported= atoi(minorTok);
|
||||||
|
//
|
||||||
if(minorSupported<minor) {
|
// if(minorSupported<minor) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
else if(minorSupported>minor) {
|
// else if(minorSupported>minor) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
//release
|
// //release
|
||||||
++i;
|
// ++i;
|
||||||
while(strVersion[i]!='.') {
|
// while(strVersion[i]!='.') {
|
||||||
++i;
|
// ++i;
|
||||||
}
|
// }
|
||||||
const char *releaseTok= &strVersion[i]+1;
|
// const char *releaseTok= &strVersion[i]+1;
|
||||||
|
//
|
||||||
if(atoi(releaseTok) < release) {
|
// if(atoi(releaseTok) < release) {
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
return true;
|
// return true;
|
||||||
}
|
//}
|
||||||
|
|
||||||
const char *getGlVersion() {
|
const char *getGlVersion() {
|
||||||
return reinterpret_cast<const char *>(glGetString(GL_VERSION));
|
return reinterpret_cast<const char *>(glGetString(GL_VERSION));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user