Fixes for compilation under IRIX, submitted by Randal Hopper, with mods

from Robert.
This commit is contained in:
Robert Osfield
2001-10-15 15:50:55 +00:00
parent 5de4e8e6d8
commit de924ca759
10 changed files with 18 additions and 15 deletions

View File

@@ -7,7 +7,12 @@
#include <osg/Referenced>
#ifdef __sgi
#include <time.h>
#else
#include <ctime>
using std::tm;
#endif
namespace osg
{

View File

@@ -132,7 +132,7 @@ namespace osg{
}
else
{
return *_sgiClockAddress;
return *_clockAddress;
}
}
};

View File

@@ -50,7 +50,7 @@ class ReaderWriterFLY : public osgDB::ReaderWriter
return osgDB::equalCaseInsensitive(extension,"fly");
}
virtual Node* readNode(const std::string& fileName)
virtual Node* readNode(const std::string& fileName,const osgDB::ReaderWriter::Options*)
{
std::string ext = osgDB::getFileExtension(fileName);

View File

@@ -12,7 +12,7 @@ class TransformFunctor : public osg::Drawable::AttributeFunctor
osg::Matrix _im;
TransformFunctor(const osg::Matrix& m):
AttributeFunctor(osg::Drawable::COORDS|osg::Drawable::NORMALS)
osg::Drawable::AttributeFunctor(osg::Drawable::COORDS|osg::Drawable::NORMALS)
{
_m = m;
_im.invert(_m);

View File

@@ -29,7 +29,7 @@ class TransformFunctor : public osg::Drawable::AttributeFunctor
osg::Matrix _im;
TransformFunctor(const osg::Matrix& m):
AttributeFunctor(osg::Drawable::COORDS|osg::Drawable::NORMALS)
osg::Drawable::AttributeFunctor(osg::Drawable::COORDS|osg::Drawable::NORMALS)
{
_m = m;
_im.invert(_m);
@@ -74,7 +74,7 @@ class FlattenStaticTransformsVisitor : public osg::NodeVisitor
typedef std::set<osg::Transform*> TransformList;
TransformList _transformList;
FlattenStaticTransformsVisitor():NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
FlattenStaticTransformsVisitor():osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
virtual void apply(osg::Geode& geode)
{
@@ -147,7 +147,7 @@ class RemoveRedundentNodesVisitor : public osg::NodeVisitor
typedef std::set<osg::Node*> NodeList;
NodeList _redundentNodeList;
RemoveRedundentNodesVisitor():NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
RemoveRedundentNodesVisitor():osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
virtual void apply(osg::Group& group)
{

View File

@@ -2,9 +2,7 @@
#include <osg/Quat>
#include <osg/Notify>
#include <osg/Types>
#include <cstdlib> //memcpy
#include <cmath> //acos
#include <osg/Math>
#include <stdlib.h>
@@ -52,10 +50,10 @@ Matrix::Matrix() : Object(), fully_realized(false) {}
Matrix::Matrix( const Matrix& other ) : Object()
{
set( (float const * const) other._mat );
set( (const float *) other._mat );
}
Matrix::Matrix( float const * const def )
Matrix::Matrix( const float * def )
{
set( def );
}

View File

@@ -186,7 +186,7 @@ int *numComponents_ret)
inf.height=ht;
inf.planes=npln;
inf.Colorbits=cbits;
inf.ColorUsed=pow(2,inf.Colorbits); // infer the colours
inf.ColorUsed=pow(2.0,inf.Colorbits); // infer the colours
}
long size = hd.siz[1]*65536+hd.siz[0];
int ncpal=4; // default number of colours per palette entry

View File

@@ -879,7 +879,7 @@ class ReaderWriterDW : public osgDB::ReaderWriter
return osgDB::equalCaseInsensitive(extension,"dw");
}
virtual Node* readNode(const std::string& fileName)
virtual Node* readNode(const std::string& fileName,const osgDB::ReaderWriter::Options*)
{
_dwobj obj;
enum reading {NONE, MATERIAL, OBJECT};

View File

@@ -286,7 +286,7 @@ class ReaderWriterPNG : public osgDB::ReaderWriter
return osgDB::equalCaseInsensitive(extension,"png");
}
virtual osg::Image* readImage(const std::string& fileName)
virtual osg::Image* readImage(const std::string& fileName,const osgDB::ReaderWriter::Options*)
{
unsigned char *imageData = NULL;

View File

@@ -32,7 +32,7 @@ class ReaderWriterPNG : public osgDB::ReaderWriter
virtual const char* className() { return "PNG Image Reader/Writer"; }
virtual bool acceptsExtension(const std::string& extension) { return extension=="png"; }
virtual Image* readImage(const std::string& fileName)
virtual Image* readImage(const std::string& fileName,const osgDB::ReaderWriter::Options*)
{
int trans = PNG_ALPHA;