mirror of
https://github.com/overte-org/overte.git
synced 2025-06-25 23:09:48 +02:00
Making it work maybe
This commit is contained in:
parent
ae6a95ec0d
commit
2f4e61888f
6 changed files with 15 additions and 19 deletions
|
@ -106,7 +106,7 @@ private:
|
|||
bool _jointMappingCompleted { false };
|
||||
QVector<int> _jointMapping; // domain is index into model-joints, range is index into animation-joints
|
||||
|
||||
bool _visibleDirty { false };
|
||||
bool _visibleDirty { true };
|
||||
bool _drawInFrontDirty { false };
|
||||
bool _drawInHUDDirty { false };
|
||||
|
||||
|
|
|
@ -46,9 +46,9 @@ namespace render {
|
|||
}
|
||||
|
||||
if (overlay->getVisible()) {
|
||||
builder.withViewVisibilityMask(render::ItemKey::VISIBLE_MASK_0); // don't draw overlays in mirror
|
||||
builder.withVisibilityMask(render::ItemKey::VISIBLE_MASK_0); // don't draw overlays in mirror
|
||||
} else {
|
||||
builder.withViewVisibilityMask(render::ItemKey::VISIBLE_MASK_NONE);
|
||||
builder.withVisibilityMask(render::ItemKey::VISIBLE_MASK_NONE);
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
|
|
|
@ -1334,8 +1334,8 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce
|
|||
entity->stopModelOverrideIfNoParent();
|
||||
|
||||
uint32_t viewVisiblityMask = _cauterized ?
|
||||
render::ItemKey::VISIBLE_MASK_0 : // draw in every view except the main one (view zero)
|
||||
render::ItemKey::VISIBLE_MASK_NONE; // draw in all views
|
||||
render::ItemKey::VISIBLE_MASK_1 : // draw in every view except the main one (view zero)
|
||||
render::ItemKey::VISIBLE_MASK_ALL; // draw in all views
|
||||
|
||||
if (model->isVisible() != _visible || model->getViewVisibilityMask() != viewVisiblityMask) {
|
||||
// FIXME: this seems like it could be optimized if we tracked our last known visible state in
|
||||
|
|
|
@ -247,7 +247,7 @@ void CauterizedModel::updateRenderItems() {
|
|||
data.updateTransformForCauterizedMesh(renderTransform);
|
||||
|
||||
data.setEnableCauterization(enableCauterization);
|
||||
data.setKey(isVisible, isLayeredInFront || isLayeredInHUD, render::ItemKey::VISIBLE_MASK_NONE);
|
||||
data.setKey(isVisible, isLayeredInFront || isLayeredInHUD, render::ItemKey::VISIBLE_MASK_ALL);
|
||||
data.setLayer(isLayeredInFront, isLayeredInHUD);
|
||||
data.setShapeKey(invalidatePayloadShapeKey, isWireframe);
|
||||
});
|
||||
|
|
|
@ -396,7 +396,7 @@ void ModelMeshPartPayload::setKey(bool isVisible, bool isLayered, uint8_t viewVi
|
|||
if (!isVisible) {
|
||||
builder.withInvisible();
|
||||
} else {
|
||||
builder.withViewVisibilityMask(viewVisiblityMask);
|
||||
builder.withVisibilityMask(viewVisiblityMask);
|
||||
}
|
||||
|
||||
if (isLayered) {
|
||||
|
|
|
@ -119,18 +119,14 @@ public:
|
|||
}
|
||||
return (*this);
|
||||
}
|
||||
Builder& withViewVisibilityMask(uint8_t mask) {
|
||||
if (mask & render::ItemKey::VISIBLE_MASK_0) {
|
||||
_flags.reset(INVISIBLE0);
|
||||
Builder& withVisibilityMask(uint8_t mask) {
|
||||
for (int i = 0; i < ItemKey::NUM_VISIBLE_MASK_INDICES; i++) {
|
||||
if ((1 << i) & mask) {
|
||||
withVisible(i);
|
||||
}
|
||||
if (mask & render::ItemKey::VISIBLE_MASK_1) {
|
||||
_flags.reset(INVISIBLE1);
|
||||
else {
|
||||
withInvisible(i);
|
||||
}
|
||||
if (mask & render::ItemKey::VISIBLE_MASK_2) {
|
||||
_flags.reset(INVISIBLE2);
|
||||
}
|
||||
if (mask & render::ItemKey::VISIBLE_MASK_3) {
|
||||
_flags.reset(INVISIBLE3);
|
||||
}
|
||||
return (*this);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue