From Bob Kuehne, added osg::getGlVersion() and fixed a minor typo in Texture3D.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -439,7 +439,7 @@ void Texture3D::setExtensions(unsigned int contextID,Extensions* extensions)
|
||||
|
||||
Texture3D::Extensions::Extensions(unsigned int contextID)
|
||||
{
|
||||
setupGLExtenions(contextID);
|
||||
setupGLExtensions(contextID);
|
||||
}
|
||||
|
||||
Texture3D::Extensions::Extensions(const Extensions& rhs):
|
||||
@@ -469,7 +469,7 @@ void Texture3D::Extensions::lowestCommonDenominator(const Extensions& rhs)
|
||||
if (!rhs._gluBuild3DMipmaps) _gluBuild3DMipmaps = 0;
|
||||
}
|
||||
|
||||
void Texture3D::Extensions::setupGLExtenions(unsigned int contextID)
|
||||
void Texture3D::Extensions::setupGLExtensions(unsigned int contextID)
|
||||
{
|
||||
_isTexture3DFast = isGLExtensionSupported(contextID,"GL_EXT_texture3D");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user