Do some logging in Scene
This commit is contained in:
parent
3ab7c92d36
commit
f8ec140f8e
1 changed files with 6 additions and 0 deletions
|
@ -11,10 +11,14 @@
|
||||||
|
|
||||||
#include "basics.h"
|
#include "basics.h"
|
||||||
#include "light.h"
|
#include "light.h"
|
||||||
|
#include "log.hh"
|
||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "scene.h"
|
#include "scene.h"
|
||||||
#include "writer.h"
|
#include "writer.h"
|
||||||
|
|
||||||
|
#define LOG_NAME "scene"
|
||||||
|
#include "logModule.hh"
|
||||||
|
|
||||||
using namespace charles;
|
using namespace charles;
|
||||||
|
|
||||||
|
|
||||||
|
@ -144,6 +148,7 @@ Scene::write(Writer &writer, const std::string &filename)
|
||||||
void
|
void
|
||||||
Scene::render()
|
Scene::render()
|
||||||
{
|
{
|
||||||
|
LOG_INFO << "Rendering scene with " << shapes.size() << " objects.";
|
||||||
printf("Rendering scene with %lu objects.\n", shapes.size());
|
printf("Rendering scene with %lu objects.\n", shapes.size());
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
start = std::chrono::system_clock::now();
|
start = std::chrono::system_clock::now();
|
||||||
|
@ -167,6 +172,7 @@ Scene::render()
|
||||||
_is_rendered = true;
|
_is_rendered = true;
|
||||||
|
|
||||||
printf("Rendering completed in %f seconds.\n\n", seconds.count());
|
printf("Rendering completed in %f seconds.\n\n", seconds.count());
|
||||||
|
LOG_INFO << "Rendering completed in " << seconds.count() << " seconds.";
|
||||||
mStats.PrintRayTable();
|
mStats.PrintRayTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue