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

Method ShowGotoPopup

qrenderdoc/Windows/TextureViewer.cpp:3949–3969  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3947}
3948
3949void TextureViewer::ShowGotoPopup()
3950{
3951 TextureDescription *texptr = GetCurrentTexture();
3952
3953 if(texptr)
3954 {
3955 QPoint p = m_PickedPoint;
3956
3957 p.setX(MipCoordFromBase(p.x(), texptr->width));
3958 p.setY(MipCoordFromBase(p.y(), texptr->height));
3959
3960 uint32_t mipHeight = qMax(1U, texptr->height >> (int)m_TexDisplay.subresource.mip);
3961
3962 if(ShouldFlipForGL())
3963 p.setY((int)(mipHeight - 1) - p.y());
3964 if(m_TexDisplay.flipY)
3965 p.setY((int)(mipHeight - 1) - p.y());
3966
3967 m_Goto->show(ui->render, p);
3968 }
3969}
3970
3971bool TextureViewer::ShouldFlipForGL()
3972{

Callers

nothing calls this directly

Calls 6

MipCoordFromBaseFunction · 0.85
setXMethod · 0.45
xMethod · 0.45
setYMethod · 0.45
yMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected