Don't pass event ID to PickVertex()

* It's meaningless to try and pick on any other event but the current one
This commit is contained in:
baldurk
2020-01-20 17:44:34 +00:00
parent a4961df6f0
commit a5c54b3ce7
4 changed files with 5 additions and 6 deletions
+1 -1
View File
@@ -3110,7 +3110,7 @@ void BufferViewer::render_clicked(QMouseEvent *e)
uint32_t vertSelected = 0;
rdctie(vertSelected, instanceSelected) =
m_Output->PickVertex(m_Ctx.CurEvent(), (uint32_t)curpos.x(), (uint32_t)curpos.y());
m_Output->PickVertex((uint32_t)curpos.x(), (uint32_t)curpos.y());
if(vertSelected != ~0U)
{
+1 -2
View File
@@ -340,14 +340,13 @@ relative to the current window with the current mesh display configuration.
Should only be called for mesh outputs.
:param int eventId: The event ID to pick at.
:param int x: The x co-ordinate to pick from.
:param int y: The y co-ordinate to pick from.
:return: A tuple with the first value being the vertex index in the mesh, and the second value being
the instance index. The values are set to :data:`NoResult` if no vertex was found,
:rtype: ``tuple`` of ``int`` and ``int``
)");
virtual rdcpair<uint32_t, uint32_t> PickVertex(uint32_t eventId, uint32_t x, uint32_t y) = 0;
virtual rdcpair<uint32_t, uint32_t> PickVertex(uint32_t x, uint32_t y) = 0;
static const uint32_t NoResult = ~0U;
+1 -1
View File
@@ -58,7 +58,7 @@ public:
ResourceId GetCustomShaderTexID();
ResourceId GetDebugOverlayTexID();
rdcpair<uint32_t, uint32_t> PickVertex(uint32_t eventId, uint32_t x, uint32_t y);
rdcpair<uint32_t, uint32_t> PickVertex(uint32_t x, uint32_t y);
private:
ReplayOutput(ReplayController *parent, WindowingData window, ReplayOutputType type);
+2 -2
View File
@@ -383,11 +383,11 @@ bool ReplayOutput::AddThumbnail(WindowingData window, ResourceId texID, const Su
return true;
}
rdcpair<uint32_t, uint32_t> ReplayOutput::PickVertex(uint32_t eventId, uint32_t x, uint32_t y)
rdcpair<uint32_t, uint32_t> ReplayOutput::PickVertex(uint32_t x, uint32_t y)
{
CHECK_REPLAY_THREAD();
DrawcallDescription *draw = m_pRenderer->GetDrawcallByEID(eventId);
DrawcallDescription *draw = m_pRenderer->GetDrawcallByEID(m_EventID);
const rdcpair<uint32_t, uint32_t> errorReturn = {~0U, ~0U};