60 inline const char *_getExtensionString() {
61 const char *supported_cstr =
reinterpret_cast<const char*
>(glGetString(GL_EXTENSIONS));
62 if (supported_cstr == 0) {
63 std::cerr <<
"\x1b[1;31mACG::checkExtensionsSupported: "
64 "glGetString(GL_EXTENSIONS) call failed.\x1b[0m\n";
67 return supported_cstr;
78 static const std::string supported_str(_getExtensionString());
85 for (std::istringstream supported(supported_str); !supported.eof(); ) {
88 if (feature == _extension)
return true;
98 std::string glVersionString = (
const char*)glGetString(GL_VERSION);
101 std::istringstream stream;
102 stream.str(glVersionString);
116 if ( (_major > major) || ( (_major == major) && (_minor > minor)) ) {
117 std::cerr <<
"OpenGL Version check failed. Required : " << _major <<
"." << _minor << std::endl;
118 std::cerr <<
"OpenGL Version check failed. Available : " << major <<
"." << minor << std::endl;
Namespace providing different geometric functions concerning angles.
bool openGLVersion(const int _major, const int _minor)
bool checkExtensionSupported(const std::string &_extension)