27 #define CORE_PREFIX "CORE "
29 #define PROGRESS_BAR_SIZE 50
31 #define CORE_ERROR(__msg) std::cerr << "E [" << CORE_PREFIX << "] " << __msg << std::endl;
32 #define CORE_WARN(__msg) std::cerr << "W [" << CORE_PREFIX << "] " << __msg << std::endl;
33 #define CORE_INFO(__msg) std::cout << "I [" << CORE_PREFIX << "] " << __msg << std::endl;
36 #define CORE_DEBUG(__msg)
38 #define CORE_DEBUG(__msg) std::cout << "D [" << CORE_PREFIX << "] " << __msg << std::endl;
40 #define CORE_TIMER(__time, __msg) std::cout << "T [" << CORE_PREFIX << "] [" << __time << "] " << __msg << std::endl;
42 #define CORE_THROW(__msg) \
44 throw std::runtime_error(__msg); \
47 #define CORE_PROGRESS(__msg, __progress, __maxValue) \
49 std::cout << "I [" << CORE_PREFIX << "] ["; \
50 const float __mv = float(__maxValue); \
51 const float __p = float(__progress + 1); \
52 const uint32_t __pos = std::min(PROGRESS_BAR_SIZE, int(__p / __mv * PROGRESS_BAR_SIZE)); \
53 for (uint32_t __i = 0; __i < PROGRESS_BAR_SIZE; ++__i) \
57 else if (__i == __pos) \
62 std::cout << "] " << std::min(__pos * 2, uint32_t(PROGRESS_BAR_SIZE * 2)) << "% " << __msg << "\r"; \
66 #define PLUGIN_REGISTER_ENDPOINT(__msg) CORE_INFO("Registering end-point '" << __msg << "'");
67 #define PLUGIN_REGISTER_RENDERER(__msg) CORE_INFO("Registering renderer '" << __msg << "'");
68 #define PLUGIN_REGISTER_LOADER(__msg) CORE_INFO("Registering loader '" << __msg << "'");
69 #define PLUGIN_REGISTER_CAMERA(__msg) CORE_INFO("Registering camera '" << __msg << "'");