Adding basic keyboard input

This commit is contained in:
Dynamitos
2023-11-17 22:31:26 +01:00
parent 897eda18b0
commit ec760e8deb
18 changed files with 167 additions and 90 deletions
+8 -3
View File
@@ -41,9 +41,11 @@ TextureBase::TextureBase(PGraphics graphics, VkImageViewType viewType,
, image(existingImage)
, aspect(getAspectFromFormat(createInfo.format))
, layout(Gfx::SE_IMAGE_LAYOUT_UNDEFINED)
, ownsImage(false)
{
if (existingImage == VK_NULL_HANDLE)
{
ownsImage = true;
PAllocator pool = graphics->getAllocator();
VkImageType type = VK_IMAGE_TYPE_MAX_ENUM;
VkImageCreateFlags flags = 0;
@@ -175,13 +177,16 @@ TextureBase::TextureBase(PGraphics graphics, VkImageViewType viewType,
},
};
VK_CHECK(vkCreateImageView(graphics->getDevice(), &viewInfo, nullptr, &defaultView));
VK_CHECK(vkCreateImageView(graphics->getDevice(), &viewInfo, nullptr, &imageView));
}
TextureBase::~TextureBase()
{
graphics->getDestructionManager()->queueImage(graphics->getQueueCommands(currentOwner)->getCommands(), image);
graphics->getDestructionManager()->queueImageView(graphics->getQueueCommands(currentOwner)->getCommands(), defaultView);
if (ownsImage)
{
graphics->getDestructionManager()->queueImage(graphics->getQueueCommands(currentOwner)->getCommands(), image);
}
graphics->getDestructionManager()->queueImageView(graphics->getQueueCommands(currentOwner)->getCommands(), imageView);
}