From Mathias Froehlich, "I have extended the X11 pbuffer code to use either the complete set of glx 1.3
pbuffer functions or exactly ask for the extensions we need to call the apropriate glx extension functions for and around pbuffers extensions. The glx 1.3 version of this functios are prefered. If this is not pressent we are looking for the glx extensions and check for them. Prevously we just used some mix of the glx 1.3 functions or the extension functions without making sure that this extension is present. "
This commit is contained in:
@@ -48,6 +48,22 @@ float osg::getGLVersionNumber()
|
||||
return( atof( vs.substr( 0, vs.find( " " ) ).c_str() ) );
|
||||
}
|
||||
|
||||
bool osg::isExtensionInExtensionString(const char *extension, const char *extensionString)
|
||||
{
|
||||
const char *startOfWord = extensionString;
|
||||
const char *endOfWord;
|
||||
while ((endOfWord = strchr(startOfWord,' ')) != 0)
|
||||
{
|
||||
if (strncmp(extension, startOfWord, endOfWord - startOfWord) == 0)
|
||||
return true;
|
||||
startOfWord = endOfWord+1;
|
||||
}
|
||||
if (*startOfWord && strcmp(extension, startOfWord) == 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool osg::isGLExtensionSupported(unsigned int contextID, const char *extension)
|
||||
{
|
||||
ExtensionSet& extensionSet = s_glExtensionSetList[contextID];
|
||||
|
||||
Reference in New Issue
Block a user