mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Render thumbnails after main viewport is drawn.
* This doesn't make any difference really locally, but when using a remote host for replay, it means the main viewport will update before the thumbnails wait for those textures to transfer.
This commit is contained in:
@@ -572,10 +572,36 @@ void ReplayOutput::Display()
|
||||
m_MainOutput.dirty = true;
|
||||
}
|
||||
|
||||
if(m_pDevice->CheckResizeOutputWindow(m_PixelContext.outputID))
|
||||
m_MainOutput.dirty = true;
|
||||
|
||||
for(size_t i = 0; i < m_Thumbnails.size(); i++)
|
||||
if(m_pDevice->CheckResizeOutputWindow(m_Thumbnails[i].outputID))
|
||||
m_Thumbnails[i].dirty = true;
|
||||
|
||||
if(m_MainOutput.dirty)
|
||||
{
|
||||
m_MainOutput.dirty = false;
|
||||
|
||||
switch(m_Type)
|
||||
{
|
||||
case ReplayOutputType::Mesh: DisplayMesh(); break;
|
||||
case ReplayOutputType::Texture: DisplayTex(); break;
|
||||
default: RDCERR("Unexpected display type! %d", m_Type); break;
|
||||
}
|
||||
|
||||
m_pDevice->FlipOutputWindow(m_MainOutput.outputID);
|
||||
|
||||
DisplayContext();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pDevice->BindOutputWindow(m_MainOutput.outputID, false);
|
||||
m_pDevice->FlipOutputWindow(m_MainOutput.outputID);
|
||||
m_pDevice->BindOutputWindow(m_PixelContext.outputID, false);
|
||||
m_pDevice->FlipOutputWindow(m_PixelContext.outputID);
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < m_Thumbnails.size(); i++)
|
||||
{
|
||||
if(!m_Thumbnails[i].dirty)
|
||||
@@ -584,6 +610,7 @@ void ReplayOutput::Display()
|
||||
m_pDevice->FlipOutputWindow(m_Thumbnails[i].outputID);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!m_pDevice->IsOutputWindowVisible(m_Thumbnails[i].outputID))
|
||||
continue;
|
||||
|
||||
@@ -642,31 +669,6 @@ void ReplayOutput::Display()
|
||||
|
||||
m_Thumbnails[i].dirty = false;
|
||||
}
|
||||
|
||||
if(m_pDevice->CheckResizeOutputWindow(m_PixelContext.outputID))
|
||||
m_MainOutput.dirty = true;
|
||||
|
||||
if(!m_MainOutput.dirty)
|
||||
{
|
||||
m_pDevice->BindOutputWindow(m_MainOutput.outputID, false);
|
||||
m_pDevice->FlipOutputWindow(m_MainOutput.outputID);
|
||||
m_pDevice->BindOutputWindow(m_PixelContext.outputID, false);
|
||||
m_pDevice->FlipOutputWindow(m_PixelContext.outputID);
|
||||
return;
|
||||
}
|
||||
|
||||
m_MainOutput.dirty = false;
|
||||
|
||||
switch(m_Type)
|
||||
{
|
||||
case ReplayOutputType::Mesh: DisplayMesh(); break;
|
||||
case ReplayOutputType::Texture: DisplayTex(); break;
|
||||
default: RDCERR("Unexpected display type! %d", m_Type); break;
|
||||
}
|
||||
|
||||
m_pDevice->FlipOutputWindow(m_MainOutput.outputID);
|
||||
|
||||
DisplayContext();
|
||||
}
|
||||
|
||||
void ReplayOutput::DisplayTex()
|
||||
|
||||
Reference in New Issue
Block a user