Compile fixes for IRIX, submitted by Randall Hopper.
This commit is contained in:
@@ -117,9 +117,9 @@ ifeq ($(OS),IRIX)
|
||||
|
||||
C++ = CC
|
||||
DEPFLAGS = -M
|
||||
INC +=
|
||||
INC += -I/usr/local/include
|
||||
DEF += -LANG:std -OPT:Olimit=0 \
|
||||
-DEBUG:wof=1682 -DEBUG:woff=3303\
|
||||
-DEBUG:woff=1682 -DEBUG:woff=3303\
|
||||
-MDupdate $(MAKEDEPEND)
|
||||
OPTF = -O2
|
||||
DBGF = -g
|
||||
@@ -130,7 +130,7 @@ ifeq ($(ARCH),64)
|
||||
else
|
||||
ARCHARGS = -n32
|
||||
endif
|
||||
LINKARGS = -LANG:std -OPT:Olimit=0
|
||||
LINKARGS = -LANG:std -OPT:Olimit=0 -L/usr/local/lib32 -rpath /usr/local/lib32
|
||||
DYNAMICLIBRARYLIB = -ldl
|
||||
OSG_LIBS = -losgGLUT -losgDB -losgUtil -losg
|
||||
FREETYPE_LIB = -lfreetype
|
||||
|
||||
@@ -103,7 +103,7 @@ class SG_EXPORT ImpostorSprite : public Drawable
|
||||
|
||||
/** calculate the pixel error value for passing in the ModelViewProjectionWindow transform,
|
||||
* which transform local coords into screen space.*/
|
||||
const float ImpostorSprite::calcPixelError(const Matrix& MVPW) const;
|
||||
const float calcPixelError(const Matrix& MVPW) const;
|
||||
|
||||
void setTexture(Texture* tex,int s,int t);
|
||||
|
||||
|
||||
@@ -308,9 +308,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
|
||||
}
|
||||
else
|
||||
{
|
||||
// default construction to identity.
|
||||
static osg::Matrix identity;
|
||||
return identity;
|
||||
return _identity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -322,9 +320,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
|
||||
}
|
||||
else
|
||||
{
|
||||
// default construction to identity.
|
||||
static osg::Matrix identity;
|
||||
return identity;
|
||||
return _identity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -337,9 +333,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
|
||||
}
|
||||
else
|
||||
{
|
||||
// default construction to identity.
|
||||
static osg::Matrix identity;
|
||||
return identity;
|
||||
return _identity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,9 +349,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
|
||||
}
|
||||
else
|
||||
{
|
||||
// default construction to identity.
|
||||
static osg::Matrix identity;
|
||||
return identity;
|
||||
return _identity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,6 +381,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
|
||||
unsigned int _bbCornerNear;
|
||||
unsigned int _bbCornerFar;
|
||||
|
||||
osg::Matrix _identity;
|
||||
|
||||
osg::ref_ptr<RenderGraph> _rootRenderGraph;
|
||||
RenderGraph* _currentRenderGraph;
|
||||
|
||||
@@ -79,7 +79,6 @@ layer_fog_read(Lib3dsLayerFog *fog, FILE *f)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
Lib3dsBool have_lin=LIB3DS_FALSE;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_LAYER_FOG, f)) {
|
||||
return(LIB3DS_FALSE);
|
||||
@@ -94,7 +93,6 @@ layer_fog_read(Lib3dsLayerFog *fog, FILE *f)
|
||||
switch (chunk) {
|
||||
case LIB3DS_LIN_COLOR_F:
|
||||
lib3ds_rgb_read(fog->col,f);
|
||||
have_lin=LIB3DS_TRUE;
|
||||
break;
|
||||
case LIB3DS_COLOR_F:
|
||||
lib3ds_rgb_read(fog->col,f);
|
||||
|
||||
@@ -39,7 +39,6 @@ solid_bgnd_read(Lib3dsBackground *background, FILE *f)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
Lib3dsBool have_lin=LIB3DS_FALSE;
|
||||
|
||||
if (!lib3ds_chunk_read_start(&c, LIB3DS_SOLID_BGND, f)) {
|
||||
return(LIB3DS_FALSE);
|
||||
@@ -49,7 +48,6 @@ solid_bgnd_read(Lib3dsBackground *background, FILE *f)
|
||||
switch (chunk) {
|
||||
case LIB3DS_LIN_COLOR_F:
|
||||
lib3ds_rgb_read(background->solid.col, f);
|
||||
have_lin=LIB3DS_TRUE;
|
||||
break;
|
||||
case LIB3DS_COLOR_F:
|
||||
lib3ds_rgb_read(background->solid.col, f);
|
||||
|
||||
@@ -1160,14 +1160,14 @@ lib3ds_quat_track_read(Lib3dsQuatTrack *track, FILE *f)
|
||||
{
|
||||
int keys;
|
||||
int i,j;
|
||||
Lib3dsQuatKey *p,*k;
|
||||
Lib3dsQuatKey *k;
|
||||
|
||||
track->flags=lib3ds_word_read(f);
|
||||
lib3ds_dword_read(f);
|
||||
lib3ds_dword_read(f);
|
||||
keys=lib3ds_intd_read(f);
|
||||
|
||||
for (p=0,i=0; i<keys; p=k,++i) {
|
||||
for (i=0; i<keys; ++i) {
|
||||
k=lib3ds_quat_key_new();
|
||||
if (!lib3ds_tcb_read(&k->tcb, f)) {
|
||||
return(LIB3DS_FALSE);
|
||||
|
||||
@@ -270,7 +270,7 @@ void* billboardRead::Parse(trpgToken /*tok*/,trpgReadBuffer &buf)
|
||||
Billboard* bl = new Billboard();
|
||||
int m;
|
||||
bill.GetMode(m);
|
||||
if( m = trpgBillboard::Eye)
|
||||
if( m == trpgBillboard::Eye)
|
||||
bl->setMode(Billboard::POINT_ROT_EYE);
|
||||
else if(m == trpgBillboard::World )
|
||||
bl->setMode(Billboard::POINT_ROT_WORLD);
|
||||
|
||||
@@ -643,9 +643,10 @@ bool trpgGeometry::Write(trpgWriteBuffer &buf)
|
||||
buf.Add(td.doubleData[j]);
|
||||
buf.End();
|
||||
|
||||
float u;
|
||||
for (j=0;j<num*2;j++)
|
||||
u = (float)td.doubleData[j];
|
||||
// UNUSED CODE:
|
||||
//float u;
|
||||
//for (j=0;j<num*2;j++)
|
||||
// u = (float)td.doubleData[j];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -515,7 +515,7 @@ public:
|
||||
} LightQuality;
|
||||
|
||||
// Struct for Performer Lights
|
||||
typedef struct PerformerAttr {
|
||||
struct PerformerAttr {
|
||||
PerformerAttr() : flags(0),minPixelSize(0),maxPixelSize(0),actualSize(0),
|
||||
transparentPixelSize(0),transparentFallofExp(0),transparentScale(0),
|
||||
transparentClamp(0),fogScale(0) {};
|
||||
@@ -531,7 +531,7 @@ public:
|
||||
};
|
||||
|
||||
// Struct for Animated Lights
|
||||
typedef struct AnimationAttr {
|
||||
struct AnimationAttr {
|
||||
AnimationAttr() : period(0),phaseDelay(0),timeOn(0),vector(trpg3dPoint(0,0,0)),flags(0) {};
|
||||
float64 period;
|
||||
float64 phaseDelay;
|
||||
@@ -541,7 +541,7 @@ public:
|
||||
};
|
||||
|
||||
// Struct for Calligraphic Lights
|
||||
typedef struct CalligraphicAttr {
|
||||
struct CalligraphicAttr {
|
||||
CalligraphicAttr() : drawOrder(0),minDefocus(0),maxDefocus(0) {} ;
|
||||
int32 drawOrder;
|
||||
float64 minDefocus;
|
||||
|
||||
@@ -105,8 +105,6 @@ void trpgr_Archive::CloseFile()
|
||||
// Run through the rest of the header information
|
||||
bool trpgr_Archive::ReadHeader()
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!fp || headerRead)
|
||||
return false;
|
||||
|
||||
@@ -125,7 +123,7 @@ bool trpgr_Archive::ReadHeader()
|
||||
trpgMemReadBuffer buf(ness);
|
||||
buf.SetLength(headLen);
|
||||
char *data = buf.GetDataPtr();
|
||||
if ((ret = fread(data,1,headLen,fp)) != headLen) return false;
|
||||
if (fread(data,1,headLen,fp) != headLen) return false;
|
||||
|
||||
// Set up a parser
|
||||
// Catch the tables we need for the archive
|
||||
|
||||
@@ -501,8 +501,7 @@ bool trpgrAppFile::Read(char *data,int32 offset,uint32 dataSize)
|
||||
if (!valid) return false;
|
||||
|
||||
// Seek to the right place
|
||||
int result;
|
||||
if ((result = fseek(fp,offset,SEEK_SET))) {
|
||||
if (fseek(fp,offset,SEEK_SET)) {
|
||||
valid = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ bool trpgSceneGraphParser::EndChildren(void *in_node)
|
||||
// We don't need it here, but this is the node we just
|
||||
// finished putting children under. If you need to close
|
||||
// it out in some way, do that here
|
||||
trpgReadNode *node = (trpgReadNode *)in_node;
|
||||
//trpgReadNode *node = (trpgReadNode *)in_node;
|
||||
|
||||
// Get the parent above the current one
|
||||
int pos = parents.size()-2;
|
||||
|
||||
@@ -759,7 +759,6 @@ public:
|
||||
};
|
||||
void trpgwGeomHelper::Optimize()
|
||||
{
|
||||
bool isStrip = false;
|
||||
int dtype = (dataType == UseDouble ? trpgGeometry::DoubleData : trpgGeometry::FloatData);
|
||||
|
||||
// Potentially writing to all of these
|
||||
|
||||
Reference in New Issue
Block a user