aboutsummaryrefslogtreecommitdiff
path: root/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h
diff options
context:
space:
mode:
authorAnton Novoselov <[email protected]>2017-08-14 16:41:28 +0300
committerAnton Novoselov <[email protected]>2017-08-14 16:41:28 +0300
commit9a1c1d814f3fa0b54b49d90b43130c02bc280f44 (patch)
treeeae6ead883173c66619c30b6a1ed085f3cb70f4d /sdk/extensions/physx/include/NvBlastExtCustomProfiler.h
parentUpdated to CL 22627414: (diff)
downloadblast-9a1c1d814f3fa0b54b49d90b43130c02bc280f44.tar.xz
blast-9a1c1d814f3fa0b54b49d90b43130c02bc280f44.zip
Updated to CL 22661993:
* docs updates * authoring fixes * asset view in sample fix * latest blast_tools_and_samples-windows.zip
Diffstat (limited to 'sdk/extensions/physx/include/NvBlastExtCustomProfiler.h')
-rw-r--r--sdk/extensions/physx/include/NvBlastExtCustomProfiler.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h b/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h
index 4130964..e879d03 100644
--- a/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h
+++ b/sdk/extensions/physx/include/NvBlastExtCustomProfiler.h
@@ -68,11 +68,22 @@ static thread_local ExtProfileData th_ProfileData[PROFILER_MAX_NESTED_DEPTH];
static thread_local int32_t th_depth = 0;
#endif
+
+/**
+Implements Nv::Blast::ProfilerCallback to serve the physx::PxProfilerCallback set in PxFoundation
+for PhysX Visual Debugger support and platform specific profilers like NVIDIA(R) NSight(TM).
+*/
class ExtCustomProfiler : public ProfilerCallback
{
public:
+ /**
+ Construct an ExtCustomProfiler with platform specific profiler signals disabled.
+ */
ExtCustomProfiler() : m_platformEnabled(false) {}
+
+ ////// ProfilerCallback interface //////
+
virtual void zoneStart(const char* name) override
{
@@ -127,6 +138,13 @@ public:
}
+ ////// local interface //////
+
+ /**
+ Enable or disable platform specific profiler signals. Disabled by default.
+
+ \param[in] enabled true enables, false disables platform profiler calls.
+ */
void setPlatformEnabled(bool enabled)
{
m_platformEnabled = enabled;
@@ -140,4 +158,4 @@ private:
} // namespace Nv
-#endif
+#endif // NVBLASTDEFAULTPROFILER_H