mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Implement a Performance Counter Viewer pane, hook up selection dialog
This commit is contained in:
committed by
baldurk
parent
7d15d75638
commit
03343239c7
@@ -40,6 +40,7 @@
|
||||
#include "Windows/Dialogs/LiveCapture.h"
|
||||
#include "Windows/EventBrowser.h"
|
||||
#include "Windows/MainWindow.h"
|
||||
#include "Windows/PerformanceCounterViewer.h"
|
||||
#include "Windows/PipelineState/PipelineStateViewer.h"
|
||||
#include "Windows/PixelHistoryView.h"
|
||||
#include "Windows/PythonShell.h"
|
||||
@@ -732,6 +733,18 @@ IDebugMessageView *CaptureContext::GetDebugMessageView()
|
||||
return m_DebugMessageView;
|
||||
}
|
||||
|
||||
IPerformanceCounterViewer *CaptureContext::GetPerformanceCounterViewer()
|
||||
{
|
||||
if(m_PerformanecCounterViewer)
|
||||
return m_PerformanecCounterViewer;
|
||||
|
||||
m_PerformanecCounterViewer = new PerformanceCounterViewer(*this, m_MainWindow);
|
||||
m_PerformanecCounterViewer->setObjectName(lit("performanceCounterViewer"));
|
||||
setupDockWindow(m_PerformanecCounterViewer);
|
||||
|
||||
return m_PerformanecCounterViewer;
|
||||
}
|
||||
|
||||
IStatisticsViewer *CaptureContext::GetStatisticsViewer()
|
||||
{
|
||||
if(m_StatisticsViewer)
|
||||
@@ -803,6 +816,11 @@ void CaptureContext::ShowDebugMessageView()
|
||||
m_MainWindow->showDebugMessageView();
|
||||
}
|
||||
|
||||
void CaptureContext::ShowPerformanceCounterViewer()
|
||||
{
|
||||
m_MainWindow->showPerformanceCounterViewer();
|
||||
}
|
||||
|
||||
void CaptureContext::ShowStatisticsViewer()
|
||||
{
|
||||
m_MainWindow->showStatisticsViewer();
|
||||
|
||||
@@ -45,6 +45,7 @@ class BufferViewer;
|
||||
class TextureViewer;
|
||||
class CaptureDialog;
|
||||
class DebugMessageView;
|
||||
class PerformanceCounterViewer;
|
||||
class StatisticsViewer;
|
||||
class TimelineBar;
|
||||
class PythonShell;
|
||||
@@ -133,6 +134,7 @@ public:
|
||||
IPipelineStateViewer *GetPipelineViewer() override;
|
||||
ICaptureDialog *GetCaptureDialog() override;
|
||||
IDebugMessageView *GetDebugMessageView() override;
|
||||
IPerformanceCounterViewer *GetPerformanceCounterViewer() override;
|
||||
IStatisticsViewer *GetStatisticsViewer() override;
|
||||
ITimelineBar *GetTimelineBar() override;
|
||||
IPythonShell *GetPythonShell() override;
|
||||
@@ -144,6 +146,7 @@ public:
|
||||
bool HasMeshPreview() override { return m_MeshPreview != NULL; }
|
||||
bool HasCaptureDialog() override { return m_CaptureDialog != NULL; }
|
||||
bool HasDebugMessageView() override { return m_DebugMessageView != NULL; }
|
||||
bool HasPerformanceCounterViewer() override { return m_PerformanecCounterViewer != NULL; }
|
||||
bool HasStatisticsViewer() override { return m_StatisticsViewer != NULL; }
|
||||
bool HasTimelineBar() override { return m_TimelineBar != NULL; }
|
||||
bool HasPythonShell() override { return m_PythonShell != NULL; }
|
||||
@@ -154,6 +157,7 @@ public:
|
||||
void ShowPipelineViewer() override;
|
||||
void ShowCaptureDialog() override;
|
||||
void ShowDebugMessageView() override;
|
||||
void ShowPerformanceCounterViewer() override;
|
||||
void ShowStatisticsViewer() override;
|
||||
void ShowTimelineBar() override;
|
||||
void ShowPythonShell() override;
|
||||
@@ -278,6 +282,7 @@ private:
|
||||
PipelineStateViewer *m_PipelineViewer = NULL;
|
||||
CaptureDialog *m_CaptureDialog = NULL;
|
||||
DebugMessageView *m_DebugMessageView = NULL;
|
||||
PerformanceCounterViewer *m_PerformanecCounterViewer = NULL;
|
||||
StatisticsViewer *m_StatisticsViewer = NULL;
|
||||
TimelineBar *m_TimelineBar = NULL;
|
||||
PythonShell *m_PythonShell = NULL;
|
||||
|
||||
@@ -1147,6 +1147,13 @@ as well as messages generated during replay and analysis.
|
||||
)");
|
||||
virtual IDebugMessageView *GetDebugMessageView() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current singleton :class:`PerformanceCounterViewer`.
|
||||
|
||||
:return: The current window, which is created (but not shown) it there wasn't one open.
|
||||
:rtype: PerformanceCounterViewer
|
||||
)");
|
||||
virtual IPerformanceCounterViewer *GetPerformanceCounterViewer() = 0;
|
||||
|
||||
DOCUMENT(R"(Retrieve the current singleton :class:`StatisticsViewer`.
|
||||
|
||||
:return: The current window, which is created (but not shown) it there wasn't one open.
|
||||
@@ -1217,6 +1224,13 @@ as well as messages generated during replay and analysis.
|
||||
)");
|
||||
virtual bool HasDebugMessageView() = 0;
|
||||
|
||||
DOCUMENT(R"(Check if there is a current :class:`PerformanceCounterViewer` open.
|
||||
|
||||
:return: ``True`` if there is a window open.
|
||||
:rtype: ``bool``
|
||||
)");
|
||||
virtual bool HasPerformanceCounterViewer() = 0;
|
||||
|
||||
DOCUMENT(R"(Check if there is a current :class:`StatisticsViewer` open.
|
||||
|
||||
:return: ``True`` if there is a window open.
|
||||
@@ -1253,6 +1267,10 @@ as well as messages generated during replay and analysis.
|
||||
DOCUMENT(
|
||||
"Raise the current :class:`DebugMessageView`, showing it in the default place if needed.");
|
||||
virtual void ShowDebugMessageView() = 0;
|
||||
DOCUMENT(
|
||||
"Raise the current :class:`PerformanceCounterViewer`, showing it in the default place if "
|
||||
"needed.");
|
||||
virtual void ShowPerformanceCounterViewer() = 0;
|
||||
DOCUMENT(
|
||||
"Raise the current :class:`StatisticsViewer`, showing it in the default place if needed.");
|
||||
virtual void ShowStatisticsViewer() = 0;
|
||||
|
||||
Reference in New Issue
Block a user