From Bob Kuehne, added osg::getGlVersion() and fixed a minor typo in Texture3D.

This commit is contained in:
Robert Osfield
2006-03-08 16:11:54 +00:00
parent fa5ff9d169
commit 4fc4e60cc3
5 changed files with 19 additions and 5 deletions

View File

@@ -28,6 +28,14 @@
#include <windows.h>
#endif
float osg::getGLVersionNumber()
{
// needs to be extended to do proper things with subversions like 1.5.1, etc.
char *versionstring = (char*) glGetString( GL_VERSION );
std::string vs( versionstring );
return( atof( vs.substr( 0, vs.find( " " ) ).c_str() ) );
}
bool osg::isGLExtensionSupported(unsigned int contextID, const char *extension)
{
typedef std::set<std::string> ExtensionSet;