Created
April 29, 2014 13:43
-
-
Save xophiix/11400791 to your computer and use it in GitHub Desktop.
print gl extensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string extensions = (const char*)glGetString(GL_EXTENSIONS); | |
set<string> extensionSet; | |
size_t strStart = 0; | |
for (size_t i = 0; i < extensions.size(); ++i) { | |
if (extensions[i] == ' ') { | |
string ext = extensions.substr(strStart, i - strStart); | |
extensionSet.insert(ext); | |
strStart = i+1; | |
} | |
} | |
string extensionSorted = "gles extension begin: \n"; | |
for (auto idx: extensionSet) { | |
extensionSorted += idx + "\n"; | |
} | |
extensionSorted += "gles extension end"; | |
SHANA_LOG("%s", extensionSorted.c_str()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment