*** empty log message ***

This commit is contained in:
Bryan THRALL 2001-10-16 20:56:46 +00:00
parent 2ce6cdd6b2
commit a203a1b127
5 changed files with 16 additions and 12 deletions

View File

@ -38,8 +38,8 @@ class SG_EXPORT FrameStamp : public Referenced
void setReferenceTime(double refTime) { _referenceTime = refTime; }
double getReferenceTime() const { return _referenceTime; }
void setCalanderTime(const tm& calanderTime);
void getCalanderTime(tm& calanderTime) const;
void setCalanderTime(const std::tm& calanderTime);
void getCalanderTime(std::tm& calanderTime) const;
protected:

View File

@ -18,7 +18,7 @@ namespace osg {
typedef unsigned long long Timer_t;
#elif defined(unix)
typedef unsigned long long Timer_t;
#elif defined __APPLE__ // MACOSX PJA
#elif defined __APPLE__ || defined macintosh
typedef double Timer_t;
#else
#include <ctime>
@ -33,12 +33,12 @@ class SG_EXPORT Timer {
Timer();
~Timer() {}
#ifdef __APPLE__
#if defined __APPLE__ || defined macintosh
// PJA MAC OSX - inline Tick() pollutes namespace so badly
// we cant compile, due to Carbon.h ...
Timer_t tick();
#else
inline Timer_t tick();
inline Timer_t tick();
#endif
inline double delta_s( Timer_t t1, Timer_t t2 ) const { return (double)(t2 - t1)*_secsPerClick; }
@ -150,7 +150,7 @@ namespace osg{
}
};
#elif !defined (__APPLE_CC__)
#elif !defined (__APPLE_CC__) && !defined (macintosh)
// no choice, always use std::clock()

View File

@ -47,7 +47,7 @@ FrameStamp& FrameStamp::operator = (const FrameStamp& fs)
return *this;
}
void FrameStamp::setCalanderTime(const tm& ct)
void FrameStamp::setCalanderTime(const std::tm& ct)
{
tm_sec = ct.tm_sec; /* Seconds. [0-60] (1 leap second) */
tm_min = ct.tm_min; /* Minutes. [0-59] */
@ -60,7 +60,7 @@ void FrameStamp::setCalanderTime(const tm& ct)
tm_isdst = ct.tm_isdst; /* DST. [-1/0/1]*/
}
void FrameStamp::getCalanderTime(tm& ct) const
void FrameStamp::getCalanderTime(std::tm& ct) const
{
ct.tm_sec = tm_sec; /* Seconds. [0-60] (1 leap second) */
ct.tm_min = tm_min; /* Minutes. [0-59] */

View File

@ -180,8 +180,14 @@ using namespace osg;
_secsPerClick = (double)(cycleval)* 1e-12;
}
}
#elif defined (__APPLE_CC__) // MACOSX PJA
#include <Carbon/Carbon.h> // do I really have to link against the Carbon framework just for this?
#elif defined (__APPLE_CC__) || defined (macintosh)
#if defined (__APPLE_CC__)
#include <Carbon/Carbon.h> // do I really have to link against the Carbon framework just for this?
#else
#include <MacTypes.h>
#include <Timer.h>
#endif
Timer_t Timer::tick(void)
{

View File

@ -109,10 +109,8 @@ Viewer::Viewer()
osg::notify(osg::INFO)<<"Scene Graph Viewer (sgv)"<<endl;
#ifndef macintosh
osg::notify(osg::INFO)<<" '"<<osgGetLibraryName()<<"' Version "<<osgGetVersion()<<endl;
osg::notify(osg::INFO)<<" '"<<osgUtilGetLibraryName()<<"' Version "<<osgUtilGetVersion()<<endl;
#endif
_initialTick = _timer.tick();
_frameTick = _initialTick;