Permalink
Browse files

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."
  • Loading branch information...
1 parent d5bb792 commit 798150d97a72c7b0dafe42c1e49edb29937d67bf @osg-training-guest osg-training-guest committed Sep 5, 2013
Showing with 19 additions and 17 deletions.
  1. +1 −1 include/osgUtil/SceneView
  2. +16 −16 src/osg/Uniform.cpp
  3. +1 −0 src/osgDB/OutputStream.cpp
  4. +1 −0 src/osgPlugins/lws/SceneLoader.cpp
@@ -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:
View
@@ -2153,15 +2153,15 @@ 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;
}
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,47 +2177,47 @@ 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;
}
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;
}
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;
}
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;
}
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;
}
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,15 +2263,15 @@ 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;
}
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,47 +2291,47 @@ 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;
}
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;
}
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;
}
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;
}
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;
}
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;

0 comments on commit 798150d

Please sign in to comment.