|
|
|
@ -213,7 +213,10 @@ Context::Context() { |
|
|
|
|
|
|
|
|
|
|
|
/* OpenGL 2.1 / OpenGL ES 2.0 doesn't have glGetStringi() */ |
|
|
|
/* OpenGL 2.1 / OpenGL ES 2.0 doesn't have glGetStringi() */ |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
vector<string> extensions = Corrade::Utility::split(reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)), ' '); |
|
|
|
/* Don't crash when glGetString() returns nullptr */ |
|
|
|
|
|
|
|
const char* e = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); |
|
|
|
|
|
|
|
if(e) { |
|
|
|
|
|
|
|
vector<string> extensions = Corrade::Utility::split(e, ' '); |
|
|
|
for(const string& extension: extensions) { |
|
|
|
for(const string& extension: extensions) { |
|
|
|
auto found = futureExtensions.find(extension); |
|
|
|
auto found = futureExtensions.find(extension); |
|
|
|
if(found != futureExtensions.end()) { |
|
|
|
if(found != futureExtensions.end()) { |
|
|
|
@ -222,6 +225,7 @@ Context::Context() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Set this context as current */ |
|
|
|
/* Set this context as current */ |
|
|
|
CORRADE_ASSERT(!_current, "Context: Another context currently active", ); |
|
|
|
CORRADE_ASSERT(!_current, "Context: Another context currently active", ); |
|
|
|
|