Aded osg::isGLExtensionOrVersionSupported(uint contextID, char* extensionName, float minVersionRequired) method that

returns true if (the extension string is supported or GL version is greater than or equal to a specified version) and 
non extension disable is used.   This makes it possible to disable extensions that are now
available as parts of the core OpenGL spec.

Updated Texture.cpp is use this method.
This commit is contained in:
Robert Osfield
2008-12-15 19:37:14 +00:00
parent f4836d7aa1
commit 528fdbb75c
3 changed files with 100 additions and 80 deletions

View File

@@ -38,6 +38,12 @@ extern OSG_EXPORT bool isExtensionInExtensionString(const char *extension, const
*/
extern OSG_EXPORT bool isGLExtensionSupported(unsigned int contextID, const char *extension);
/** Return true if OpenGL "extension" or minimum OpenGL version number is supported.
* Note: Must only be called within a valid OpenGL context,
* undefined behavior may occur otherwise.
*/
extern OSG_EXPORT bool isGLExtensionOrVersionSupported(unsigned int contextID, const char *extension, float requiredGlVersion);
/** Return the address of the specified OpenGL function.
* Return NULL if function not supported by OpenGL library.
* Note, glGLExtensionFuncPtr is declared inline so that the code