mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 15:29:05 +02:00
some hacking on full scene debuggin
This commit is contained in:
parent
214866414c
commit
4d0b762de3
4 changed files with 37 additions and 4 deletions
|
@ -366,8 +366,20 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue
|
||||||
}
|
}
|
||||||
|
|
||||||
// start tracking our stats
|
// start tracking our stats
|
||||||
bool isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta())
|
qDebug() << "----";
|
||||||
&& nodeData->getViewFrustumJustStoppedChanging()) || nodeData->hasLodChanged();
|
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 we're starting a full scene, then definitely we want to empty the nodeBag
|
||||||
if (isFullScene) {
|
if (isFullScene) {
|
||||||
|
@ -436,6 +448,8 @@ int OctreeSendThread::packetDistributor(const SharedNodePointer& node, OctreeQue
|
||||||
bool isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta()) &&
|
bool isFullScene = ((!viewFrustumChanged || !nodeData->getWantDelta()) &&
|
||||||
nodeData->getViewFrustumJustStoppedChanging()) || nodeData->hasLodChanged();
|
nodeData->getViewFrustumJustStoppedChanging()) || nodeData->hasLodChanged();
|
||||||
|
|
||||||
|
qDebug() << "SECOND CALC.... isFullScene=" << isFullScene;
|
||||||
|
|
||||||
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, voxelSizeScale,
|
||||||
|
|
|
@ -141,6 +141,9 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||||
_justStarted(true),
|
_justStarted(true),
|
||||||
_voxelImporter(NULL),
|
_voxelImporter(NULL),
|
||||||
_wantToKillLocalVoxels(false),
|
_wantToKillLocalVoxels(false),
|
||||||
|
_viewFrustum(),
|
||||||
|
_lastQueriedViewFrustum(),
|
||||||
|
_lastQueriedTime(usecTimestampNow()),
|
||||||
_audioScope(256, 200, true),
|
_audioScope(256, 200, true),
|
||||||
_myAvatar(),
|
_myAvatar(),
|
||||||
_mirrorViewRect(QRect(MIRROR_VIEW_LEFT_PADDING, MIRROR_VIEW_TOP_PADDING, MIRROR_VIEW_WIDTH, MIRROR_VIEW_HEIGHT)),
|
_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);
|
loadViewFrustum(_myCamera, _viewFrustum);
|
||||||
|
|
||||||
// Update my voxel servers with my current voxel query...
|
// Update my voxel servers with my current voxel query...
|
||||||
queryOctree(NodeType::VoxelServer, PacketTypeVoxelQuery, _voxelServerJurisdictions);
|
quint64 now = usecTimestampNow();
|
||||||
queryOctree(NodeType::ParticleServer, PacketTypeParticleQuery, _particleServerJurisdictions);
|
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) {
|
void Application::queryOctree(NodeType_t serverType, PacketType packetType, NodeToJurisdictionMap& jurisdictions) {
|
||||||
|
|
|
@ -377,6 +377,8 @@ private:
|
||||||
MetavoxelSystem _metavoxels;
|
MetavoxelSystem _metavoxels;
|
||||||
|
|
||||||
ViewFrustum _viewFrustum; // current state of view frustum, perspective, orientation, etc.
|
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;
|
Oscilloscope _audioScope;
|
||||||
|
|
||||||
|
|
|
@ -167,6 +167,9 @@ void OctreeSceneStats::sceneStarted(bool isFullScene, bool isMoving, OctreeEleme
|
||||||
_totalInternal = OctreeElement::getInternalNodeCount();
|
_totalInternal = OctreeElement::getInternalNodeCount();
|
||||||
_totalLeaves = OctreeElement::getLeafNodeCount();
|
_totalLeaves = OctreeElement::getLeafNodeCount();
|
||||||
|
|
||||||
|
if (isFullScene) {
|
||||||
|
qDebug() << "OctreeSceneStats::sceneStarted()... IS FULL SCENE";
|
||||||
|
}
|
||||||
_isFullScene = isFullScene;
|
_isFullScene = isFullScene;
|
||||||
_isMoving = isMoving;
|
_isMoving = isMoving;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue