void checkGlExtension(const char *extensionName){ if(!isGlExtensionSupported(extensionName)){ throw runtime_error("OpenGL extension not supported: " + string(extensionName)); } }
void Renderer::checkExtension(const string &extension, const string &msg) { if(isGlExtensionSupported(extension.c_str()) == false) { string str= "OpenGL extension not supported: " + extension + ", required for " + msg; throw megaglest_runtime_error(str); } }