Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
DebugInterface.cpp
Go to the documentation of this file.
1
2
4
10
12
13namespace Divide
14{
16 {
18 {
19 return;
20 }
21
23
24 if ( !enabled() )
25 {
26 return;
27 }
28
30
32 {
33 Util::StringFormat( _output, "Scene Update Loops: {}", timingData.updateLoops() );
34
36 {
37 const PerformanceMetrics perfMetrics = context.gfx().getPerformanceMetrics();
38
39 _output.append( "\n" );
40 _output.append( context.app().timer().benchmarkReport());
41 _output.append( "\n" );
42 _output.append( Util::StringFormat( "GPU: [ {:5.5f} ms] [DrawCalls: {}] [Vertices: {}] [Primitives: {}]",
43 perfMetrics._gpuTimeInMS,
44 context.gfx().frameDrawCallsPrev(),
45 perfMetrics._verticesSubmitted,
46 perfMetrics._primitivesGenerated ) );
47
48 _output.append( "\n" );
49 _output.append( Time::ProfileTimer::printAll() );
50 }
51 }
52 }
53
54} //namespace Divide
#define PROFILE_SCOPE_AUTO(CATEGORY)
Definition: Profiler.h:87
Time::ApplicationTimer & timer() noexcept
Definition: Application.inl:92
static const LoopTimingData & timingData(const Kernel &kernel) noexcept
Definition: Kernel.h:213
static U64 FrameCount() noexcept
Definition: GFXDevice.h:340
PerformanceMetrics & getPerformanceMetrics() noexcept
Definition: GFXDevice.inl:194
Application & app() noexcept
Kernel & kernel() noexcept
GFXDevice & gfx() noexcept
constexpr bool IS_DEBUG_BUILD
Definition: config.h:55
constexpr bool ENABLE_FUNCTION_PROFILING
Enable function level profiling.
Definition: config.h:87
constexpr U16 TARGET_FRAME_RATE
Application desired framerate for physics and input simulations.
Definition: config.h:97
constexpr Optick::Category::Type GUI
Definition: Profiler.h:64
Str StringFormat(const char *fmt, Args &&...args)
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
void idle(const PlatformContext &context)
Queries are expensive, so this result MAY BE SEVERAL frames out of date!
U64 _verticesSubmitted
Returns the time in milliseconds that it took to render one frame.