mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user