Fixed IRIX compile issues with the flt loader.
ReaderWriterATTR.cpp had a variable "mips" defined, which is predefined for the IRIX preprocessor. Changed this to _mips. FltFile.cpp had a class and transient variable defined within the scope of member function FltFile::readExternals(), which was causing the IRIX 7.3 compiles to hork. Moved the class definition to outside of the member function scope.
This commit is contained in:
parent
b35b5f3c3c
commit
0509495340
@ -2,8 +2,7 @@
|
||||
SHELL=/bin/sh
|
||||
|
||||
#DIRS = osg rgb lib3ds flt pfb obj lwo dw bmp pic png jpeg tga tiff gif osgtgz tgz zip
|
||||
#DIRS = osg rgb lib3ds flt obj lwo dw bmp pic png jpeg tga tiff gif osgtgz tgz zip
|
||||
DIRS = osg rgb lib3ds obj lwo dw bmp pic png jpeg tga tiff gif osgtgz tgz zip
|
||||
DIRS = osg rgb lib3ds flt obj lwo dw bmp pic png jpeg tga tiff gif osgtgz tgz zip
|
||||
all :
|
||||
for f in $(DIRS) ; do cd $$f; $(MAKE) || exit 1; cd ..; done
|
||||
|
||||
|
@ -138,8 +138,9 @@ bool FltFile::readFile(const std::string& fileName)
|
||||
|
||||
#define REGISTER_FLT 1
|
||||
|
||||
void FltFile::readExternals()
|
||||
{
|
||||
// This class was originally scoped within FltFile::readExternals() function.
|
||||
// Irix 7.3 compilers hork on this.
|
||||
|
||||
class ReadExternal : public RecordVisitor
|
||||
{
|
||||
public:
|
||||
@ -202,6 +203,8 @@ void FltFile::readExternals()
|
||||
FltFile* _pFltFile;
|
||||
};
|
||||
|
||||
void FltFile::readExternals()
|
||||
{
|
||||
ReadExternal visitor(this);
|
||||
_headerRecord->accept(visitor);
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ C++FILES = \
|
||||
ExternalRecord.cpp\
|
||||
Record.cpp\
|
||||
FaceRecord.cpp\
|
||||
FltFile.cpp\
|
||||
RecordVisitor.cpp\
|
||||
GeoSetBuilder.cpp\
|
||||
Registry.cpp\
|
||||
FltFile.cpp\
|
||||
GroupRecord.cpp\
|
||||
SwitchRecord.cpp\
|
||||
HeaderRecord.cpp\
|
||||
@ -42,6 +42,7 @@ C++FILES = \
|
||||
# PointLight.cpp\
|
||||
|
||||
|
||||
|
||||
C++FLAGS += -I../../../include
|
||||
|
||||
LIB = ../../../lib/osgPlugins/osgdb_flt.so
|
||||
|
@ -244,7 +244,7 @@ class Attr
|
||||
// 1 - TX_PACK_8
|
||||
// 2 - TX_PACK_16
|
||||
int32 useMips; // TRUE if using following 8 floats for MIPMAP kernel
|
||||
float32 mips[8]; // 8 floats for kernel of separable symmetric filter
|
||||
float32 _mips[8]; // 8 floats for kernel of separable symmetric filter
|
||||
int32 useLodScale; // Boolean if TRUE send:
|
||||
float32 lod0; // LOD0 for TX_CONTROL_POINT
|
||||
float32 scale0; // SCALE0 for TX_CONTROL_POINT
|
||||
@ -415,7 +415,7 @@ void Attr::init()
|
||||
intFormat = 0; // 0 - Default
|
||||
extFormat = 0; // 0 - Default
|
||||
useMips = 0;
|
||||
// float32 mips[8];
|
||||
// float32 _mips[8];
|
||||
useLodScale = 0;
|
||||
// float32 lod0;
|
||||
// float32 scale0;
|
||||
@ -499,7 +499,7 @@ bool Attr::readAttrFile(const char* szName)
|
||||
READ( extFormat );
|
||||
READ( useMips );
|
||||
for (n=0; n<8; n++) {
|
||||
READ(mips[n]); }
|
||||
READ(_mips[n]); }
|
||||
READ( useLodScale );
|
||||
READ( lod0 );
|
||||
READ( scale0 );
|
||||
@ -684,7 +684,7 @@ class ReaderWriterATTR : public osgDB::ReaderWriter
|
||||
char buf[256];
|
||||
int version=0;
|
||||
|
||||
const ReaderWriter::Options* rwOptions=
|
||||
const osgDB::ReaderWriter::Options* rwOptions=
|
||||
osgDB::Registry::instance()->getOptions();
|
||||
|
||||
if (rwOptions)
|
||||
|
Loading…
Reference in New Issue
Block a user