trying to now show overlays in mirrors

This commit is contained in:
Seth Alves 2018-01-19 09:53:41 -08:00
parent 31c007d167
commit 6aa389cad0
2 changed files with 18 additions and 1 deletions

View file

@ -44,6 +44,13 @@ namespace render {
} else {
builder.withViewSpace();
}
if (overlay->getVisible()) {
builder.withViewVisibilityMask(render::ItemKey::VISIBLE_MASK_1); // don't draw overlays in mirror
} else {
builder.withViewVisibilityMask(render::ItemKey::VISIBLE_MASK_ALL);
}
return builder.build();
}
template <> const Item::Bound payloadGetBound(const Overlay::Pointer& overlay) {

View file

@ -96,7 +96,17 @@ public:
Builder& withViewSpace() { _flags.set(VIEW_SPACE); return (*this); }
Builder& withDynamic() { _flags.set(DYNAMIC); return (*this); }
Builder& withDeformed() { _flags.set(DEFORMED); return (*this); }
Builder& withInvisible(uint8_t maskIndex = 0) { _flags.set(INVISIBLE0 + maskIndex); return (*this); }
Builder& withInvisible(uint8_t maskIndex = NUM_VISIBLE_MASK_INDICES) {
if (maskIndex == NUM_VISIBLE_MASK_INDICES) {
_flags.set(INVISIBLE0);
_flags.set(INVISIBLE1);
_flags.set(INVISIBLE2);
_flags.set(INVISIBLE3);
} else {
_flags.set(INVISIBLE0 + maskIndex);
}
return (*this);
}
Builder& withViewVisibilityMask(uint8_t mask) {
if (mask & render::ItemKey::VISIBLE_MASK_0) {
_flags.set(INVISIBLE0);