forked from teamnwah/openmw-tes3coop
Use OSG_VERSION_GREATER_EQUAL / LESS_THAN rather than MIN_VERSION_REQUIRED (cosmetic change)
This commit is contained in:
parent
f1ac408f35
commit
0409e5a043
7 changed files with 13 additions and 13 deletions
|
@ -1271,7 +1271,7 @@ public:
|
||||||
if (stateset->getAttribute(osg::StateAttribute::MATERIAL))
|
if (stateset->getAttribute(osg::StateAttribute::MATERIAL))
|
||||||
{
|
{
|
||||||
SceneUtil::CompositeStateSetUpdater* composite = NULL;
|
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();
|
osg::Callback* callback = node.getUpdateCallback();
|
||||||
#else
|
#else
|
||||||
osg::NodeCallback* callback = node.getUpdateCallback();
|
osg::NodeCallback* callback = node.getUpdateCallback();
|
||||||
|
|
|
@ -905,7 +905,7 @@ namespace NifOsg
|
||||||
updater->addParticleSystem(partsys);
|
updater->addParticleSystem(partsys);
|
||||||
parentNode->addChild(updater);
|
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);
|
osg::ref_ptr<osg::Geode> geode (new osg::Geode);
|
||||||
geode->addDrawable(partsys);
|
geode->addDrawable(partsys);
|
||||||
osg::Node* toAttach = geode.get();
|
osg::Node* toAttach = geode.get();
|
||||||
|
@ -985,7 +985,7 @@ namespace NifOsg
|
||||||
|
|
||||||
triShapeToGeometry(triShape, geometry, parentNode, composite, boundTextures, animflags);
|
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);
|
osg::ref_ptr<osg::Geode> geode (new osg::Geode);
|
||||||
geode->addDrawable(geometry);
|
geode->addDrawable(geometry);
|
||||||
#endif
|
#endif
|
||||||
|
@ -997,7 +997,7 @@ namespace NifOsg
|
||||||
geometry->setDataVariance(osg::Object::STATIC);
|
geometry->setDataVariance(osg::Object::STATIC);
|
||||||
osg::ref_ptr<FrameSwitch> frameswitch = new FrameSwitch;
|
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));
|
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(geode);
|
||||||
frameswitch->addChild(geode2);
|
frameswitch->addChild(geode2);
|
||||||
|
@ -1010,7 +1010,7 @@ namespace NifOsg
|
||||||
parentNode->addChild(frameswitch);
|
parentNode->addChild(frameswitch);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#if not(OSG_MIN_VERSION_REQUIRED(3,3,3))
|
#if OSG_VERSION_LESS_THAN(3,3,3)
|
||||||
parentNode->addChild(geode);
|
parentNode->addChild(geode);
|
||||||
#else
|
#else
|
||||||
parentNode->addChild(geometry);
|
parentNode->addChild(geometry);
|
||||||
|
@ -1113,7 +1113,7 @@ namespace NifOsg
|
||||||
|
|
||||||
osg::ref_ptr<FrameSwitch> frameswitch = new FrameSwitch;
|
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);
|
osg::ref_ptr<osg::Geode> geode (new osg::Geode);
|
||||||
geode->addDrawable(rig);
|
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.
|
// in OSG 3.3 and up Drawables can be directly in the scene graph without a Geode decorating them.
|
||||||
void apply(osg::Drawable& drw)
|
void apply(osg::Drawable& drw)
|
||||||
{
|
{
|
||||||
|
|
|
@ -119,7 +119,7 @@ namespace Resource
|
||||||
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
|
||||||
case(GL_COMPRESSED_RGBA_S3TC_DXT5_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);
|
osg::GLExtensions* exts = osg::GLExtensions::Get(0, false);
|
||||||
if (exts && !exts->isTextureCompressionS3TCSupported
|
if (exts && !exts->isTextureCompressionS3TCSupported
|
||||||
// This one works too. Should it be included in isTextureCompressionS3TCSupported()? Submitted as a patch to OSG.
|
// 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)
|
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();
|
osg::Callback* callback = node.getUpdateCallback();
|
||||||
#else
|
#else
|
||||||
osg::NodeCallback* callback = node.getUpdateCallback();
|
osg::NodeCallback* callback = node.getUpdateCallback();
|
||||||
|
@ -96,7 +96,7 @@ namespace SceneUtil
|
||||||
{
|
{
|
||||||
osg::Drawable* drw = geode.getDrawable(i);
|
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();
|
osg::Callback* callback = drw->getUpdateCallback();
|
||||||
#else
|
#else
|
||||||
osg::Drawable::UpdateCallback* callback = drw->getUpdateCallback();
|
osg::Drawable::UpdateCallback* callback = drw->getUpdateCallback();
|
||||||
|
|
|
@ -288,7 +288,7 @@ void RigGeometry::updateBounds(osg::NodeVisitor *nv)
|
||||||
|
|
||||||
_boundingBox = box;
|
_boundingBox = box;
|
||||||
_boundingBoxComputed = true;
|
_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.
|
// in OSG 3.3.3 and up Drawable inherits from Node, so has a bounding sphere as well.
|
||||||
_boundingSphere = osg::BoundingSphere(_boundingBox);
|
_boundingSphere = osg::BoundingSphere(_boundingBox);
|
||||||
_boundingSphereComputed = true;
|
_boundingSphereComputed = true;
|
||||||
|
|
|
@ -109,7 +109,7 @@ void GraphicsWindowSDL2::init()
|
||||||
|
|
||||||
mValid = true;
|
mValid = true;
|
||||||
|
|
||||||
#if OSG_MIN_VERSION_REQUIRED(3,3,4)
|
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,4)
|
||||||
getEventQueue()->syncWindowRectangleWithGraphicsContext();
|
getEventQueue()->syncWindowRectangleWithGraphicsContext();
|
||||||
#else
|
#else
|
||||||
getEventQueue()->syncWindowRectangleWithGraphcisContext();
|
getEventQueue()->syncWindowRectangleWithGraphcisContext();
|
||||||
|
@ -130,7 +130,7 @@ bool GraphicsWindowSDL2::realizeImplementation()
|
||||||
|
|
||||||
SDL_ShowWindow(mWindow);
|
SDL_ShowWindow(mWindow);
|
||||||
|
|
||||||
#if OSG_MIN_VERSION_REQUIRED(3,3,4)
|
#if OSG_VERSION_GREATER_OR_EQUAL(3,3,4)
|
||||||
getEventQueue()->syncWindowRectangleWithGraphicsContext();
|
getEventQueue()->syncWindowRectangleWithGraphicsContext();
|
||||||
#else
|
#else
|
||||||
getEventQueue()->syncWindowRectangleWithGraphcisContext();
|
getEventQueue()->syncWindowRectangleWithGraphcisContext();
|
||||||
|
|
Loading…
Reference in a new issue