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

Method texture_itemActivated

qrenderdoc/Windows/TextureViewer.cpp:4267–4291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4265}
4266
4267void TextureViewer::texture_itemActivated(RDTreeWidgetItem *item, int column)
4268{
4269 QVariant tag = item->tag();
4270 if(!tag.canConvert<ResourceId>())
4271 return;
4272
4273 TextureDescription *tex = m_Ctx.GetTexture(tag.value<ResourceId>());
4274 if(!tex)
4275 return;
4276
4277 if(tex->type == TextureType::Buffer)
4278 {
4279 IBufferViewer *viewer = m_Ctx.ViewTextureAsBuffer(
4280 tex->resourceId, Subresource(), BufferFormatter::GetTextureFormatString(*tex));
4281
4282 m_Ctx.AddDockWindow(viewer->Widget(), DockReference::AddTo, this);
4283 }
4284 else
4285 {
4286 CompType typeCast = CompType::Typeless;
4287 if(m_TextureSettings.contains(tex->resourceId))
4288 typeCast = m_TextureSettings[tex->resourceId].typeCast;
4289 ViewTexture(tex->resourceId, typeCast, true);
4290 }
4291}
4292
4293bool TextureViewer::canCompileCustomShader(ShaderEncoding encoding)
4294{

Callers

nothing calls this directly

Calls 7

SubresourceClass · 0.85
tagMethod · 0.45
GetTextureMethod · 0.45
ViewTextureAsBufferMethod · 0.45
AddDockWindowMethod · 0.45
WidgetMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected