From e87c4c8dc846a5c391905f48e7dbba663e2b3742 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Thu, 22 Sep 2022 12:39:05 +0800 Subject: [PATCH] Fixed SHTextureLibrary compiler errors --- .../MiddleEnd/Textures/SHTextureLibrary.cpp | 2 +- .../Graphics/MiddleEnd/Textures/SHTextureLibrary.h | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.cpp b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.cpp index 3be4dd11..80be81df 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.cpp +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.cpp @@ -26,7 +26,7 @@ namespace SHADE /*---------------------------------------------------------------------------------*/ /* Usage Functions */ /*---------------------------------------------------------------------------------*/ - Handle SHTextureLibrary::Add(uint32_t pixelCount, const SHTexture::PixelChannel* const pixelData, SHTexture::TextureFormat format, int mipLevels) + Handle SHTextureLibrary::Add(uint32_t pixelCount, const SHTexture::PixelChannel* const pixelData, SHTexture::TextureFormat format, uint32_t mipLevels) { isDirty = true; diff --git a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h index d30b02ed..5cf974ef 100644 --- a/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h +++ b/SHADE_Engine/src/Graphics/MiddleEnd/Textures/SHTextureLibrary.h @@ -18,6 +18,7 @@ of DigiPen Institute of Technology is prohibited. #include "Resource/Handle.h" #include "Resource/ResourceLibrary.h" #include "Math/SHMath.h" +#include "Graphics/SHVulkanIncludes.h" namespace SHADE { @@ -27,6 +28,11 @@ namespace SHADE class SHVkBuffer; class SHVkLogicalDevice; class SHVkCommandBuffer; + class SHVkImage; + class SHVkImageView; + class SHVkQueue; + class SHVkDescriptorPool; + class SHVkDescriptorSetLayout; /*---------------------------------------------------------------------------------*/ /* Type Definitions */ @@ -37,7 +43,7 @@ namespace SHADE /*-----------------------------------------------------------------------------*/ /* Type Definitions */ /*-----------------------------------------------------------------------------*/ - using PixelChannel = void; + using PixelChannel = float; using TextureFormat = vk::Format; // TODO: Change using Index = uint32_t; @@ -82,7 +88,7 @@ namespace SHADE */ /*******************************************************************************/ - Handle Add(uint32_t pixelCount, const SHTexture::PixelChannel* const pixelData, SHTexture::TextureFormat format, int mipLevels); + Handle Add(uint32_t pixelCount, const SHTexture::PixelChannel* const pixelData, SHTexture::TextureFormat format, uint32_t mipLevels); /*******************************************************************************/ /*! @@ -112,7 +118,7 @@ namespace SHADE queue. */ /***************************************************************************/ - void BuildImages(Handle device, Handle cmdBuffer, Handle graphicsQueue); + void BuildImages(Handle device, Handle cmdBuffer, Handle graphicsQueue, Handle descPool, Handle descLayout); /*-----------------------------------------------------------------------------*/ /* Getter Functions */ @@ -128,7 +134,7 @@ namespace SHADE uint32_t PixelCount = 0; const SHTexture::PixelChannel* PixelData = nullptr; SHTexture::TextureFormat TextureFormat = {}; - int MipLevels = 0; + uint32_t MipLevels = 0; Handle Image; Handle Handle; };