mirror of
https://github.com/overte-org/overte.git
synced 2025-07-16 12:16:42 +02:00
removed debug print statements
This commit is contained in:
parent
b8c0d6d9f9
commit
a7510cbfbe
9 changed files with 6 additions and 49 deletions
|
@ -6611,8 +6611,6 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType) {
|
||||||
|
|
||||||
|
|
||||||
bool Application::isHMDMode() const {
|
bool Application::isHMDMode() const {
|
||||||
// qDebug() << "the hmd is visible " << getActiveDisplayPlugin()->isDisplayVisible();
|
|
||||||
// qDebug() << "the hmd is active " << getActiveDisplayPlugin()->isHmd();
|
|
||||||
return getActiveDisplayPlugin()->isHmd();
|
return getActiveDisplayPlugin()->isHmd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6692,7 +6690,6 @@ void Application::resetSensors(bool andReload) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::hmdVisibleChanged(bool visible) {
|
void Application::hmdVisibleChanged(bool visible) {
|
||||||
qDebug() << "hmd visible changed ";
|
|
||||||
// TODO
|
// TODO
|
||||||
// calling start and stop will change audio input and ouput to default audio devices.
|
// calling start and stop will change audio input and ouput to default audio devices.
|
||||||
// we need to add a pause/unpause functionality to AudioClient for this to work properly
|
// we need to add a pause/unpause functionality to AudioClient for this to work properly
|
||||||
|
@ -8250,7 +8247,7 @@ void Application::windowMinimizedChanged(bool minimized) {
|
||||||
getActiveDisplayPlugin()->activate();
|
getActiveDisplayPlugin()->activate();
|
||||||
} else if (minimized && getActiveDisplayPlugin()->isActive()) {
|
} else if (minimized && getActiveDisplayPlugin()->isActive()) {
|
||||||
getActiveDisplayPlugin()->deactivate();
|
getActiveDisplayPlugin()->deactivate();
|
||||||
//_minimizedWindowTimer.start(THROTTLED_SIM_FRAME_PERIOD_MS);
|
_minimizedWindowTimer.start(THROTTLED_SIM_FRAME_PERIOD_MS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include <QMetaObject>
|
#include <QMetaObject>
|
||||||
#include "ui/Stats.h"
|
#include "ui/Stats.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "InterfaceLogging.h"
|
|
||||||
|
|
||||||
GraphicsEngine::GraphicsEngine() {
|
GraphicsEngine::GraphicsEngine() {
|
||||||
const QString SPLASH_SKYBOX { "{\"ProceduralEntity\":{ \"version\":2, \"shaderUrl\":\"qrc:///shaders/splashSkybox.frag\" } }" };
|
const QString SPLASH_SKYBOX { "{\"ProceduralEntity\":{ \"version\":2, \"shaderUrl\":\"qrc:///shaders/splashSkybox.frag\" } }" };
|
||||||
|
@ -154,7 +153,7 @@ bool GraphicsEngine::shouldPaint() const {
|
||||||
(static_cast<RenderEventHandler*>(_renderEventHandler)->_lastTimeRendered.elapsed() < THROTTLED_SIM_FRAME_PERIOD_MS)) {
|
(static_cast<RenderEventHandler*>(_renderEventHandler)->_lastTimeRendered.elapsed() < THROTTLED_SIM_FRAME_PERIOD_MS)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// qCDebug(interfaceapp) << "we are now throttling!!!!!";
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ void AnimClip::copyFromNetworkAnim() {
|
||||||
for (int i = 0; i < animJointCount; i++) {
|
for (int i = 0; i < animJointCount; i++) {
|
||||||
int skeletonJoint = _skeleton->nameToJointIndex(animSkeleton.getJointName(i));
|
int skeletonJoint = _skeleton->nameToJointIndex(animSkeleton.getJointName(i));
|
||||||
if (skeletonJoint == -1) {
|
if (skeletonJoint == -1) {
|
||||||
//qCWarning(animation) << "animation contains joint =" << animSkeleton.getJointName(i) << " which is not in the skeleton";
|
qCWarning(animation) << "animation contains joint =" << animSkeleton.getJointName(i) << " which is not in the skeleton";
|
||||||
}
|
}
|
||||||
jointMap.push_back(skeletonJoint);
|
jointMap.push_back(skeletonJoint);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,10 +48,6 @@ static const glm::mat4 IDENTITY_MATRIX;
|
||||||
//#define LIVE_SHADER_RELOAD 1
|
//#define LIVE_SHADER_RELOAD 1
|
||||||
extern glm::vec3 getPoint(float yaw, float pitch);
|
extern glm::vec3 getPoint(float yaw, float pitch);
|
||||||
|
|
||||||
bool HmdDisplayPlugin::isHmd() const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
glm::uvec2 HmdDisplayPlugin::getRecommendedUiSize() const {
|
glm::uvec2 HmdDisplayPlugin::getRecommendedUiSize() const {
|
||||||
return CompositorHelper::VIRTUAL_SCREEN_SIZE;
|
return CompositorHelper::VIRTUAL_SCREEN_SIZE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class HmdDisplayPlugin : public OpenGLDisplayPlugin {
|
||||||
using Parent = OpenGLDisplayPlugin;
|
using Parent = OpenGLDisplayPlugin;
|
||||||
public:
|
public:
|
||||||
~HmdDisplayPlugin();
|
~HmdDisplayPlugin();
|
||||||
bool isHmd() const override final;
|
bool isHmd() const override final { return true; }
|
||||||
float getIPD() const override final { return _ipd; }
|
float getIPD() const override final { return _ipd; }
|
||||||
glm::mat4 getEyeToHeadTransform(Eye eye) const override final;
|
glm::mat4 getEyeToHeadTransform(Eye eye) const override final;
|
||||||
glm::mat4 getEyeProjection(Eye eye, const glm::mat4& baseProjection) const override;
|
glm::mat4 getEyeProjection(Eye eye, const glm::mat4& baseProjection) const override;
|
||||||
|
|
|
@ -39,7 +39,6 @@ bool OculusBaseDisplayPlugin::beginFrameRender(uint32_t frameIndex) {
|
||||||
}
|
}
|
||||||
if (ovr::hmdMounted(status) != _hmdMounted) {
|
if (ovr::hmdMounted(status) != _hmdMounted) {
|
||||||
_hmdMounted = !_hmdMounted;
|
_hmdMounted = !_hmdMounted;
|
||||||
qCDebug(oculusLog) << "changed the hmd status" << _hmdMounted;
|
|
||||||
emit hmdMountedChanged();
|
emit hmdMountedChanged();
|
||||||
}
|
}
|
||||||
if (ovr::isVisible(status) != _visible) {
|
if (ovr::isVisible(status) != _visible) {
|
||||||
|
|
|
@ -671,19 +671,6 @@ void OpenVrDisplayPlugin::postPreview() {
|
||||||
PoseData nextRender, nextSim;
|
PoseData nextRender, nextSim;
|
||||||
nextRender.frameIndex = presentCount();
|
nextRender.frameIndex = presentCount();
|
||||||
|
|
||||||
_hmdActivityLevel = _system->GetTrackedDeviceActivityLevel(vr::k_unTrackedDeviceIndex_Hmd);
|
|
||||||
switch (_hmdActivityLevel) {
|
|
||||||
case vr::EDeviceActivityLevel::k_EDeviceActivityLevel_Unknown: qDebug() << "unkown hmd activity ";
|
|
||||||
break;
|
|
||||||
case vr::EDeviceActivityLevel::k_EDeviceActivityLevel_Idle: qDebug() << "no activity 10 secs ";
|
|
||||||
break;
|
|
||||||
//case vr::EDeviceActivityLevel::k_EDeviceActivityLevel_UserInteraction: qDebug() << "activity ";
|
|
||||||
// break;
|
|
||||||
case vr::EDeviceActivityLevel::k_EDeviceActivityLevel_UserInteraction_Timeout: qDebug() << "idle for 0.5 secs ";
|
|
||||||
break;
|
|
||||||
case vr::EDeviceActivityLevel::k_EDeviceActivityLevel_Standby: qDebug() << "idle for 5 secs ";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (!_threadedSubmit) {
|
if (!_threadedSubmit) {
|
||||||
vr::VRCompositor()->WaitGetPoses(nextRender.vrPoses, vr::k_unMaxTrackedDeviceCount, nextSim.vrPoses,
|
vr::VRCompositor()->WaitGetPoses(nextRender.vrPoses, vr::k_unMaxTrackedDeviceCount, nextSim.vrPoses,
|
||||||
vr::k_unMaxTrackedDeviceCount);
|
vr::k_unMaxTrackedDeviceCount);
|
||||||
|
@ -697,14 +684,12 @@ void OpenVrDisplayPlugin::postPreview() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isHmdMounted() != _hmdMounted) {
|
if (isHmdMounted() != _hmdMounted) {
|
||||||
qDebug() << "changed hmd status " << isHmdMounted();
|
|
||||||
_hmdMounted = !_hmdMounted;
|
_hmdMounted = !_hmdMounted;
|
||||||
emit hmdMountedChanged();
|
emit hmdMountedChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpenVrDisplayPlugin::isHmdMounted() const {
|
bool OpenVrDisplayPlugin::isHmdMounted() const {
|
||||||
// return _hmdActivityLevel == vr::k_EDeviceActivityLevel_UserInteraction;
|
|
||||||
return isHeadInHeadset();
|
return isHeadInHeadset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,6 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
vr::IVRSystem* _system { nullptr };
|
vr::IVRSystem* _system { nullptr };
|
||||||
std::atomic<vr::EDeviceActivityLevel> _hmdActivityLevel { vr::k_EDeviceActivityLevel_Unknown };
|
|
||||||
std::atomic<uint32_t> _keyboardSupressionCount{ 0 };
|
std::atomic<uint32_t> _keyboardSupressionCount{ 0 };
|
||||||
|
|
||||||
vr::HmdMatrix34_t _lastGoodHMDPose;
|
vr::HmdMatrix34_t _lastGoodHMDPose;
|
||||||
|
|
|
@ -125,7 +125,7 @@ vr::IVRSystem* acquireOpenVrSystem() {
|
||||||
}
|
}
|
||||||
if (activeHmd) {
|
if (activeHmd) {
|
||||||
#if DEV_BUILD
|
#if DEV_BUILD
|
||||||
//qCDebug(displayplugins) << "OpenVR: incrementing refcount";
|
qCDebug(displayplugins) << "OpenVR: incrementing refcount";
|
||||||
#endif
|
#endif
|
||||||
++refCount;
|
++refCount;
|
||||||
}
|
}
|
||||||
|
@ -274,15 +274,6 @@ void handleOpenVrEvents() {
|
||||||
DependencyManager::get<OffscreenUi>()->unfocusWindows();
|
DependencyManager::get<OffscreenUi>()->unfocusWindows();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case vr::VREvent_TrackedDeviceUserInteractionStarted:
|
|
||||||
qDebug() << "Put on the headset";
|
|
||||||
//hmdMountedChanged();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case vr::VREvent_TrackedDeviceUserInteractionEnded:
|
|
||||||
qDebug() << "Took off the headset";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -453,15 +444,6 @@ void showMinSpecWarning() {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case vr::VREvent_TrackedDeviceUserInteractionStarted:
|
|
||||||
qDebug() << "Put on the headset2";
|
|
||||||
//hmdMountedChanged();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case vr::VREvent_TrackedDeviceUserInteractionEnded:
|
|
||||||
qDebug() << "Took off the headset2";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue