mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 18:50:00 +02:00
When visible is false, don't render billboards/models overlays
This commit is contained in:
parent
e067a013a0
commit
7ad90ac7bb
2 changed files with 8 additions and 0 deletions
|
@ -20,6 +20,10 @@ BillboardOverlay::BillboardOverlay()
|
||||||
}
|
}
|
||||||
|
|
||||||
void BillboardOverlay::render() {
|
void BillboardOverlay::render() {
|
||||||
|
if (!_visible) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!_billboard.isEmpty()) {
|
if (!_billboard.isEmpty()) {
|
||||||
if (!_billboardTexture) {
|
if (!_billboardTexture) {
|
||||||
QImage image = QImage::fromData(_billboard);
|
QImage image = QImage::fromData(_billboard);
|
||||||
|
|
|
@ -35,6 +35,10 @@ void ModelOverlay::update(float deltatime) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelOverlay::render() {
|
void ModelOverlay::render() {
|
||||||
|
if (!_visible) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_model.isActive()) {
|
if (_model.isActive()) {
|
||||||
|
|
||||||
if (_model.isRenderable()) {
|
if (_model.isRenderable()) {
|
||||||
|
|
Loading…
Reference in a new issue