From Colin McDonald, "Attached are some fixes to build osg using the Solaris Studio compiler.
I've also checked the modified files still build ok with other compilers (Linux gcc, Windows Visual Studio). osgDB/OutputStream.cpp and osgPlugins/lws/SceneLoader.cpp require stdlib.h for atoi use. In osg/Uniform.cpp the compiler complains that base_class is unknown unless I add a class name qualifier. Not a build fix, but I spotted a typo in osgUtil/SceneView."
This commit is contained in:
parent
94735a8364
commit
df48d440e4
@ -495,7 +495,7 @@ class OSGUTIL_EXPORT SceneView : public osg::Object, public osg::CullSettings
|
||||
bool getAutomaticFlush() const { return _automaticFlush; }
|
||||
|
||||
void setResetColorMaskToAllOn(bool enable) { _resetColorMaskToAllEnabled = enable; }
|
||||
bool setResetColorMaskToAllOn() const { return _resetColorMaskToAllEnabled; }
|
||||
bool getResetColorMaskToAllOn() const { return _resetColorMaskToAllEnabled; }
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -2153,7 +2153,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix2& m2 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT2) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m2.base_class::set( &((*_floatArray)[j]) );
|
||||
m2.Matrix2::base_class::set( &((*_floatArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2161,7 +2161,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix3& m3 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT3) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m3.base_class::set( &((*_floatArray)[j]) );
|
||||
m3.Matrix3::base_class::set( &((*_floatArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2177,7 +2177,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix2x3& m2x3 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT2x3) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m2x3.base_class::set( &((*_floatArray)[j]) );
|
||||
m2x3.Matrix2x3::base_class::set( &((*_floatArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2185,7 +2185,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix2x4& m2x4 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT2x4) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m2x4.base_class::set( &((*_floatArray)[j]) );
|
||||
m2x4.Matrix2x4::base_class::set( &((*_floatArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2193,7 +2193,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix3x2& m3x2 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT3x2) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m3x2.base_class::set( &((*_floatArray)[j]) );
|
||||
m3x2.Matrix3x2::base_class::set( &((*_floatArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2201,7 +2201,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix3x4& m3x4 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT3x4) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m3x4.base_class::set( &((*_floatArray)[j]) );
|
||||
m3x4.Matrix3x4::base_class::set( &((*_floatArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2209,7 +2209,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix4x2& m4x2 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT4x2) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m4x2.base_class::set( &((*_floatArray)[j]) );
|
||||
m4x2.Matrix4x2::base_class::set( &((*_floatArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2217,7 +2217,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix4x3& m4x3 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(FLOAT_MAT4x3) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m4x3.base_class::set( &((*_floatArray)[j]) );
|
||||
m4x3.Matrix4x3::base_class::set( &((*_floatArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2263,7 +2263,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix2d& m2 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(DOUBLE_MAT2) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m2.base_class::set( &((*_doubleArray)[j]) );
|
||||
m2.Matrix2d::base_class::set( &((*_doubleArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2271,7 +2271,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix3d& m3 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(DOUBLE_MAT3) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m3.base_class::set( &((*_doubleArray)[j]) );
|
||||
m3.Matrix3d::base_class::set( &((*_doubleArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2291,7 +2291,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix2x3d& m2x3 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(DOUBLE_MAT2x3) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m2x3.base_class::set( &((*_doubleArray)[j]) );
|
||||
m2x3.Matrix2x3d::base_class::set( &((*_doubleArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2299,7 +2299,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix2x4d& m2x4 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(DOUBLE_MAT2x4) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m2x4.base_class::set( &((*_doubleArray)[j]) );
|
||||
m2x4.Matrix2x4d::base_class::set( &((*_doubleArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2307,7 +2307,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix3x2d& m3x2 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(DOUBLE_MAT3x2) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m3x2.base_class::set( &((*_doubleArray)[j]) );
|
||||
m3x2.Matrix3x2d::base_class::set( &((*_doubleArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2315,7 +2315,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix3x4d& m3x4 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(DOUBLE_MAT3x4) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m3x4.base_class::set( &((*_doubleArray)[j]) );
|
||||
m3x4.Matrix3x4d::base_class::set( &((*_doubleArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2323,7 +2323,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix4x2d& m4x2 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(DOUBLE_MAT4x2) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m4x2.base_class::set( &((*_doubleArray)[j]) );
|
||||
m4x2.Matrix4x2d::base_class::set( &((*_doubleArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -2331,7 +2331,7 @@ bool Uniform::getElement( unsigned int index, osg::Matrix4x3d& m4x3 ) const
|
||||
{
|
||||
if( index>=getNumElements() || !isCompatibleType(DOUBLE_MAT4x3) ) return false;
|
||||
unsigned int j = index * getTypeNumComponents(getType());
|
||||
m4x3.base_class::set( &((*_doubleArray)[j]) );
|
||||
m4x3.Matrix4x3d::base_class::set( &((*_doubleArray)[j]) );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <osgDB/ObjectWrapper>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace osgDB;
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <osgDB/WriteFile>
|
||||
|
||||
#include <sstream>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace lwosg;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user