mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 22:36:39 +02:00
Merge branch 'master' of https://github.com/worklist/hifi
This commit is contained in:
commit
070e755368
6 changed files with 49 additions and 10 deletions
|
@ -326,6 +326,12 @@ void AudioMixer::run() {
|
||||||
|
|
||||||
if (matchingNode) {
|
if (matchingNode) {
|
||||||
nodeList->updateNodeWithData(matchingNode, nodeAddress, packetData, receivedBytes);
|
nodeList->updateNodeWithData(matchingNode, nodeAddress, packetData, receivedBytes);
|
||||||
|
|
||||||
|
if (!matchingNode->getActiveSocket()) {
|
||||||
|
// we don't have an active socket for this node, but they're talking to us
|
||||||
|
// this means they've heard from us and can reply, let's assume public is active
|
||||||
|
matchingNode->activatePublicSocket();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// let processNodeData handle it.
|
// let processNodeData handle it.
|
||||||
|
|
|
@ -2370,6 +2370,8 @@ void Application::queryVoxels() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wantExtraDebugging = Menu::getInstance()->isOptionChecked(MenuOption::ExtraDebugging);
|
||||||
|
|
||||||
// These will be the same for all servers, so we can set them up once and then reuse for each server we send to.
|
// These will be the same for all servers, so we can set them up once and then reuse for each server we send to.
|
||||||
_voxelQuery.setWantLowResMoving(Menu::getInstance()->isOptionChecked(MenuOption::LowRes));
|
_voxelQuery.setWantLowResMoving(Menu::getInstance()->isOptionChecked(MenuOption::LowRes));
|
||||||
_voxelQuery.setWantColor(Menu::getInstance()->isOptionChecked(MenuOption::SendVoxelColors));
|
_voxelQuery.setWantColor(Menu::getInstance()->isOptionChecked(MenuOption::SendVoxelColors));
|
||||||
|
@ -2428,7 +2430,7 @@ void Application::queryVoxels() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unknownJurisdictionServers > 0) {
|
if (wantExtraDebugging && unknownJurisdictionServers > 0) {
|
||||||
qDebug("Servers: total %d, in view %d, unknown jurisdiction %d \n",
|
qDebug("Servers: total %d, in view %d, unknown jurisdiction %d \n",
|
||||||
totalServers, inViewServers, unknownJurisdictionServers);
|
totalServers, inViewServers, unknownJurisdictionServers);
|
||||||
}
|
}
|
||||||
|
@ -2448,7 +2450,7 @@ void Application::queryVoxels() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unknownJurisdictionServers > 0) {
|
if (wantExtraDebugging && unknownJurisdictionServers > 0) {
|
||||||
qDebug("perServerPPS: %d perUnknownServer: %d\n", perServerPPS, perUnknownServer);
|
qDebug("perServerPPS: %d perUnknownServer: %d\n", perServerPPS, perUnknownServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2468,7 +2470,9 @@ void Application::queryVoxels() {
|
||||||
// can get the jurisdiction...
|
// can get the jurisdiction...
|
||||||
if (_voxelServerJurisdictions.find(nodeUUID) == _voxelServerJurisdictions.end()) {
|
if (_voxelServerJurisdictions.find(nodeUUID) == _voxelServerJurisdictions.end()) {
|
||||||
unknownView = true; // assume it's in view
|
unknownView = true; // assume it's in view
|
||||||
qDebug() << "no known jurisdiction for node " << *node << ", assume it's visible.\n";
|
if (wantExtraDebugging) {
|
||||||
|
qDebug() << "no known jurisdiction for node " << *node << ", assume it's visible.\n";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
const JurisdictionMap& map = (_voxelServerJurisdictions)[nodeUUID];
|
const JurisdictionMap& map = (_voxelServerJurisdictions)[nodeUUID];
|
||||||
|
|
||||||
|
@ -2486,21 +2490,38 @@ void Application::queryVoxels() {
|
||||||
} else {
|
} else {
|
||||||
inView = false;
|
inView = false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (wantExtraDebugging) {
|
||||||
|
qDebug() << "Jurisdiction without RootCode for node " << *node << ". That's unusual!\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inView) {
|
if (inView) {
|
||||||
_voxelQuery.setMaxVoxelPacketsPerSecond(perServerPPS);
|
_voxelQuery.setMaxVoxelPacketsPerSecond(perServerPPS);
|
||||||
} else if (unknownView) {
|
} else if (unknownView) {
|
||||||
qDebug() << "no known jurisdiction for node " << *node << ", give it budget of "
|
if (wantExtraDebugging) {
|
||||||
<< perUnknownServer << " to send us jurisdiction.\n";
|
qDebug() << "no known jurisdiction for node " << *node << ", give it budget of "
|
||||||
|
<< perUnknownServer << " to send us jurisdiction.\n";
|
||||||
|
}
|
||||||
|
|
||||||
// set the query's position/orientation to be degenerate in a manner that will get the scene quickly
|
// set the query's position/orientation to be degenerate in a manner that will get the scene quickly
|
||||||
_voxelQuery.setCameraPosition(glm::vec3(-0.1,-0.1,-0.1));
|
// If there's only one server, then don't do this, and just let the normal voxel query pass through
|
||||||
const glm::quat OFF_IN_NEGATIVE_SPACE = glm::quat(-0.5, 0, -0.5, 1.0);
|
// as expected... this way, we will actually get a valid scene if there is one to be seen
|
||||||
_voxelQuery.setCameraOrientation(OFF_IN_NEGATIVE_SPACE);
|
if (totalServers > 1) {
|
||||||
_voxelQuery.setCameraNearClip(0.1);
|
_voxelQuery.setCameraPosition(glm::vec3(-0.1,-0.1,-0.1));
|
||||||
_voxelQuery.setCameraFarClip(0.1);
|
const glm::quat OFF_IN_NEGATIVE_SPACE = glm::quat(-0.5, 0, -0.5, 1.0);
|
||||||
|
_voxelQuery.setCameraOrientation(OFF_IN_NEGATIVE_SPACE);
|
||||||
|
_voxelQuery.setCameraNearClip(0.1);
|
||||||
|
_voxelQuery.setCameraFarClip(0.1);
|
||||||
|
if (wantExtraDebugging) {
|
||||||
|
qDebug() << "Using 'minimal' camera position for node " << *node << "\n";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (wantExtraDebugging) {
|
||||||
|
qDebug() << "Using regular camera position for node " << *node << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
_voxelQuery.setMaxVoxelPacketsPerSecond(perUnknownServer);
|
_voxelQuery.setMaxVoxelPacketsPerSecond(perUnknownServer);
|
||||||
} else {
|
} else {
|
||||||
_voxelQuery.setMaxVoxelPacketsPerSecond(0);
|
_voxelQuery.setMaxVoxelPacketsPerSecond(0);
|
||||||
|
|
|
@ -475,6 +475,9 @@ Menu::Menu() :
|
||||||
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::DeltaSending);
|
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::DeltaSending);
|
||||||
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::OcclusionCulling);
|
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::OcclusionCulling);
|
||||||
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::DestructiveAddVoxel);
|
addCheckableActionToQMenuAndActionHash(voxelProtoOptionsMenu, MenuOption::DestructiveAddVoxel);
|
||||||
|
|
||||||
|
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::ExtraDebugging);
|
||||||
|
|
||||||
|
|
||||||
#ifndef Q_OS_MAC
|
#ifndef Q_OS_MAC
|
||||||
QMenu* helpMenu = addMenu("Help");
|
QMenu* helpMenu = addMenu("Help");
|
||||||
|
|
|
@ -163,6 +163,7 @@ namespace MenuOption {
|
||||||
const QString DontCallOpenGLForVoxels = "Don't call glDrawRangeElementsEXT() for Voxels";
|
const QString DontCallOpenGLForVoxels = "Don't call glDrawRangeElementsEXT() for Voxels";
|
||||||
const QString EchoAudio = "Echo Audio";
|
const QString EchoAudio = "Echo Audio";
|
||||||
const QString ExportVoxels = "Export Voxels";
|
const QString ExportVoxels = "Export Voxels";
|
||||||
|
const QString ExtraDebugging = "Extra Debugging";
|
||||||
const QString HeadMouse = "Head Mouse";
|
const QString HeadMouse = "Head Mouse";
|
||||||
const QString FaceMode = "Cycle Face Mode";
|
const QString FaceMode = "Cycle Face Mode";
|
||||||
const QString FaceshiftTCP = "Faceshift (TCP)";
|
const QString FaceshiftTCP = "Faceshift (TCP)";
|
||||||
|
|
|
@ -80,6 +80,8 @@ const char* stringForLogType(QtMsgType msgType) {
|
||||||
return "FATAL";
|
return "FATAL";
|
||||||
case QtWarningMsg:
|
case QtWarningMsg:
|
||||||
return "WARNING";
|
return "WARNING";
|
||||||
|
default:
|
||||||
|
return "UNKNOWN";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -460,6 +460,12 @@ void VoxelServer::run() {
|
||||||
if (node) {
|
if (node) {
|
||||||
nodeList->updateNodeWithData(node, &senderAddress, packetData, packetLength);
|
nodeList->updateNodeWithData(node, &senderAddress, packetData, packetLength);
|
||||||
|
|
||||||
|
if (!node->getActiveSocket()) {
|
||||||
|
// we don't have an active socket for this node, but they're talking to us
|
||||||
|
// this means they've heard from us and can reply, let's assume public is active
|
||||||
|
node->activatePublicSocket();
|
||||||
|
}
|
||||||
|
|
||||||
VoxelNodeData* nodeData = (VoxelNodeData*) node->getLinkedData();
|
VoxelNodeData* nodeData = (VoxelNodeData*) node->getLinkedData();
|
||||||
if (nodeData && !nodeData->isVoxelSendThreadInitalized()) {
|
if (nodeData && !nodeData->isVoxelSendThreadInitalized()) {
|
||||||
nodeData->initializeVoxelSendThread(this);
|
nodeData->initializeVoxelSendThread(this);
|
||||||
|
|
Loading…
Reference in a new issue