mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-09 00:39:58 +02:00
Merge pull request #6762 from ZappoMan/hideMirrorAndAudioInHMD
hide the rear view mirror and the audio in the HMD
This commit is contained in:
commit
125d103e29
4 changed files with 6 additions and 2 deletions
|
@ -84,6 +84,7 @@ Hifi.AvatarInputs {
|
||||||
Item {
|
Item {
|
||||||
width: root.mirrorWidth
|
width: root.mirrorWidth
|
||||||
height: 44
|
height: 44
|
||||||
|
visible: !root.isHMD
|
||||||
|
|
||||||
x: root.mirrorLeftPad
|
x: root.mirrorLeftPad
|
||||||
y: root.mirrorVisible ? root.mirrorTopPad + root.mirrorHeight : 5
|
y: root.mirrorVisible ? root.mirrorTopPad + root.mirrorHeight : 5
|
||||||
|
|
|
@ -86,7 +86,7 @@ void ApplicationOverlay::renderOverlay(RenderArgs* renderArgs) {
|
||||||
|
|
||||||
// Now render the overlay components together into a single texture
|
// Now render the overlay components together into a single texture
|
||||||
renderDomainConnectionStatusBorder(renderArgs); // renders the connected domain line
|
renderDomainConnectionStatusBorder(renderArgs); // renders the connected domain line
|
||||||
renderAudioScope(renderArgs); // audio scope in the very back
|
renderAudioScope(renderArgs); // audio scope in the very back - NOTE: this is the debug audio scope, not the VU meter
|
||||||
renderRearView(renderArgs); // renders the mirror view selfie
|
renderRearView(renderArgs); // renders the mirror view selfie
|
||||||
renderQmlUi(renderArgs); // renders a unit quad with the QML UI texture, and the text overlays from scripts
|
renderQmlUi(renderArgs); // renders a unit quad with the QML UI texture, and the text overlays from scripts
|
||||||
renderOverlays(renderArgs); // renders Scripts Overlay and AudioScope
|
renderOverlays(renderArgs); // renders Scripts Overlay and AudioScope
|
||||||
|
@ -158,7 +158,7 @@ void ApplicationOverlay::renderRearViewToFbo(RenderArgs* renderArgs) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApplicationOverlay::renderRearView(RenderArgs* renderArgs) {
|
void ApplicationOverlay::renderRearView(RenderArgs* renderArgs) {
|
||||||
if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) {
|
if (!qApp->isHMDMode() && Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) {
|
||||||
gpu::Batch& batch = *renderArgs->_batch;
|
gpu::Batch& batch = *renderArgs->_batch;
|
||||||
|
|
||||||
auto geometryCache = DependencyManager::get<GeometryCache>();
|
auto geometryCache = DependencyManager::get<GeometryCache>();
|
||||||
|
|
|
@ -66,6 +66,7 @@ void AvatarInputs::update() {
|
||||||
&& !Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror));
|
&& !Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror));
|
||||||
AI_UPDATE(cameraEnabled, !Menu::getInstance()->isOptionChecked(MenuOption::NoFaceTracking));
|
AI_UPDATE(cameraEnabled, !Menu::getInstance()->isOptionChecked(MenuOption::NoFaceTracking));
|
||||||
AI_UPDATE(cameraMuted, Menu::getInstance()->isOptionChecked(MenuOption::MuteFaceTracking));
|
AI_UPDATE(cameraMuted, Menu::getInstance()->isOptionChecked(MenuOption::MuteFaceTracking));
|
||||||
|
AI_UPDATE(isHMD, qApp->isHMDMode());
|
||||||
|
|
||||||
auto audioIO = DependencyManager::get<AudioClient>();
|
auto audioIO = DependencyManager::get<AudioClient>();
|
||||||
const float AUDIO_METER_AVERAGING = 0.5;
|
const float AUDIO_METER_AVERAGING = 0.5;
|
||||||
|
|
|
@ -30,6 +30,7 @@ class AvatarInputs : public QQuickItem {
|
||||||
AI_PROPERTY(float, audioLevel, 0)
|
AI_PROPERTY(float, audioLevel, 0)
|
||||||
AI_PROPERTY(bool, mirrorVisible, false)
|
AI_PROPERTY(bool, mirrorVisible, false)
|
||||||
AI_PROPERTY(bool, mirrorZoomed, true)
|
AI_PROPERTY(bool, mirrorZoomed, true)
|
||||||
|
AI_PROPERTY(bool, isHMD, false)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static AvatarInputs* getInstance();
|
static AvatarInputs* getInstance();
|
||||||
|
@ -44,6 +45,7 @@ signals:
|
||||||
void audioLevelChanged();
|
void audioLevelChanged();
|
||||||
void mirrorVisibleChanged();
|
void mirrorVisibleChanged();
|
||||||
void mirrorZoomedChanged();
|
void mirrorZoomedChanged();
|
||||||
|
void isHMDChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Q_INVOKABLE void resetSensors();
|
Q_INVOKABLE void resetSensors();
|
||||||
|
|
Loading…
Reference in a new issue