From d5a2b6bca9f9cc57dcca19962d5ba9b83d26da3e Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Thu, 16 May 2024 14:22:35 -0300 Subject: refa Move BluCan initialization to BluCat folder --- src/blucat/character.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/blucat/character.cpp') diff --git a/src/blucat/character.cpp b/src/blucat/character.cpp index c13ffef..220295d 100644 --- a/src/blucat/character.cpp +++ b/src/blucat/character.cpp @@ -16,8 +16,8 @@ #include "character.hpp" -#include "../command.hpp" -#include "../core.hpp" +#include "command.hpp" +#include "core.hpp" #include "font.hpp" #include "image.hpp" #include "source_buffer.hpp" @@ -105,7 +105,7 @@ load_image(void *obj) } BluCat::SourceBuffer source_image_buffer{ - cg_core.vk_device_with_swapchain, source_image_raw.data(), + BluCat::core.vk_device_with_swapchain, source_image_raw.data(), image_size}; { // Create Vulkan image. @@ -117,7 +117,7 @@ load_image(void *obj) vk_extent3d.depth = 1; BluCat::Image::create( - cg_core.vk_device_with_swapchain, + BluCat::core.vk_device_with_swapchain, &self->character->image, &self->character->device_memory, VK_FORMAT_R8G8B8A8_UNORM, @@ -133,7 +133,7 @@ load_image(void *obj) } { // Copy image from buffer into image. - auto queue_family{cg_core.vk_device_with_swapchain-> + auto queue_family{BluCat::core.vk_device_with_swapchain-> get_queue_family_with_presentation()}; auto queue{queue_family->get_queue()}; BluCat::CommandPool command_pool{queue_family, 1}; @@ -179,10 +179,11 @@ unload_image(void *obj) auto self = static_cast(obj); vkDestroyImage( - cg_core.vk_device_with_swapchain->device, self->character->image, nullptr); + BluCat::core.vk_device_with_swapchain->device, self->character->image, + nullptr); vkFreeMemory( - cg_core.vk_device_with_swapchain->device, self->character->device_memory, - nullptr); + BluCat::core.vk_device_with_swapchain->device, + self->character->device_memory, nullptr); } const CommandChain loader{ -- cgit v1.2.3