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

Method render_clicked

qrenderdoc/Windows/BufferViewer.cpp:5018–5069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5016}
5017
5018void BufferViewer::render_clicked(QMouseEvent *e)
5019{
5020 if(!m_Ctx.IsCaptureLoaded())
5021 return;
5022
5023 QPoint curpos = e->pos();
5024
5025 curpos *= ui->render->devicePixelRatioF();
5026
5027 if((e->buttons() & Qt::RightButton) && m_Output)
5028 {
5029 QPointer<BufferViewer> me(this);
5030
5031 m_Ctx.Replay().AsyncInvoke(lit("PickVertex"), [this, me, curpos](IReplayController *r) {
5032 if(!me)
5033 return;
5034
5035 uint32_t instanceSelected = 0;
5036 uint32_t vertSelected = 0;
5037
5038 rdctie(vertSelected, instanceSelected) =
5039 m_Output->PickVertex((uint32_t)curpos.x(), (uint32_t)curpos.y());
5040
5041 if(vertSelected != ~0U)
5042 {
5043 if(!me)
5044 return;
5045
5046 GUIInvoke::call(this, [this, vertSelected, instanceSelected] {
5047 int row = (int)vertSelected;
5048
5049 if(instanceSelected != m_Config.curInstance)
5050 ui->instance->setValue(instanceSelected);
5051
5052 BufferItemModel *model = currentBufferModel();
5053
5054 if(model && row >= 0 && row < model->rowCount())
5055 ScrollToRow(currentTable(), row);
5056
5057 SyncViews(currentTable(), true, true);
5058 });
5059 }
5060 });
5061 }
5062
5063 if(m_CurrentCamera)
5064 m_CurrentCamera->MouseClick(e);
5065
5066 ui->render->setFocus();
5067
5068 INVOKE_MEMFN(RT_UpdateAndDisplay);
5069}
5070
5071void BufferViewer::render_unclicked(QMouseEvent *e)
5072{

Callers

nothing calls this directly

Calls 10

rdctieFunction · 0.85
setFocusMethod · 0.80
IsCaptureLoadedMethod · 0.45
AsyncInvokeMethod · 0.45
PickVertexMethod · 0.45
xMethod · 0.45
yMethod · 0.45
setValueMethod · 0.45
rowCountMethod · 0.45
MouseClickMethod · 0.45

Tested by

no test coverage detected