Integrated changes for MacOSX, submitted by Phil Atkin, with small mods by
Robert Osfield to maintain compatability under Linux.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
#include "osg/Image"
|
||||
#include "osg/GL"
|
||||
#include "osg/Notify"
|
||||
#include <osg/GL>
|
||||
#include <osg/GLU>
|
||||
|
||||
#include <osg/Image>
|
||||
#include <osg/Notify>
|
||||
|
||||
#include <osg/Geode>
|
||||
#include <osg/GeoSet>
|
||||
#include <osg/StateSet>
|
||||
#include <osg/Texture>
|
||||
|
||||
#include <GL/glu.h>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include <string>
|
||||
|
||||
osg::NotifySeverity osg::g_NotifyLevel = osg::NOTICE;
|
||||
ofstream *osg::g_NotifyNulStream;
|
||||
bool osg::g_NotifyInit = false;
|
||||
|
||||
void osg::setNotifyLevel(osg::NotifySeverity severity)
|
||||
{
|
||||
@@ -19,11 +21,16 @@ osg::NotifySeverity osg::getNotifyLevel()
|
||||
|
||||
bool osg::initNotifyLevel()
|
||||
{
|
||||
static bool s_local_intialized = false;
|
||||
if (g_NotifyInit) return true;
|
||||
|
||||
if (s_local_intialized) return true;
|
||||
|
||||
s_local_intialized = true;
|
||||
g_NotifyInit = true;
|
||||
|
||||
// set up global notify null stream for inline notify
|
||||
#ifdef WIN32
|
||||
g_NotifyNulStream = new ofstream ("nul");
|
||||
#else
|
||||
g_NotifyNulStream = new ofstream ("/dev/null");
|
||||
#endif
|
||||
|
||||
// g_NotifyLevel
|
||||
// =============
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <osg/State>
|
||||
#include <osg/Notify>
|
||||
|
||||
#include <GL/glu.h>
|
||||
#include <osg/GLU>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <osg/Notify>
|
||||
#include <osg/GLExtensions>
|
||||
|
||||
#include <GL/glu.h>
|
||||
#include <osg/GLU>
|
||||
|
||||
using namespace osg;
|
||||
|
||||
@@ -176,7 +176,7 @@ void Texture::apply(State& state) const
|
||||
const uint contextID = state.getContextID();
|
||||
|
||||
// get the globj for the current contextID.
|
||||
uint& handle = getHandle(contextID);
|
||||
GLuint& handle = getHandle(contextID);
|
||||
|
||||
// For multi-texturing will need something like...
|
||||
// glActiveTextureARB((GLenum)(GL_TEXTURE0_ARB+_textureUnit));
|
||||
@@ -548,7 +548,7 @@ void Texture::copyTexSubImage2D(State& state, int xoffset, int yoffset, int x, i
|
||||
const uint contextID = state.getContextID();
|
||||
|
||||
// get the globj for the current contextID.
|
||||
uint& handle = getHandle(contextID);
|
||||
GLuint& handle = getHandle(contextID);
|
||||
|
||||
if (handle)
|
||||
{
|
||||
|
||||
@@ -180,7 +180,23 @@ 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?
|
||||
|
||||
Timer_t Timer::tick(void)
|
||||
{
|
||||
UnsignedWide usecs;
|
||||
Microseconds(&usecs);
|
||||
|
||||
return (usecs.hi * 4294967296.0) + usecs.lo;
|
||||
}
|
||||
|
||||
Timer::Timer( void )
|
||||
{
|
||||
_useStandardClock = false;
|
||||
_secsPerClick = 1e-6; // Carbon timer's precision.
|
||||
|
||||
}
|
||||
|
||||
#elif defined(unix)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user