mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-29 23:42:33 +00:00
57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
|
|
#pragma once
|
|
|
|
#include <zvulkan/vulkanobjects.h>
|
|
#include "vulkan/textures/vk_imagetransition.h"
|
|
#include <list>
|
|
|
|
class VulkanRenderDevice;
|
|
class VkHardwareTexture;
|
|
class VkMaterial;
|
|
class VkPPTexture;
|
|
class VkTextureImage;
|
|
enum class PPTextureType;
|
|
class PPTexture;
|
|
|
|
class VkTextureManager
|
|
{
|
|
public:
|
|
VkTextureManager(VulkanRenderDevice* fb);
|
|
~VkTextureManager();
|
|
|
|
void Deinit();
|
|
|
|
void BeginFrame();
|
|
|
|
void SetLightmap(int LMTextureSize, int LMTextureCount, const TArray<uint16_t>& LMTextureData);
|
|
|
|
VkTextureImage* GetTexture(const PPTextureType& type, PPTexture* tex);
|
|
VkFormat GetTextureFormat(PPTexture* texture);
|
|
|
|
void AddTexture(VkHardwareTexture* texture);
|
|
void RemoveTexture(VkHardwareTexture* texture);
|
|
|
|
void AddPPTexture(VkPPTexture* texture);
|
|
void RemovePPTexture(VkPPTexture* texture);
|
|
|
|
VulkanImage* GetNullTexture() { return NullTexture.get(); }
|
|
VulkanImageView* GetNullTextureView() { return NullTextureView.get(); }
|
|
|
|
VkTextureImage Shadowmap;
|
|
VkTextureImage Lightmap;
|
|
|
|
private:
|
|
void CreateNullTexture();
|
|
void CreateShadowmap();
|
|
void CreateLightmap();
|
|
|
|
VkPPTexture* GetVkTexture(PPTexture* texture);
|
|
|
|
VulkanRenderDevice* fb = nullptr;
|
|
|
|
std::list<VkHardwareTexture*> Textures;
|
|
std::list<VkPPTexture*> PPTextures;
|
|
|
|
std::unique_ptr<VulkanImage> NullTexture;
|
|
std::unique_ptr<VulkanImageView> NullTextureView;
|
|
};
|