Merge /u/amalon/simgear/ branch vr_3 into next
https://sourceforge.net/p/flightgear/simgear/merge-requests/98/
This commit is contained in:
commit
f7e378a05a
@ -45,7 +45,10 @@ enum NodeMask {
|
||||
// eventually for other models?
|
||||
MODEL_BIT = (1 << 12),
|
||||
MODELLIGHT_BIT = (1 << 13),
|
||||
PERMANENTLIGHT_BIT = (1 << 14)
|
||||
PERMANENTLIGHT_BIT = (1 << 14),
|
||||
// Used for per-eye VR visibility masks
|
||||
LEFT_BIT = (1 << 15),
|
||||
RIGHT_BIT = (1 << 16)
|
||||
};
|
||||
|
||||
// Theory of bin numbering:
|
||||
|
@ -374,8 +374,8 @@ Compositor::setCullMask(osg::Node::NodeMask cull_mask)
|
||||
if (pass->inherit_cull_mask) {
|
||||
osg::Camera *camera = pass->camera;
|
||||
camera->setCullMask(pass->cull_mask & cull_mask);
|
||||
camera->setCullMaskLeft(pass->cull_mask & cull_mask);
|
||||
camera->setCullMaskRight(pass->cull_mask & cull_mask);
|
||||
camera->setCullMaskLeft(pass->cull_mask & cull_mask & ~RIGHT_BIT);
|
||||
camera->setCullMaskRight(pass->cull_mask & cull_mask & ~LEFT_BIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <simgear/scene/material/EffectCullVisitor.hxx>
|
||||
#include <simgear/scene/material/EffectGeode.hxx>
|
||||
#include <simgear/scene/util/OsgMath.hxx>
|
||||
#include <simgear/scene/util/RenderConstants.hxx>
|
||||
#include <simgear/scene/util/SGReaderWriterOptions.hxx>
|
||||
#include <simgear/scene/util/SGUpdateVisitor.hxx>
|
||||
#include <simgear/structure/exception.hxx>
|
||||
@ -167,8 +168,8 @@ PassBuilder::build(Compositor *compositor, const SGPropertyNode *root,
|
||||
std::stoul(root->getStringValue("cull-mask", "0xffffffff"), nullptr, 0);
|
||||
pass->cull_mask = cull_mask;
|
||||
camera->setCullMask(pass->cull_mask);
|
||||
camera->setCullMaskLeft(pass->cull_mask);
|
||||
camera->setCullMaskRight(pass->cull_mask);
|
||||
camera->setCullMaskLeft(pass->cull_mask & ~RIGHT_BIT);
|
||||
camera->setCullMaskRight(pass->cull_mask & ~LEFT_BIT);
|
||||
|
||||
osg::Vec4f clear_color(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
const SGPropertyNode *p_clear_color = root->getChild("clear-color");
|
||||
|
Loading…
Reference in New Issue
Block a user