mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-28 06:49:32 -05:00
Only plot RAM and VRAM in Tracy when there is a renderable to get more accurate performance measurements
This commit is contained in:
@@ -844,10 +844,6 @@ void SceneGraphNode::update(const UpdateData& data) {
|
||||
void SceneGraphNode::render(const RenderData& data, RendererTasks& tasks) {
|
||||
ZoneScoped;
|
||||
ZoneName(identifier().c_str(), identifier().size());
|
||||
#ifdef TRACY_ENABLE
|
||||
TracyPlot("RAM", static_cast<int64_t>(global::openSpaceEngine->ramInUse()));
|
||||
TracyPlot("VRAM", static_cast<int64_t>(global::openSpaceEngine->vramInUse()));
|
||||
#endif // TRACY_ENABLE
|
||||
|
||||
if (_state != State::GLInitialized ||
|
||||
!(_renderable && _renderable->isVisible() && _renderable->isReady()) ||
|
||||
@@ -856,6 +852,11 @@ void SceneGraphNode::render(const RenderData& data, RendererTasks& tasks) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef TRACY_ENABLE
|
||||
TracyPlot("RAM", static_cast<int64_t>(global::openSpaceEngine->ramInUse()));
|
||||
TracyPlot("VRAM", static_cast<int64_t>(global::openSpaceEngine->vramInUse()));
|
||||
#endif // TRACY_ENABLE
|
||||
|
||||
RenderData newData = {
|
||||
.camera = data.camera,
|
||||
.time = data.time,
|
||||
|
||||
Reference in New Issue
Block a user