consistency

This commit is contained in:
Irlan 2019-03-30 11:59:20 -03:00
parent f59df50fbd
commit 117f984698
6 changed files with 11 additions and 12 deletions

View File

@ -120,7 +120,7 @@ static void Run()
if (g_settings->drawProfile)
{
const b3Array<ProfilerRecord>& records = g_profilerRecorder->GetRecords();
const b3Array<ProfilerRecord>& records = g_recorderProfiler->GetRecords();
for (u32 i = 0; i < records.Count(); ++i)
{
const ProfilerRecord& r = records[i];

View File

@ -26,7 +26,7 @@ Model::Model()
g_draw = &m_draw;
g_camera = &m_camera;
g_profiler = &m_profiler;
g_profilerRecorder = &m_profilerListener.m_recorderListener;
g_recorderProfiler = &m_profilerListener.m_recorderListener;
g_profilerListener = &m_profilerListener;
m_test = nullptr;
@ -53,7 +53,7 @@ Model::~Model()
g_draw = nullptr;
g_camera = nullptr;
g_profiler = nullptr;
g_profilerRecorder = nullptr;
g_recorderProfiler = nullptr;
g_profilerListener = nullptr;
delete m_test;

View File

@ -20,7 +20,7 @@
#define MODEL_H
#include <testbed/framework/draw.h>
#include <testbed/framework/testbed_listener.h>
#include <testbed/framework/testbed_profiler.h>
class Test;
@ -63,7 +63,7 @@ private:
Draw m_draw;
Camera m_camera;
Profiler m_profiler;
TestbedListener m_profilerListener;
TestbedProfiler m_profilerListener;
Test* m_test;
bool m_setTest;
bool m_pause;

View File

@ -18,7 +18,7 @@
#include <testbed/framework/recorder_profiler.h>
RecorderProfiler* g_profilerRecorder = nullptr;
RecorderProfiler* g_recorderProfiler = nullptr;
void RecorderProfiler::BeginEvents()
{

View File

@ -46,14 +46,14 @@ public:
void EndEvent(const char* name, float64 time);
ProfilerRecord* FindRecord(const char* name);
const b3Array<ProfilerRecord>& GetRecords() const { return m_records; }
private:
ProfilerRecord* FindRecord(const char* name);
b3StackArray<ProfilerRecord, 256> m_records; // persistent records sorted by call order
u32 m_call;
};
extern RecorderProfiler* g_profilerRecorder;
extern RecorderProfiler* g_recorderProfiler;
#endif

View File

@ -22,7 +22,7 @@
#include <testbed/framework/profiler.h>
#include <testbed/framework/recorder_profiler.h>
// Set to 1 then the testbed listener will write profile events into a .json file.
// Set to 1 then the testbed profiler will write profile events into a .json file.
// Set to 0 otherwise.
#define PROFILE_JSON 0
@ -30,8 +30,7 @@
#include <testbed\framework\json_profiler.h>
#endif
class TestbedListener : public ProfilerListener
class TestbedProfiler : public ProfilerListener
{
public:
void BeginEvents() override