mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
debugging
This commit is contained in:
parent
9a2aa9a337
commit
5ce39b74fd
1 changed files with 29 additions and 0 deletions
|
@ -2054,11 +2054,40 @@ void Application::checkFPS() {
|
|||
_timerStart.start();
|
||||
}
|
||||
|
||||
uint64_t lastReport = usecTimestampNow(); // XXX
|
||||
|
||||
|
||||
void Application::idle() {
|
||||
if (_aboutToQuit) {
|
||||
return; // bail early, nothing to do here.
|
||||
}
|
||||
|
||||
|
||||
// XXX
|
||||
{ // XXX
|
||||
uint64_t now = usecTimestampNow();
|
||||
if (now - lastReport > 4 * USECS_PER_SECOND) {
|
||||
QSharedPointer<AvatarManager> avatarManager = DependencyManager::get<AvatarManager>();
|
||||
const AvatarHash& avatarHash = avatarManager->getAvatarHash();
|
||||
|
||||
glm::vec3 myLeftPalm = getMyAvatar()->getLeftPalmPosition();
|
||||
qDebug() << "my left palm:" << myLeftPalm;
|
||||
|
||||
QHash<QUuid, AvatarSharedPointer>::const_iterator i;
|
||||
for (i = avatarHash.begin(); i != avatarHash.end(); ++i) {
|
||||
std::shared_ptr<Avatar> otherAvatar = std::static_pointer_cast<Avatar>(i.value());
|
||||
if (otherAvatar->getSessionUUID() == getMyAvatar()->getSessionUUID()) {
|
||||
continue;
|
||||
}
|
||||
glm::vec3 theirLeftPalm = otherAvatar->getLeftPalmPosition();
|
||||
qDebug() << "their left palm:" << theirLeftPalm;
|
||||
};
|
||||
|
||||
lastReport = now;
|
||||
}
|
||||
} // XXX
|
||||
// XXX
|
||||
|
||||
// depending on whether we're throttling or not.
|
||||
// Once rendering is off on another thread we should be able to have Application::idle run at start(0) in
|
||||
// perpetuity and not expect events to get backed up.
|
||||
|
|
Loading…
Reference in a new issue