#if defined(WIN32) #include #elif !defined macintosh #include #endif #include #include #include #include #include #include #include #include #include const bool osg::isGLExtensionSupported(const char *extension) { typedef std::set ExtensionSet; static ExtensionSet s_extensionSet; static const char* s_extensions = NULL; if (s_extensions==NULL) { // get the extension list from OpenGL. s_extensions = (const char*)glGetString(GL_EXTENSIONS); if (s_extensions==NULL) return false; // insert the ' ' delimiated extensions words into the extensionSet. const char *startOfWord = s_extensions; const char *endOfWord; while ((endOfWord = strchr(startOfWord,' '))!=NULL) { s_extensionSet.insert(std::string(startOfWord,endOfWord)); startOfWord = endOfWord+1; } if (*startOfWord!=0) s_extensionSet.insert(std::string(startOfWord)); osg::notify(INFO)<<"OpenGL extensions supported by installed OpenGL drivers are:"<