Use OSG_VERSION_GREATER_EQUAL / LESS_THAN rather than MIN_VERSION_REQUIRED (cosmetic change)

openmw-37
scrawl 9 years ago
parent f1ac408f35
commit 0409e5a043

@ -1271,7 +1271,7 @@ public:
if (stateset->getAttribute(osg::StateAttribute::MATERIAL))
{
SceneUtil::CompositeStateSetUpdater* composite = NULL;
#if OSG_MIN_VERSION_REQUIRED(3,3,3)
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,3)
osg::Callback* callback = node.getUpdateCallback();
#else
osg::NodeCallback* callback = node.getUpdateCallback();

@ -905,7 +905,7 @@ namespace NifOsg
updater->addParticleSystem(partsys);
parentNode->addChild(updater);
#if not(OSG_MIN_VERSION_REQUIRED(3,3,3))
#if OSG_VERSION_LESS_THAN(3,3,3)
osg::ref_ptr<osg::Geode> geode (new osg::Geode);
geode->addDrawable(partsys);
osg::Node* toAttach = geode.get();
@ -985,7 +985,7 @@ namespace NifOsg
triShapeToGeometry(triShape, geometry, parentNode, composite, boundTextures, animflags);
#if not(OSG_MIN_VERSION_REQUIRED(3,3,3))
#if OSG_VERSION_LESS_THAN(3,3,3)
osg::ref_ptr<osg::Geode> geode (new osg::Geode);
geode->addDrawable(geometry);
#endif
@ -997,7 +997,7 @@ namespace NifOsg
geometry->setDataVariance(osg::Object::STATIC);
osg::ref_ptr<FrameSwitch> frameswitch = new FrameSwitch;
#if not(OSG_MIN_VERSION_REQUIRED(3,3,3))
#if OSG_VERSION_LESS_THAN(3,3,3)
osg::ref_ptr<osg::Geode> geode2 = static_cast<osg::Geode*>(osg::clone(geode.get(), osg::CopyOp::DEEP_COPY_NODES|osg::CopyOp::DEEP_COPY_DRAWABLES));
frameswitch->addChild(geode);
frameswitch->addChild(geode2);
@ -1010,7 +1010,7 @@ namespace NifOsg
parentNode->addChild(frameswitch);
}
else
#if not(OSG_MIN_VERSION_REQUIRED(3,3,3))
#if OSG_VERSION_LESS_THAN(3,3,3)
parentNode->addChild(geode);
#else
parentNode->addChild(geometry);
@ -1113,7 +1113,7 @@ namespace NifOsg
osg::ref_ptr<FrameSwitch> frameswitch = new FrameSwitch;
#if not(OSG_MIN_VERSION_REQUIRED(3,3,3))
#if OSG_VERSION_LESS_THAN(3,3,3)
osg::ref_ptr<osg::Geode> geode (new osg::Geode);
geode->addDrawable(rig);

@ -58,7 +58,7 @@ namespace
}
}
#if OSG_MIN_VERSION_REQUIRED(3,3,3)
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,3)
// in OSG 3.3 and up Drawables can be directly in the scene graph without a Geode decorating them.
void apply(osg::Drawable& drw)
{

@ -119,7 +119,7 @@ namespace Resource
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
{
#if OSG_MIN_VERSION_REQUIRED(3,3,3)
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,3)
osg::GLExtensions* exts = osg::GLExtensions::Get(0, false);
if (exts && !exts->isTextureCompressionS3TCSupported
// This one works too. Should it be included in isTextureCompressionS3TCSupported()? Submitted as a patch to OSG.

@ -65,7 +65,7 @@ namespace SceneUtil
void ControllerVisitor::apply(osg::Node &node)
{
#if OSG_MIN_VERSION_REQUIRED(3,3,3)
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,3)
osg::Callback* callback = node.getUpdateCallback();
#else
osg::NodeCallback* callback = node.getUpdateCallback();
@ -96,7 +96,7 @@ namespace SceneUtil
{
osg::Drawable* drw = geode.getDrawable(i);
#if OSG_MIN_VERSION_REQUIRED(3,3,3)
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,3)
osg::Callback* callback = drw->getUpdateCallback();
#else
osg::Drawable::UpdateCallback* callback = drw->getUpdateCallback();

@ -288,7 +288,7 @@ void RigGeometry::updateBounds(osg::NodeVisitor *nv)
_boundingBox = box;
_boundingBoxComputed = true;
#if OSG_MIN_VERSION_REQUIRED(3,3,3)
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,3)
// in OSG 3.3.3 and up Drawable inherits from Node, so has a bounding sphere as well.
_boundingSphere = osg::BoundingSphere(_boundingBox);
_boundingSphereComputed = true;

@ -109,7 +109,7 @@ void GraphicsWindowSDL2::init()
mValid = true;
#if OSG_MIN_VERSION_REQUIRED(3,3,4)
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,4)
getEventQueue()->syncWindowRectangleWithGraphicsContext();
#else
getEventQueue()->syncWindowRectangleWithGraphcisContext();
@ -130,7 +130,7 @@ bool GraphicsWindowSDL2::realizeImplementation()
SDL_ShowWindow(mWindow);
#if OSG_MIN_VERSION_REQUIRED(3,3,4)
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,4)
getEventQueue()->syncWindowRectangleWithGraphicsContext();
#else
getEventQueue()->syncWindowRectangleWithGraphcisContext();

Loading…
Cancel
Save