Fixed SHTextureLibrary compiler errors

This commit is contained in:
Kah Wei 2022-09-22 12:39:05 +08:00
parent 3d9abcf19c
commit e87c4c8dc8
2 changed files with 11 additions and 5 deletions

View File

@ -26,7 +26,7 @@ namespace SHADE
/*---------------------------------------------------------------------------------*/
/* Usage Functions */
/*---------------------------------------------------------------------------------*/
Handle<SHTexture> SHTextureLibrary::Add(uint32_t pixelCount, const SHTexture::PixelChannel* const pixelData, SHTexture::TextureFormat format, int mipLevels)
Handle<SHTexture> SHTextureLibrary::Add(uint32_t pixelCount, const SHTexture::PixelChannel* const pixelData, SHTexture::TextureFormat format, uint32_t mipLevels)
{
isDirty = true;

View File

@ -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<SHTexture> Add(uint32_t pixelCount, const SHTexture::PixelChannel* const pixelData, SHTexture::TextureFormat format, int mipLevels);
Handle<SHTexture> 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<SHVkLogicalDevice> device, Handle<SHVkCommandBuffer> cmdBuffer, Handle<SHVkQueue> graphicsQueue);
void BuildImages(Handle<SHVkLogicalDevice> device, Handle<SHVkCommandBuffer> cmdBuffer, Handle<SHVkQueue> graphicsQueue, Handle<SHVkDescriptorPool> descPool, Handle<SHVkDescriptorSetLayout> 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<SHVkImage> Image;
Handle<SHTexture> Handle;
};