some hacking on full scene debuggin

This commit is contained in:
ZappoMan 2014-03-11 20:33:53 -07:00
parent 214866414c
commit 4d0b762de3
4 changed files with 37 additions and 4 deletions

View file

@ -366,8 +366,20 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue
}
// start tracking our stats
bool isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta())
&& nodeData->getViewFrustumJustStoppedChanging()) || nodeData->hasLodChanged();
qDebug() << "----";
qDebug() << "viewFrustumChanged=" << viewFrustumChanged;
qDebug() << "nodeData->getWantDelta()=" << nodeData->getWantDelta();
qDebug() << "nodeData->getViewFrustumJustStoppedChanging()=" << nodeData->getViewFrustumJustStoppedChanging();
qDebug() << "nodeData->hasLodChanged()=" << nodeData->hasLodChanged();
bool isFullScene = (
(!viewFrustumChanged || !nodeData->getWantDelta())
&& nodeData->getViewFrustumJustStoppedChanging()
)
|| nodeData->hasLodChanged();
qDebug() << "isFullScene=" << isFullScene;
// If we're starting a full scene, then definitely we want to empty the nodeBag
if (isFullScene) {
@ -436,6 +448,8 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue
bool isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta()) &&
nodeData->getViewFrustumJustStoppedChanging()) || nodeData->hasLodChanged();
qDebug() << "SECOND CALC.... isFullScene=" << isFullScene;
EncodeBitstreamParams params(INT_MAX, &nodeData->getCurrentViewFrustum(), wantColor,
WANT_EXISTS_BITS, DONT_CHOP, wantDelta, lastViewFrustum,
wantOcclusionCulling, coverageMap, boundaryLevelAdjust, voxelSizeScale,

View file

@ -141,6 +141,9 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
_justStarted(true),
_voxelImporter(NULL),
_wantToKillLocalVoxels(false),
_viewFrustum(),
_lastQueriedViewFrustum(),
_lastQueriedTime(usecTimestampNow()),
_audioScope(256, 200, true),
_myAvatar(),
_mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)),
@ -1917,8 +1920,19 @@ void Application::updateMyAvatar(float deltaTime) {
loadViewFrustum(_myCamera, _viewFrustum);
// Update my voxel servers with my current voxel query...
queryOctree(NodeType::VoxelServer, PacketTypeVoxelQuery, _voxelServerJurisdictions);
queryOctree(NodeType::ParticleServer, PacketTypeParticleQuery, _particleServerJurisdictions);
quint64 now = usecTimestampNow();
const quint64 TOO_LONG_SINCE_LAST_QUERY = 1 * USECS_PER_SECOND;
// if we haven't waited long enough and the frustum is similar enough, then surpress this query...
if ((now - _lastQueriedTime) > TOO_LONG_SINCE_LAST_QUERY || !_lastQueriedViewFrustum.isVerySimilar(_viewFrustum)) {
_lastQueriedTime = now;
queryOctree(NodeType::VoxelServer, PacketTypeVoxelQuery, _voxelServerJurisdictions);
queryOctree(NodeType::ParticleServer, PacketTypeParticleQuery, _particleServerJurisdictions);
_lastQueriedViewFrustum = _viewFrustum;
//qDebug() << ">>>>>>>>>> SENDING query...";
} else {
//qDebug() << "suppress query...";
}
}
void Application::queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions) {

View file

@ -377,6 +377,8 @@ private:
MetavoxelSystem _metavoxels;
ViewFrustum _viewFrustum; // current state of view frustum, perspective, orientation, etc.
ViewFrustum _lastQueriedViewFrustum; /// last view frustum used to query octree servers (voxels, particles)
quint64 _lastQueriedTime;
Oscilloscope _audioScope;

View file

@ -167,6 +167,9 @@ void OctreeSceneStats::sceneStarted(bool isFullScene, bool isMoving, OctreeEleme
_totalInternal = OctreeElement::getInternalNodeCount();
_totalLeaves = OctreeElement::getLeafNodeCount();
if (isFullScene) {
qDebug() << "OctreeSceneStats::sceneStarted()... IS FULL SCENE";
}
_isFullScene = isFullScene;
_isMoving = isMoving;