MCPcopy Create free account
hub / github.com/baldurk/renderdoc / AddResourceUsageEntry

Method AddResourceUsageEntry

qrenderdoc/Windows/TextureViewer.cpp:2329–2349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2327}
2328
2329void TextureViewer::AddResourceUsageEntry(QMenu &menu, uint32_t start, uint32_t end,
2330 ResourceUsage usage)
2331{
2332 QAction *item = NULL;
2333
2334 if(start == end)
2335 item = new QAction(
2336 QFormatStr("EID %1: %2").arg(start).arg(ToQStr(usage, m_Ctx.APIProps().pipelineType)), this);
2337 else
2338 item = new QAction(
2339 QFormatStr("EID %1-%2: %3").arg(start).arg(end).arg(ToQStr(usage, m_Ctx.APIProps().pipelineType)),
2340 this);
2341
2342 QObject::connect(item, &QAction::triggered, this, &TextureViewer::texContextItem_triggered);
2343 item->setProperty("eid", QVariant(end));
2344
2345 if(start <= m_Ctx.CurEvent() && m_Ctx.CurEvent() <= end)
2346 item->setIcon(Icons::flag_green());
2347
2348 menu.addAction(item);
2349}
2350
2351void TextureViewer::OpenResourceContextMenu(ResourceId id, bool input,
2352 const rdcarray<EventUsage> &usage)

Callers

nothing calls this directly

Calls 7

connectFunction · 0.85
setPropertyMethod · 0.80
ToQStrFunction · 0.50
QVariantClass · 0.50
argMethod · 0.45
CurEventMethod · 0.45
setIconMethod · 0.45

Tested by

no test coverage detected