mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-15 05:26:04 +02:00
more voxelEctomy
This commit is contained in:
parent
f1de9cabe9
commit
27d8ccb51e
18 changed files with 80 additions and 85 deletions
|
@ -6,7 +6,7 @@ include_glm()
|
||||||
|
|
||||||
# link in the shared libraries
|
# link in the shared libraries
|
||||||
link_hifi_libraries(
|
link_hifi_libraries(
|
||||||
audio avatars octree voxels gpu model fbx entities metavoxels
|
audio avatars octree environment gpu model fbx entities metavoxels
|
||||||
networking animation shared script-engine embedded-webserver
|
networking animation shared script-engine embedded-webserver
|
||||||
physics
|
physics
|
||||||
)
|
)
|
||||||
|
|
|
@ -430,7 +430,7 @@ int OctreeSendThread::packetDistributor(OctreeQueryNode* nodeData, bool viewFrus
|
||||||
bool wantOcclusionCulling = nodeData->getWantOcclusionCulling();
|
bool wantOcclusionCulling = nodeData->getWantOcclusionCulling();
|
||||||
CoverageMap* coverageMap = wantOcclusionCulling ? &nodeData->map : IGNORE_COVERAGE_MAP;
|
CoverageMap* coverageMap = wantOcclusionCulling ? &nodeData->map : IGNORE_COVERAGE_MAP;
|
||||||
|
|
||||||
float voxelSizeScale = nodeData->getOctreeSizeScale();
|
float octreeSizeScale = nodeData->getOctreeSizeScale();
|
||||||
int boundaryLevelAdjustClient = nodeData->getBoundaryLevelAdjust();
|
int boundaryLevelAdjustClient = nodeData->getBoundaryLevelAdjust();
|
||||||
|
|
||||||
int boundaryLevelAdjust = boundaryLevelAdjustClient + (viewFrustumChanged && nodeData->getWantLowResMoving()
|
int boundaryLevelAdjust = boundaryLevelAdjustClient + (viewFrustumChanged && nodeData->getWantLowResMoving()
|
||||||
|
@ -438,7 +438,7 @@ int OctreeSendThread::packetDistributor(OctreeQueryNode* nodeData, bool viewFrus
|
||||||
|
|
||||||
EncodeBitstreamParams params(INT_MAX, &nodeData->getCurrentViewFrustum(), wantColor,
|
EncodeBitstreamParams params(INT_MAX, &nodeData->getCurrentViewFrustum(), wantColor,
|
||||||
WANT_EXISTS_BITS, DONT_CHOP, wantDelta, lastViewFrustum,
|
WANT_EXISTS_BITS, DONT_CHOP, wantDelta, lastViewFrustum,
|
||||||
wantOcclusionCulling, coverageMap, boundaryLevelAdjust, voxelSizeScale,
|
wantOcclusionCulling, coverageMap, boundaryLevelAdjust, octreeSizeScale,
|
||||||
nodeData->getLastTimeBagEmpty(),
|
nodeData->getLastTimeBagEmpty(),
|
||||||
isFullScene, &nodeData->stats, _myServer->getJurisdiction(),
|
isFullScene, &nodeData->stats, _myServer->getJurisdiction(),
|
||||||
&nodeData->extraEncodeData);
|
&nodeData->extraEncodeData);
|
||||||
|
|
|
@ -561,7 +561,7 @@ void DomainServer::populateDefaultStaticAssignmentsExcludingTypes(const QSet<Ass
|
||||||
}
|
}
|
||||||
|
|
||||||
const NodeSet STATICALLY_ASSIGNED_NODES = NodeSet() << NodeType::AudioMixer
|
const NodeSet STATICALLY_ASSIGNED_NODES = NodeSet() << NodeType::AudioMixer
|
||||||
<< NodeType::AvatarMixer << NodeType::VoxelServer << NodeType::EntityServer
|
<< NodeType::AvatarMixer << NodeType::EntityServer
|
||||||
<< NodeType::MetavoxelServer;
|
<< NodeType::MetavoxelServer;
|
||||||
|
|
||||||
void DomainServer::handleConnectRequest(const QByteArray& packet, const HifiSockAddr& senderSockAddr) {
|
void DomainServer::handleConnectRequest(const QByteArray& packet, const HifiSockAddr& senderSockAddr) {
|
||||||
|
|
|
@ -107,7 +107,7 @@ endif()
|
||||||
add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS} ${QM})
|
add_executable(${TARGET_NAME} MACOSX_BUNDLE ${INTERFACE_SRCS} ${QM})
|
||||||
|
|
||||||
# link required hifi libraries
|
# link required hifi libraries
|
||||||
link_hifi_libraries(shared octree voxels gpu model fbx metavoxels networking entities avatars audio animation script-engine physics
|
link_hifi_libraries(shared octree environment gpu model fbx metavoxels networking entities avatars audio animation script-engine physics
|
||||||
render-utils entities-renderer)
|
render-utils entities-renderer)
|
||||||
|
|
||||||
# find any optional and required libraries
|
# find any optional and required libraries
|
||||||
|
|
|
@ -776,7 +776,7 @@ void Application::controlledBroadcastToNodes(const QByteArray& packet, const Nod
|
||||||
channel = BandwidthMeter::AVATARS;
|
channel = BandwidthMeter::AVATARS;
|
||||||
break;
|
break;
|
||||||
case NodeType::EntityServer:
|
case NodeType::EntityServer:
|
||||||
channel = BandwidthMeter::VOXELS;
|
channel = BandwidthMeter::OCTREE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
|
@ -1602,10 +1602,6 @@ FaceTracker* Application::getActiveFaceTracker() {
|
||||||
(visage->isActive() ? static_cast<FaceTracker*>(visage.data()) : NULL)));
|
(visage->isActive() ? static_cast<FaceTracker*>(visage.data()) : NULL)));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SendVoxelsOperationArgs {
|
|
||||||
const unsigned char* newBaseOctCode;
|
|
||||||
};
|
|
||||||
|
|
||||||
bool Application::exportEntities(const QString& filename, float x, float y, float z, float scale) {
|
bool Application::exportEntities(const QString& filename, float x, float y, float z, float scale) {
|
||||||
QVector<EntityItem*> entities;
|
QVector<EntityItem*> entities;
|
||||||
_entities.getTree()->findEntities(AACube(glm::vec3(x / (float)TREE_SCALE,
|
_entities.getTree()->findEntities(AACube(glm::vec3(x / (float)TREE_SCALE,
|
||||||
|
@ -2183,8 +2179,7 @@ int Application::sendNackPackets() {
|
||||||
|
|
||||||
nodeList->eachNode([&](const SharedNodePointer& node){
|
nodeList->eachNode([&](const SharedNodePointer& node){
|
||||||
|
|
||||||
if (node->getActiveSocket()
|
if (node->getActiveSocket() && node->getType() == NodeType::EntityServer) {
|
||||||
&& (node->getType() == NodeType::VoxelServer || node->getType() == NodeType::EntityServer)) {
|
|
||||||
|
|
||||||
QUuid nodeUUID = node->getUUID();
|
QUuid nodeUUID = node->getUUID();
|
||||||
|
|
||||||
|
@ -2424,7 +2419,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node
|
||||||
nodeList->writeUnverifiedDatagram(reinterpret_cast<const char*>(queryPacket), packetLength, node);
|
nodeList->writeUnverifiedDatagram(reinterpret_cast<const char*>(queryPacket), packetLength, node);
|
||||||
|
|
||||||
// Feed number of bytes to corresponding channel of the bandwidth meter
|
// Feed number of bytes to corresponding channel of the bandwidth meter
|
||||||
_bandwidthMeter.outputStream(BandwidthMeter::VOXELS).updateValue(packetLength);
|
_bandwidthMeter.outputStream(BandwidthMeter::OCTREE).updateValue(packetLength);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -3569,7 +3564,7 @@ int Application::parseOctreeStats(const QByteArray& packet, const SharedNodePoin
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::packetSent(quint64 length) {
|
void Application::packetSent(quint64 length) {
|
||||||
_bandwidthMeter.outputStream(BandwidthMeter::VOXELS).updateValue(length);
|
_bandwidthMeter.outputStream(BandwidthMeter::OCTREE).updateValue(length);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::loadScripts() {
|
void Application::loadScripts() {
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace { // .cpp-local
|
||||||
BandwidthMeter::ChannelInfo BandwidthMeter::_CHANNELS[] = {
|
BandwidthMeter::ChannelInfo BandwidthMeter::_CHANNELS[] = {
|
||||||
{ "Audio" , "Kbps", 8000.0 / 1024.0, 0x33cc99ff },
|
{ "Audio" , "Kbps", 8000.0 / 1024.0, 0x33cc99ff },
|
||||||
{ "Avatars" , "Kbps", 8000.0 / 1024.0, 0xffef40c0 },
|
{ "Avatars" , "Kbps", 8000.0 / 1024.0, 0xffef40c0 },
|
||||||
{ "Voxels" , "Kbps", 8000.0 / 1024.0, 0xd0d0d0a0 },
|
{ "Octree" , "Kbps", 8000.0 / 1024.0, 0xd0d0d0a0 },
|
||||||
{ "Metavoxels", "Kbps", 8000.0 / 1024.0, 0xd0d0d0a0 }
|
{ "Metavoxels", "Kbps", 8000.0 / 1024.0, 0xd0d0d0a0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ public:
|
||||||
static size_t const N_STREAMS = N_CHANNELS * 2;
|
static size_t const N_STREAMS = N_CHANNELS * 2;
|
||||||
|
|
||||||
// Channel usage.
|
// Channel usage.
|
||||||
enum ChannelIndex { AUDIO, AVATARS, VOXELS, METAVOXELS };
|
enum ChannelIndex { AUDIO, AVATARS, OCTREE, METAVOXELS };
|
||||||
|
|
||||||
// Meta information held for a communication channel (bidirectional).
|
// Meta information held for a communication channel (bidirectional).
|
||||||
struct ChannelInfo {
|
struct ChannelInfo {
|
||||||
|
|
|
@ -28,10 +28,10 @@ OctreeStatsDialog::OctreeStatsDialog(QWidget* parent, NodeToOctreeSceneStats* mo
|
||||||
_model(model) {
|
_model(model) {
|
||||||
|
|
||||||
_statCount = 0;
|
_statCount = 0;
|
||||||
_voxelServerLabelsCount = 0;
|
_octreeServerLabelsCount = 0;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_VOXEL_SERVERS; i++) {
|
for (int i = 0; i < MAX_VOXEL_SERVERS; i++) {
|
||||||
_voxelServerLables[i] = 0;
|
_octreeServerLables[i] = 0;
|
||||||
_extraServerDetails[i] = LESS;
|
_extraServerDetails[i] = LESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ OctreeStatsDialog::OctreeStatsDialog(QWidget* parent, NodeToOctreeSceneStats* mo
|
||||||
this->QDialog::setLayout(_form);
|
this->QDialog::setLayout(_form);
|
||||||
|
|
||||||
// Setup stat items
|
// Setup stat items
|
||||||
_serverVoxels = AddStatItem("Elements on Servers");
|
_serverElements = AddStatItem("Elements on Servers");
|
||||||
_localVoxels = AddStatItem("Local Elements");
|
_localElements = AddStatItem("Local Elements");
|
||||||
_localVoxelsMemory = AddStatItem("Elements Memory");
|
_localElementsMemory = AddStatItem("Elements Memory");
|
||||||
_sendingMode = AddStatItem("Sending Mode");
|
_sendingMode = AddStatItem("Sending Mode");
|
||||||
|
|
||||||
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
layout()->setSizeConstraint(QLayout::SetFixedSize);
|
||||||
|
@ -127,13 +127,13 @@ void OctreeStatsDialog::paintEvent(QPaintEvent* event) {
|
||||||
statsValue.precision(4);
|
statsValue.precision(4);
|
||||||
|
|
||||||
// Octree Elements Memory Usage
|
// Octree Elements Memory Usage
|
||||||
label = _labels[_localVoxelsMemory];
|
label = _labels[_localElementsMemory];
|
||||||
statsValue.str("");
|
statsValue.str("");
|
||||||
statsValue << "Elements RAM: " << OctreeElement::getTotalMemoryUsage() / 1000000.0f << "MB ";
|
statsValue << "Elements RAM: " << OctreeElement::getTotalMemoryUsage() / 1000000.0f << "MB ";
|
||||||
label->setText(statsValue.str().c_str());
|
label->setText(statsValue.str().c_str());
|
||||||
|
|
||||||
// Local Voxels
|
// Local Elements
|
||||||
label = _labels[_localVoxels];
|
label = _labels[_localElements];
|
||||||
unsigned long localTotal = OctreeElement::getNodeCount();
|
unsigned long localTotal = OctreeElement::getNodeCount();
|
||||||
unsigned long localInternal = OctreeElement::getInternalNodeCount();
|
unsigned long localInternal = OctreeElement::getInternalNodeCount();
|
||||||
unsigned long localLeaves = OctreeElement::getLeafNodeCount();
|
unsigned long localLeaves = OctreeElement::getLeafNodeCount();
|
||||||
|
@ -191,11 +191,11 @@ void OctreeStatsDialog::paintEvent(QPaintEvent* event) {
|
||||||
label = _labels[_sendingMode];
|
label = _labels[_sendingMode];
|
||||||
label->setText(sendingMode.str().c_str());
|
label->setText(sendingMode.str().c_str());
|
||||||
|
|
||||||
// Server Voxels
|
// Server Elements
|
||||||
QString serversTotalString = locale.toString((uint)totalNodes); // consider adding: .rightJustified(10, ' ');
|
QString serversTotalString = locale.toString((uint)totalNodes); // consider adding: .rightJustified(10, ' ');
|
||||||
QString serversInternalString = locale.toString((uint)totalInternal);
|
QString serversInternalString = locale.toString((uint)totalInternal);
|
||||||
QString serversLeavesString = locale.toString((uint)totalLeaves);
|
QString serversLeavesString = locale.toString((uint)totalLeaves);
|
||||||
label = _labels[_serverVoxels];
|
label = _labels[_serverElements];
|
||||||
statsValue.str("");
|
statsValue.str("");
|
||||||
statsValue <<
|
statsValue <<
|
||||||
"Total: " << qPrintable(serversTotalString) << " / " <<
|
"Total: " << qPrintable(serversTotalString) << " / " <<
|
||||||
|
@ -213,13 +213,13 @@ void OctreeStatsDialog::showAllOctreeServers() {
|
||||||
showOctreeServersOfType(serverCount, NodeType::EntityServer, "Entity",
|
showOctreeServersOfType(serverCount, NodeType::EntityServer, "Entity",
|
||||||
Application::getInstance()->getEntityServerJurisdictions());
|
Application::getInstance()->getEntityServerJurisdictions());
|
||||||
|
|
||||||
if (_voxelServerLabelsCount > serverCount) {
|
if (_octreeServerLabelsCount > serverCount) {
|
||||||
for (int i = serverCount; i < _voxelServerLabelsCount; i++) {
|
for (int i = serverCount; i < _octreeServerLabelsCount; i++) {
|
||||||
int serverLabel = _voxelServerLables[i];
|
int serverLabel = _octreeServerLables[i];
|
||||||
RemoveStatItem(serverLabel);
|
RemoveStatItem(serverLabel);
|
||||||
_voxelServerLables[i] = 0;
|
_octreeServerLables[i] = 0;
|
||||||
}
|
}
|
||||||
_voxelServerLabelsCount = serverCount;
|
_octreeServerLabelsCount = serverCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,14 +235,14 @@ void OctreeStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t ser
|
||||||
if (node->getType() == serverType) {
|
if (node->getType() == serverType) {
|
||||||
serverCount++;
|
serverCount++;
|
||||||
|
|
||||||
if (serverCount > _voxelServerLabelsCount) {
|
if (serverCount > _octreeServerLabelsCount) {
|
||||||
char label[128] = { 0 };
|
char label[128] = { 0 };
|
||||||
sprintf(label, "%s Server %d", serverTypeName, serverCount);
|
sprintf(label, "%s Server %d", serverTypeName, serverCount);
|
||||||
int thisServerRow = _voxelServerLables[serverCount-1] = AddStatItem(label);
|
int thisServerRow = _octreeServerLables[serverCount-1] = AddStatItem(label);
|
||||||
_labels[thisServerRow]->setTextFormat(Qt::RichText);
|
_labels[thisServerRow]->setTextFormat(Qt::RichText);
|
||||||
_labels[thisServerRow]->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
_labels[thisServerRow]->setTextInteractionFlags(Qt::TextBrowserInteraction);
|
||||||
connect(_labels[thisServerRow], SIGNAL(linkActivated(const QString&)), this, SLOT(moreless(const QString&)));
|
connect(_labels[thisServerRow], SIGNAL(linkActivated(const QString&)), this, SLOT(moreless(const QString&)));
|
||||||
_voxelServerLabelsCount++;
|
_octreeServerLabelsCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::stringstream serverDetails("");
|
std::stringstream serverDetails("");
|
||||||
|
@ -335,7 +335,7 @@ void OctreeStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t ser
|
||||||
|
|
||||||
serverDetails << "<br/>" << "Node UUID: " << qPrintable(nodeUUID.toString()) << " ";
|
serverDetails << "<br/>" << "Node UUID: " << qPrintable(nodeUUID.toString()) << " ";
|
||||||
|
|
||||||
serverDetails << "<br/>" << "Voxels: " <<
|
serverDetails << "<br/>" << "Elements: " <<
|
||||||
qPrintable(totalString) << " total " <<
|
qPrintable(totalString) << " total " <<
|
||||||
qPrintable(internalString) << " internal " <<
|
qPrintable(internalString) << " internal " <<
|
||||||
qPrintable(leavesString) << " leaves ";
|
qPrintable(leavesString) << " leaves ";
|
||||||
|
@ -399,7 +399,7 @@ void OctreeStatsDialog::showOctreeServersOfType(int& serverCount, NodeType_t ser
|
||||||
linkDetails << " " << " [<a href='most-" << serverCount << "'>most...</a>]";
|
linkDetails << " " << " [<a href='most-" << serverCount << "'>most...</a>]";
|
||||||
}
|
}
|
||||||
serverDetails << linkDetails.str();
|
serverDetails << linkDetails.str();
|
||||||
_labels[_voxelServerLables[serverCount - 1]]->setText(serverDetails.str().c_str());
|
_labels[_octreeServerLables[serverCount - 1]]->setText(serverDetails.str().c_str());
|
||||||
} // is VOXEL_SERVER
|
} // is VOXEL_SERVER
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,11 +60,11 @@ private:
|
||||||
int _statCount;
|
int _statCount;
|
||||||
|
|
||||||
int _sendingMode;
|
int _sendingMode;
|
||||||
int _serverVoxels;
|
int _serverElements;
|
||||||
int _localVoxels;
|
int _localElements;
|
||||||
int _localVoxelsMemory;
|
int _localElementsMemory;
|
||||||
int _voxelServerLables[MAX_VOXEL_SERVERS];
|
int _octreeServerLables[MAX_VOXEL_SERVERS];
|
||||||
int _voxelServerLabelsCount;
|
int _octreeServerLabelsCount;
|
||||||
details _extraServerDetails[MAX_VOXEL_SERVERS];
|
details _extraServerDetails[MAX_VOXEL_SERVERS];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ const int STATS_PELS_PER_LINE = 20;
|
||||||
const int STATS_GENERAL_MIN_WIDTH = 165;
|
const int STATS_GENERAL_MIN_WIDTH = 165;
|
||||||
const int STATS_PING_MIN_WIDTH = 190;
|
const int STATS_PING_MIN_WIDTH = 190;
|
||||||
const int STATS_GEO_MIN_WIDTH = 240;
|
const int STATS_GEO_MIN_WIDTH = 240;
|
||||||
const int STATS_VOXEL_MIN_WIDTH = 410;
|
const int STATS_OCTREE_MIN_WIDTH = 410;
|
||||||
|
|
||||||
Stats* Stats::getInstance() {
|
Stats* Stats::getInstance() {
|
||||||
static Stats stats;
|
static Stats stats;
|
||||||
|
@ -47,7 +47,7 @@ Stats::Stats():
|
||||||
_generalStatsWidth(STATS_GENERAL_MIN_WIDTH),
|
_generalStatsWidth(STATS_GENERAL_MIN_WIDTH),
|
||||||
_pingStatsWidth(STATS_PING_MIN_WIDTH),
|
_pingStatsWidth(STATS_PING_MIN_WIDTH),
|
||||||
_geoStatsWidth(STATS_GEO_MIN_WIDTH),
|
_geoStatsWidth(STATS_GEO_MIN_WIDTH),
|
||||||
_voxelStatsWidth(STATS_VOXEL_MIN_WIDTH),
|
_octreeStatsWidth(STATS_OCTREE_MIN_WIDTH),
|
||||||
_lastHorizontalOffset(0),
|
_lastHorizontalOffset(0),
|
||||||
_metavoxelInternal(0),
|
_metavoxelInternal(0),
|
||||||
_metavoxelLeaves(0),
|
_metavoxelLeaves(0),
|
||||||
|
@ -127,7 +127,7 @@ void Stats::resetWidth(int width, int horizontalOffset) {
|
||||||
- STATS_GENERAL_MIN_WIDTH
|
- STATS_GENERAL_MIN_WIDTH
|
||||||
- (Menu::getInstance()->isOptionChecked(MenuOption::TestPing) ? STATS_PING_MIN_WIDTH -1 : 0)
|
- (Menu::getInstance()->isOptionChecked(MenuOption::TestPing) ? STATS_PING_MIN_WIDTH -1 : 0)
|
||||||
- STATS_GEO_MIN_WIDTH
|
- STATS_GEO_MIN_WIDTH
|
||||||
- STATS_VOXEL_MIN_WIDTH;
|
- STATS_OCTREE_MIN_WIDTH;
|
||||||
|
|
||||||
int panels = 4;
|
int panels = 4;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ void Stats::resetWidth(int width, int horizontalOffset) {
|
||||||
panels = 3;
|
panels = 3;
|
||||||
}
|
}
|
||||||
_geoStatsWidth = STATS_GEO_MIN_WIDTH;
|
_geoStatsWidth = STATS_GEO_MIN_WIDTH;
|
||||||
_voxelStatsWidth = STATS_VOXEL_MIN_WIDTH;
|
_octreeStatsWidth = STATS_OCTREE_MIN_WIDTH;
|
||||||
|
|
||||||
if (extraSpace > panels) {
|
if (extraSpace > panels) {
|
||||||
_generalStatsWidth += (int) extraSpace / panels;
|
_generalStatsWidth += (int) extraSpace / panels;
|
||||||
|
@ -147,7 +147,7 @@ void Stats::resetWidth(int width, int horizontalOffset) {
|
||||||
_pingStatsWidth += (int) extraSpace / panels;
|
_pingStatsWidth += (int) extraSpace / panels;
|
||||||
}
|
}
|
||||||
_geoStatsWidth += (int) extraSpace / panels;
|
_geoStatsWidth += (int) extraSpace / panels;
|
||||||
_voxelStatsWidth += glCanvas->width() - (_generalStatsWidth + _pingStatsWidth + _geoStatsWidth + 3);
|
_octreeStatsWidth += glCanvas->width() - (_generalStatsWidth + _pingStatsWidth + _geoStatsWidth + 3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ void Stats::display(
|
||||||
int font = 2;
|
int font = 2;
|
||||||
|
|
||||||
QLocale locale(QLocale::English);
|
QLocale locale(QLocale::English);
|
||||||
std::stringstream voxelStats;
|
std::stringstream octreeStats;
|
||||||
|
|
||||||
if (_lastHorizontalOffset != horizontalOffset) {
|
if (_lastHorizontalOffset != horizontalOffset) {
|
||||||
resetWidth(glCanvas->width(), horizontalOffset);
|
resetWidth(glCanvas->width(), horizontalOffset);
|
||||||
|
@ -479,33 +479,33 @@ void Stats::display(
|
||||||
|
|
||||||
// Model/Entity render details
|
// Model/Entity render details
|
||||||
EntityTreeRenderer* entities = Application::getInstance()->getEntities();
|
EntityTreeRenderer* entities = Application::getInstance()->getEntities();
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
voxelStats << "Entity Items rendered: " << entities->getItemsRendered()
|
octreeStats << "Entity Items rendered: " << entities->getItemsRendered()
|
||||||
<< " / Out of view:" << entities->getItemsOutOfView()
|
<< " / Out of view:" << entities->getItemsOutOfView()
|
||||||
<< " / Too small:" << entities->getItemsTooSmall();
|
<< " / Too small:" << entities->getItemsTooSmall();
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
|
|
||||||
if (_expanded) {
|
if (_expanded) {
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
voxelStats << " Meshes rendered: " << entities->getMeshesRendered()
|
octreeStats << " Meshes rendered: " << entities->getMeshesRendered()
|
||||||
<< " / Out of view:" << entities->getMeshesOutOfView()
|
<< " / Out of view:" << entities->getMeshesOutOfView()
|
||||||
<< " / Too small:" << entities->getMeshesTooSmall();
|
<< " / Too small:" << entities->getMeshesTooSmall();
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
|
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
voxelStats << " Triangles: " << entities->getTrianglesRendered()
|
octreeStats << " Triangles: " << entities->getTrianglesRendered()
|
||||||
<< " / Quads:" << entities->getQuadsRendered()
|
<< " / Quads:" << entities->getQuadsRendered()
|
||||||
<< " / Material Switches:" << entities->getMaterialSwitches();
|
<< " / Material Switches:" << entities->getMaterialSwitches();
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
|
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
voxelStats << " Mesh Parts Rendered Opaque: " << entities->getOpaqueMeshPartsRendered()
|
octreeStats << " Mesh Parts Rendered Opaque: " << entities->getOpaqueMeshPartsRendered()
|
||||||
<< " / Translucent:" << entities->getTranslucentMeshPartsRendered();
|
<< " / Translucent:" << entities->getTranslucentMeshPartsRendered();
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// iterate all the current voxel stats, and list their sending modes, and total voxel counts
|
// iterate all the current voxel stats, and list their sending modes, and total voxel counts
|
||||||
|
@ -556,13 +556,13 @@ void Stats::display(
|
||||||
|
|
||||||
// Incoming packets
|
// Incoming packets
|
||||||
if (_expanded) {
|
if (_expanded) {
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
QString packetsString = locale.toString((int)voxelPacketsToProcess);
|
QString packetsString = locale.toString((int)voxelPacketsToProcess);
|
||||||
QString maxString = locale.toString((int)_recentMaxPackets);
|
QString maxString = locale.toString((int)_recentMaxPackets);
|
||||||
voxelStats << "Voxel Packets to Process: " << qPrintable(packetsString)
|
octreeStats << "Octree Packets to Process: " << qPrintable(packetsString)
|
||||||
<< " [Recent Max: " << qPrintable(maxString) << "]";
|
<< " [Recent Max: " << qPrintable(maxString) << "]";
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_resetRecentMaxPacketsSoon && voxelPacketsToProcess > 0) {
|
if (_resetRecentMaxPacketsSoon && voxelPacketsToProcess > 0) {
|
||||||
|
@ -583,28 +583,28 @@ void Stats::display(
|
||||||
|
|
||||||
// Server Octree Elements
|
// Server Octree Elements
|
||||||
if (!_expanded) {
|
if (!_expanded) {
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
voxelStats << "Octree Elements Server: " << qPrintable(serversTotalString)
|
octreeStats << "Octree Elements Server: " << qPrintable(serversTotalString)
|
||||||
<< " Local:" << qPrintable(localTotalString);
|
<< " Local:" << qPrintable(localTotalString);
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_expanded) {
|
if (_expanded) {
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
voxelStats << "Octree Elements -";
|
octreeStats << "Octree Elements -";
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
|
|
||||||
QString serversInternalString = locale.toString((uint)totalInternal);
|
QString serversInternalString = locale.toString((uint)totalInternal);
|
||||||
QString serversLeavesString = locale.toString((uint)totalLeaves);
|
QString serversLeavesString = locale.toString((uint)totalLeaves);
|
||||||
|
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
voxelStats << " Server: " << qPrintable(serversTotalString) <<
|
octreeStats << " Server: " << qPrintable(serversTotalString) <<
|
||||||
" Internal: " << qPrintable(serversInternalString) <<
|
" Internal: " << qPrintable(serversInternalString) <<
|
||||||
" Leaves: " << qPrintable(serversLeavesString);
|
" Leaves: " << qPrintable(serversLeavesString);
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
|
|
||||||
// Local Voxels
|
// Local Voxels
|
||||||
unsigned long localInternal = OctreeElement::getInternalNodeCount();
|
unsigned long localInternal = OctreeElement::getInternalNodeCount();
|
||||||
|
@ -612,21 +612,21 @@ void Stats::display(
|
||||||
QString localInternalString = locale.toString((uint)localInternal);
|
QString localInternalString = locale.toString((uint)localInternal);
|
||||||
QString localLeavesString = locale.toString((uint)localLeaves);
|
QString localLeavesString = locale.toString((uint)localLeaves);
|
||||||
|
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
voxelStats << " Local: " << qPrintable(serversTotalString) <<
|
octreeStats << " Local: " << qPrintable(serversTotalString) <<
|
||||||
" Internal: " << qPrintable(localInternalString) <<
|
" Internal: " << qPrintable(localInternalString) <<
|
||||||
" Leaves: " << qPrintable(localLeavesString) << "";
|
" Leaves: " << qPrintable(localLeavesString) << "";
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// LOD Details
|
// LOD Details
|
||||||
if (_expanded) {
|
if (_expanded) {
|
||||||
voxelStats.str("");
|
octreeStats.str("");
|
||||||
QString displayLODDetails = Menu::getInstance()->getLODFeedbackText();
|
QString displayLODDetails = Menu::getInstance()->getLODFeedbackText();
|
||||||
voxelStats << "LOD: You can see " << qPrintable(displayLODDetails.trimmed());
|
octreeStats << "LOD: You can see " << qPrintable(displayLODDetails.trimmed());
|
||||||
verticalOffset += STATS_PELS_PER_LINE;
|
verticalOffset += STATS_PELS_PER_LINE;
|
||||||
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)voxelStats.str().c_str(), color);
|
drawText(horizontalOffset, verticalOffset, scale, rotation, font, (char*)octreeStats.str().c_str(), color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ private:
|
||||||
int _generalStatsWidth;
|
int _generalStatsWidth;
|
||||||
int _pingStatsWidth;
|
int _pingStatsWidth;
|
||||||
int _geoStatsWidth;
|
int _geoStatsWidth;
|
||||||
int _voxelStatsWidth;
|
int _octreeStatsWidth;
|
||||||
|
|
||||||
int _lastHorizontalOffset;
|
int _lastHorizontalOffset;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ setup_hifi_library(Network Script)
|
||||||
|
|
||||||
include_glm()
|
include_glm()
|
||||||
|
|
||||||
link_hifi_libraries(audio shared octree voxels networking physics gpu model fbx)
|
link_hifi_libraries(audio shared octree networking physics gpu model fbx)
|
||||||
|
|
||||||
# call macro to include our dependency includes and bubble them up via a property on our target
|
# call macro to include our dependency includes and bubble them up via a property on our target
|
||||||
include_dependency_includes()
|
include_dependency_includes()
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
set(TARGET_NAME voxels)
|
set(TARGET_NAME environment)
|
||||||
|
|
||||||
# use setup_hifi_library macro to setup our project and link appropriate Qt modules
|
# use setup_hifi_library macro to setup our project and link appropriate Qt modules
|
||||||
setup_hifi_library(Widgets Script)
|
setup_hifi_library()
|
||||||
|
|
||||||
include_glm()
|
include_glm()
|
||||||
|
|
||||||
link_hifi_libraries(shared octree networking)
|
link_hifi_libraries(shared networking)
|
||||||
|
|
||||||
# find ZLIB
|
# find ZLIB
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
|
@ -5,7 +5,7 @@ setup_hifi_library()
|
||||||
|
|
||||||
include_glm()
|
include_glm()
|
||||||
|
|
||||||
link_hifi_libraries(shared gpu model networking octree voxels)
|
link_hifi_libraries(shared gpu model networking octree)
|
||||||
|
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
|
include_directories(SYSTEM "${ZLIB_INCLUDE_DIRS}")
|
||||||
|
|
|
@ -5,7 +5,7 @@ setup_hifi_library(Gui Network Script Widgets)
|
||||||
|
|
||||||
include_glm()
|
include_glm()
|
||||||
|
|
||||||
link_hifi_libraries(shared octree voxels gpu model fbx entities animation audio physics metavoxels)
|
link_hifi_libraries(shared octree gpu model fbx entities animation audio physics metavoxels)
|
||||||
|
|
||||||
# call macro to include our dependency includes and bubble them up via a property on our target
|
# call macro to include our dependency includes and bubble them up via a property on our target
|
||||||
include_dependency_includes()
|
include_dependency_includes()
|
||||||
|
|
|
@ -5,6 +5,6 @@ setup_hifi_project(Script Network)
|
||||||
include_glm()
|
include_glm()
|
||||||
|
|
||||||
# link in the shared libraries
|
# link in the shared libraries
|
||||||
link_hifi_libraries(shared octree voxels gpu model fbx metavoxels networking entities avatars audio animation script-engine physics)
|
link_hifi_libraries(shared octree gpu model fbx metavoxels networking entities avatars audio animation script-engine physics)
|
||||||
|
|
||||||
include_dependency_includes()
|
include_dependency_includes()
|
||||||
|
|
Loading…
Reference in a new issue