#include "view.h"
#include "screen.h"
#include "debugscript.h"
+#include "profiler.h"
#include <unistd.h>
real_clock_prev = real_clock_now;
#endif
++frames;
+ g_profiler.BeginZone("MainLoop");
+ g_profiler.BeginZone("scr.Clear()");
scr.Clear();
+ g_profiler.EndZone();
//view.ForceBoundsDirty();
//view.ForceBufferDirty();
//view.ForceRenderDirty();
return;
}
+ g_profiler.BeginZone("view.Render");
view.Render(scr.ViewportWidth(), scr.ViewportHeight());
+ g_profiler.EndZone();
double cpu_frame = scr.GetLastFrameTimeCPU();
double gpu_frame = scr.GetLastFrameTimeGPU();
}
#endif // 0
- scr.Present();
-
if (make_movie)
{
std::stringstream s;
s << "frame" << frames << ".bmp";
scr.ScreenShot(s.str().c_str());
- }
+ }
+
+
+ g_profiler.BeginZone("scr.Present()");
+ scr.Present();
+ g_profiler.EndZone();
+ g_profiler.EndZone();
+ g_profiler.AddCounter("Total Objects", doc.ObjectCount());
+ g_profiler.EndFrame();
+
+
}
}