mirror of
https://github.com/lubosz/overte.git
synced 2025-08-28 00:56:16 +02:00
Merge branch 'overlay-visible-in-2nd-cam' of github.com:sethalves/hifi into overlay-visible-in-2nd-cam
This commit is contained in:
commit
bb370caccc
2 changed files with 6 additions and 5 deletions
|
@ -89,9 +89,10 @@ void ModelOverlay::update(float deltatime) {
|
|||
}
|
||||
if (_visibleDirty) {
|
||||
_visibleDirty = false;
|
||||
// don't show overlays in mirrors
|
||||
// don't show overlays in mirrors or spectator-cam unless _isVisibleInSecondaryCamera is true
|
||||
_model->setVisibleInScene(getVisible(), scene,
|
||||
_isVisibleInSecondaryCamera ? render::ItemKey::TAG_BITS_ALL : render::ItemKey::TAG_BITS_0,
|
||||
render::ItemKey::TAG_BITS_0 |
|
||||
_isVisibleInSecondaryCamera ? render::ItemKey::TAG_BITS_1 : render::ItemKey::TAG_BITS_NONE,
|
||||
false);
|
||||
}
|
||||
if (_drawInFrontDirty) {
|
||||
|
|
|
@ -49,9 +49,9 @@ namespace render {
|
|||
builder.withInvisible();
|
||||
}
|
||||
|
||||
uint32_t viewTaskBits = overlay->getIsVisibleInSecondaryCamera() ?
|
||||
render::ItemKey::TAG_BITS_ALL : // draw in all views
|
||||
render::ItemKey::TAG_BITS_0; // only the main view
|
||||
// always visible in primary view. if isVisibleInSecondaryCamera, also draw in secondary view
|
||||
uint32_t viewTaskBits = render::ItemKey::TAG_BITS_0 |
|
||||
overlay->getIsVisibleInSecondaryCamera() ? render::ItemKey::TAG_BITS_1 : render::ItemKey::TAG_BITS_NONE;
|
||||
|
||||
builder.withTagBits(viewTaskBits);
|
||||
|
||||
|
|
Loading…
Reference in a new issue