Using new log constructor
This commit is contained in:
parent
1a1db94137
commit
5767428fd3
9
main.cpp
9
main.cpp
@ -9,7 +9,14 @@
|
||||
|
||||
namespace gz::vk {
|
||||
int mainLoop() {
|
||||
Log log("", true, false, "Main", Color::BG_RED);
|
||||
LogCreateInfo logCI{};
|
||||
logCI.logfile = "main.log";
|
||||
logCI.storeLog = false;
|
||||
logCI.prefix = "Main";
|
||||
logCI.prefixColor = Color::BG_RED;
|
||||
logCI.timeColor = VULKAN_MESSAGE_TIME_COLOR;
|
||||
Log log(std::move(logCI));
|
||||
|
||||
gz::SettingsManagerCreateInfo<SettingsTypes> smCI{};
|
||||
smCI.filepath = gz::vk::CONFIG_FILE;
|
||||
smCI.readFileOnCreation = true;
|
||||
|
@ -16,9 +16,16 @@ namespace gz::vk {
|
||||
// INIT & CLEANUP
|
||||
//
|
||||
Renderer2D::Renderer2D(VulkanInstance& instance, TextureManager& textureManager) :
|
||||
Renderer(instance, textureManager),
|
||||
rLog("renderer2D.log", true, false, "2D-Renderer", Color::LI_MAGENTA, VULKAN_MESSAGE_TIME_COLOR, true, 100)
|
||||
Renderer(instance, textureManager)
|
||||
{
|
||||
LogCreateInfo logCI{};
|
||||
logCI.logfile = "renderer2D.log";
|
||||
logCI.storeLog = false;
|
||||
logCI.prefix = "2D-Renderer";
|
||||
logCI.prefixColor = Color::LI_MAGENTA;
|
||||
logCI.timeColor = VULKAN_MESSAGE_TIME_COLOR;
|
||||
rLog = Log(std::move(logCI));
|
||||
|
||||
vk.registerCleanupCallback(std::bind(&Renderer2D::cleanup, this));
|
||||
vk.registerSwapChainRecreateCallback(std::bind(&Renderer2D::swapChainRecreateCallback, this));
|
||||
vk.createCommandBuffers(commandBuffers);
|
||||
|
@ -12,8 +12,14 @@ namespace gz::vk {
|
||||
// INIT & CLEANUP
|
||||
//
|
||||
Renderer3D::Renderer3D(VulkanInstance& instance, TextureManager& textureManager) :
|
||||
Renderer(instance, textureManager),
|
||||
rLog("renderer3D.log", true, false, "3D-Renderer", Color::CYAN, VULKAN_MESSAGE_TIME_COLOR, true, 100) {
|
||||
Renderer(instance, textureManager) {
|
||||
LogCreateInfo logCI{};
|
||||
logCI.logfile = "renderer3D.log";
|
||||
logCI.storeLog = false;
|
||||
logCI.prefix = "3D-Renderer";
|
||||
logCI.prefixColor = Color::LI_CYAN;
|
||||
logCI.timeColor = VULKAN_MESSAGE_TIME_COLOR;
|
||||
rLog = Log(std::move(logCI));
|
||||
|
||||
vk.registerCleanupCallback(std::bind(&Renderer3D::cleanup, this));
|
||||
vk.registerSwapChainRecreateCallback(std::bind(&Renderer3D::swapChainRecreateCallback, this));
|
||||
|
@ -285,7 +285,7 @@ void VulkanInstance::getHandleOwnerString(std::string_view message) {
|
||||
}
|
||||
}
|
||||
|
||||
gz::Log VulkanInstance::vLog("vulkan.log", true, true, "Vulkan", VULKAN_MESSAGE_PREFIX_COLOR, VULKAN_MESSAGE_TIME_COLOR);
|
||||
gz::Log VulkanInstance::vLog("vulkan.log", true, true, "Vulkan", VULKAN_MESSAGE_PREFIX_COLOR, true, VULKAN_MESSAGE_TIME_COLOR);
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL VulkanInstance::debugLog(
|
||||
VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverety,
|
||||
VkDebugUtilsMessageTypeFlagsEXT messageType,
|
||||
|
Loading…
Reference in New Issue
Block a user